{
  "openapi": "3.1.0",
  "info": {
    "title": "VegaDuta API",
    "version": "0.1.0",
    "description": "REST API of the VegaDuta agentic AI platform. Generated from the Spring controllers by OpenApiSpecGenerator; do not edit by hand. Errors are RFC 9457 Problem Details (application/problem+json) described by the Error schema; branch on its type or code, not on the message. Every response carries an X-Request-Id correlation header. Endpoints flagged x-sse stream Server-Sent Events. Where a handler builds its own ResponseEntity the exact 2xx status may differ from the documented one, so clients should accept any 2xx.",
    "license": {
      "name": "BUSL-1.1",
      "identifier": "BUSL-1.1"
    },
    "x-skipped": [
      "BriefController#planStream: duplicate POST /api/briefs/plan",
      "ChatImportController#importUpload: duplicate POST /api/chat-import",
      "ChatImportController#previewUpload: duplicate POST /api/chat-import/preview",
      "McpOAuthController#clientMetadataDocument: unsupported path pattern '${app.mcp.oauth.cimd.path:/oauth/mcp/remote/client-metadata.json}'",
      "TutorStatusOffController#status: duplicate GET /api/tutor/status"
    ]
  },
  "servers": [
    {
      "url": "{baseUrl}",
      "description": "Your deployment's API.",
      "variables": {
        "baseUrl": {
          "default": "http://localhost:8080",
          "description": "Your VegaDuta API origin, e.g. https://api.example.com (local Docker Compose: http://localhost:8080)."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "A2aAgentCard"
    },
    {
      "name": "A2aJsonRpc"
    },
    {
      "name": "A2aRest"
    },
    {
      "name": "AbuseMonitor"
    },
    {
      "name": "Account"
    },
    {
      "name": "AccountSelfDeletion"
    },
    {
      "name": "Addon"
    },
    {
      "name": "AdminTemplate"
    },
    {
      "name": "AgUiRun"
    },
    {
      "name": "Agent"
    },
    {
      "name": "AgentChatSession"
    },
    {
      "name": "AgentDirectory"
    },
    {
      "name": "AgentEventTrigger"
    },
    {
      "name": "AgentExperiment"
    },
    {
      "name": "AgentGeneration"
    },
    {
      "name": "AgentGuardrail"
    },
    {
      "name": "AgentHooks"
    },
    {
      "name": "AgentHooksDefaults"
    },
    {
      "name": "AgentImport"
    },
    {
      "name": "AgentImprovement"
    },
    {
      "name": "AgentJob"
    },
    {
      "name": "AgentJobObservability"
    },
    {
      "name": "AgentJobOperator"
    },
    {
      "name": "AgentLab"
    },
    {
      "name": "AgentMemory"
    },
    {
      "name": "AgentPromptPreview"
    },
    {
      "name": "AgentRunBudget"
    },
    {
      "name": "AgentRuntimeLimits"
    },
    {
      "name": "AgentSchedule"
    },
    {
      "name": "AgentSessionLlmRequest"
    },
    {
      "name": "AgentSessionLlmUsage"
    },
    {
      "name": "AgentSettings"
    },
    {
      "name": "AgentShare"
    },
    {
      "name": "AgentShareOwner"
    },
    {
      "name": "AgentShareVision"
    },
    {
      "name": "AgentShareVoice"
    },
    {
      "name": "AgentSpecialty"
    },
    {
      "name": "AgentTurn"
    },
    {
      "name": "AgentVersion"
    },
    {
      "name": "AiContentReport"
    },
    {
      "name": "AmbientDigest"
    },
    {
      "name": "ApiSpec"
    },
    {
      "name": "AppBuilderCompletion"
    },
    {
      "name": "AppBuilderImage"
    },
    {
      "name": "Approval"
    },
    {
      "name": "Assist"
    },
    {
      "name": "AtlassianOAuth"
    },
    {
      "name": "AuditLog"
    },
    {
      "name": "AuditSeal"
    },
    {
      "name": "BillingWebhook"
    },
    {
      "name": "Brief"
    },
    {
      "name": "BriefLifecycle"
    },
    {
      "name": "BriefProof"
    },
    {
      "name": "BrowserAutomation"
    },
    {
      "name": "BrowserProfile"
    },
    {
      "name": "BrowserRecipe"
    },
    {
      "name": "BrowserTakeover"
    },
    {
      "name": "BudgetTopUp"
    },
    {
      "name": "Capability"
    },
    {
      "name": "ChannelContact"
    },
    {
      "name": "ChannelHealth"
    },
    {
      "name": "ChannelPairing"
    },
    {
      "name": "ChannelRouting"
    },
    {
      "name": "ChannelStatus"
    },
    {
      "name": "ChatBranch"
    },
    {
      "name": "ChatBranchCapabilities"
    },
    {
      "name": "ChatExport"
    },
    {
      "name": "ChatImport"
    },
    {
      "name": "ChatThread"
    },
    {
      "name": "ChatTranscript"
    },
    {
      "name": "CheckoutSession"
    },
    {
      "name": "CodeIntel"
    },
    {
      "name": "CodeToolGeneration"
    },
    {
      "name": "CodingTask"
    },
    {
      "name": "CommerceMandate"
    },
    {
      "name": "CommunityTemplate"
    },
    {
      "name": "CompGrant"
    },
    {
      "name": "CustomCodeTool"
    },
    {
      "name": "DataTable"
    },
    {
      "name": "DecisionCapability"
    },
    {
      "name": "Delegation"
    },
    {
      "name": "DemoChannel"
    },
    {
      "name": "DemoChat"
    },
    {
      "name": "DemoImage"
    },
    {
      "name": "DemoMagic"
    },
    {
      "name": "DemoMusic"
    },
    {
      "name": "DemoSandbox"
    },
    {
      "name": "DemoSandboxReclaim"
    },
    {
      "name": "DemoSession"
    },
    {
      "name": "DemoShare"
    },
    {
      "name": "DemoShareOwner"
    },
    {
      "name": "DemoStudio"
    },
    {
      "name": "DemoTelegramWebhook"
    },
    {
      "name": "DemoTranscriptEmail"
    },
    {
      "name": "DemoVideo"
    },
    {
      "name": "DemoWhatsAppWebhook"
    },
    {
      "name": "DeveloperApi"
    },
    {
      "name": "Device"
    },
    {
      "name": "DeviceDataIngestion"
    },
    {
      "name": "DeviceGateway"
    },
    {
      "name": "DiscordCredential"
    },
    {
      "name": "DiscordSend"
    },
    {
      "name": "DiscordWebhook"
    },
    {
      "name": "DocumentGeneration"
    },
    {
      "name": "E2bCredential"
    },
    {
      "name": "E2bSandbox"
    },
    {
      "name": "EdgeAgentsConfig"
    },
    {
      "name": "EdgePromptBundle"
    },
    {
      "name": "EdgeRelay"
    },
    {
      "name": "EdgeToolExecution"
    },
    {
      "name": "EdgeTurnTelemetry"
    },
    {
      "name": "ElevenLabs"
    },
    {
      "name": "ElevenLabsGeneratedAudio"
    },
    {
      "name": "ElevenLabsVoice"
    },
    {
      "name": "EmailCredential"
    },
    {
      "name": "EmailMessage"
    },
    {
      "name": "EmailSend"
    },
    {
      "name": "EmailUnsubscribe"
    },
    {
      "name": "EvalCredibility"
    },
    {
      "name": "EvalDataset"
    },
    {
      "name": "EvalGate"
    },
    {
      "name": "EvalReliability"
    },
    {
      "name": "FaceEnrollment"
    },
    {
      "name": "FimCompletion"
    },
    {
      "name": "FleetHealth"
    },
    {
      "name": "FraudAnalysis"
    },
    {
      "name": "GeneratedImage"
    },
    {
      "name": "GeneratedMusic"
    },
    {
      "name": "GoogleOAuth"
    },
    {
      "name": "GuardrailRule"
    },
    {
      "name": "ImessageCredential"
    },
    {
      "name": "ImessageSend"
    },
    {
      "name": "ImessageWebhook"
    },
    {
      "name": "Invoice"
    },
    {
      "name": "Jev"
    },
    {
      "name": "JudgeCalibrationSet"
    },
    {
      "name": "Knowledge"
    },
    {
      "name": "KnowledgeCollection"
    },
    {
      "name": "KnowledgeConnector"
    },
    {
      "name": "KnowledgeIngestionJob"
    },
    {
      "name": "KnowledgeRagSettings"
    },
    {
      "name": "LandingEvent"
    },
    {
      "name": "Lead"
    },
    {
      "name": "LearningProposal"
    },
    {
      "name": "LearningReview"
    },
    {
      "name": "LlmCallLog"
    },
    {
      "name": "LlmGatewayContentPolicy"
    },
    {
      "name": "LocalAuth"
    },
    {
      "name": "LocalModels"
    },
    {
      "name": "LocalOpenAiProbe"
    },
    {
      "name": "LocalUnlock"
    },
    {
      "name": "Matrix"
    },
    {
      "name": "McpApps"
    },
    {
      "name": "McpOAuth"
    },
    {
      "name": "McpRegistrationTest"
    },
    {
      "name": "McpRegistry"
    },
    {
      "name": "McpRegistryReview"
    },
    {
      "name": "McpServerAccess"
    },
    {
      "name": "McpServerAuthOptions"
    },
    {
      "name": "McpToolExposure"
    },
    {
      "name": "McpToolPin"
    },
    {
      "name": "Me"
    },
    {
      "name": "MemoryImport"
    },
    {
      "name": "MetaEmbeddedSignup"
    },
    {
      "name": "MetaSocialCredential"
    },
    {
      "name": "MetaSocialSend"
    },
    {
      "name": "MetaSocialWebhook"
    },
    {
      "name": "MetaWhatsAppCredential"
    },
    {
      "name": "MetaWhatsAppWebhook"
    },
    {
      "name": "MobileSentinel"
    },
    {
      "name": "ModelPricing"
    },
    {
      "name": "Moderation"
    },
    {
      "name": "ModerationReview"
    },
    {
      "name": "Newsletter"
    },
    {
      "name": "NorthStar"
    },
    {
      "name": "Notification"
    },
    {
      "name": "OAuthProvider"
    },
    {
      "name": "OcrProviderConfig"
    },
    {
      "name": "Onboarding"
    },
    {
      "name": "OpenAiCompat"
    },
    {
      "name": "OpenApiToolSource"
    },
    {
      "name": "OpenResponses"
    },
    {
      "name": "OperatorInbox"
    },
    {
      "name": "OutboundPolicy"
    },
    {
      "name": "Payment"
    },
    {
      "name": "PaymentCheckout"
    },
    {
      "name": "PlanLimits"
    },
    {
      "name": "Platform"
    },
    {
      "name": "PlatformAlertWebhook"
    },
    {
      "name": "PlatformAuditSearch"
    },
    {
      "name": "PlatformBilling"
    },
    {
      "name": "PlatformBroadcast"
    },
    {
      "name": "PlatformCircuitBreaker"
    },
    {
      "name": "PlatformEmailSuppression"
    },
    {
      "name": "PlatformHealth"
    },
    {
      "name": "PlatformImpersonation"
    },
    {
      "name": "PlatformIssue"
    },
    {
      "name": "PlatformOps"
    },
    {
      "name": "PlatformPoolWarm"
    },
    {
      "name": "PlatformSession"
    },
    {
      "name": "PlatformSpend"
    },
    {
      "name": "PlatformSpendCap"
    },
    {
      "name": "PlatformTenantDetail"
    },
    {
      "name": "PlatformToolCredential"
    },
    {
      "name": "PlatformTrace"
    },
    {
      "name": "PlatformUser"
    },
    {
      "name": "PluginArtifact"
    },
    {
      "name": "PluginCatalog"
    },
    {
      "name": "Privacy"
    },
    {
      "name": "Procedure"
    },
    {
      "name": "ProductCatalog"
    },
    {
      "name": "ProductFeed"
    },
    {
      "name": "PromptAdmin"
    },
    {
      "name": "PromptDirective"
    },
    {
      "name": "Provider"
    },
    {
      "name": "PublicStatus"
    },
    {
      "name": "Quality"
    },
    {
      "name": "QuickTask"
    },
    {
      "name": "RagEval"
    },
    {
      "name": "RazorpayCheckout"
    },
    {
      "name": "RazorpayWebhook"
    },
    {
      "name": "RealtimeVoiceSession"
    },
    {
      "name": "Referral"
    },
    {
      "name": "ReliabilityHealth"
    },
    {
      "name": "ResearchRun"
    },
    {
      "name": "Resolution"
    },
    {
      "name": "ResumableChatTurn"
    },
    {
      "name": "Rl"
    },
    {
      "name": "RlFeedback"
    },
    {
      "name": "Roi"
    },
    {
      "name": "SandboxArtifact"
    },
    {
      "name": "Sarvam"
    },
    {
      "name": "SarvamGeneratedAudio"
    },
    {
      "name": "ScheduledTask"
    },
    {
      "name": "ScimProvisioning"
    },
    {
      "name": "SecretVault"
    },
    {
      "name": "SessionConfig"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Share"
    },
    {
      "name": "SharedWithMe"
    },
    {
      "name": "SignalCredential"
    },
    {
      "name": "SignalSend"
    },
    {
      "name": "Simulation"
    },
    {
      "name": "Skill"
    },
    {
      "name": "SkillLifecycle"
    },
    {
      "name": "SkillSupplyChain"
    },
    {
      "name": "SlackCredential"
    },
    {
      "name": "SlackSend"
    },
    {
      "name": "SlackWebhook"
    },
    {
      "name": "SmsChannel"
    },
    {
      "name": "SocialAuthConfig"
    },
    {
      "name": "SpendReport"
    },
    {
      "name": "StdioSandboxStatus"
    },
    {
      "name": "StudioAppDomain"
    },
    {
      "name": "StudioAppDomainPublic"
    },
    {
      "name": "StudioAppOwner"
    },
    {
      "name": "StudioAppPublic"
    },
    {
      "name": "StudioCollab"
    },
    {
      "name": "StudioProject"
    },
    {
      "name": "StudyPlan"
    },
    {
      "name": "SystemStatus"
    },
    {
      "name": "TeamsCredential"
    },
    {
      "name": "TeamsSend"
    },
    {
      "name": "TeamsWebhook"
    },
    {
      "name": "TelegramCredential"
    },
    {
      "name": "TelegramSend"
    },
    {
      "name": "TelegramWebhook"
    },
    {
      "name": "TemplateBundle"
    },
    {
      "name": "TemplateGallery"
    },
    {
      "name": "TenantAiModelPreference"
    },
    {
      "name": "TenantApiKey"
    },
    {
      "name": "TenantBrandingLogo"
    },
    {
      "name": "TenantData"
    },
    {
      "name": "TenantDataUsage"
    },
    {
      "name": "TenantDefaultModel"
    },
    {
      "name": "TenantDeletion"
    },
    {
      "name": "TenantFeatureFlag"
    },
    {
      "name": "TenantRuntimeLimits"
    },
    {
      "name": "TenantSettings"
    },
    {
      "name": "TenantSignup"
    },
    {
      "name": "TenantSpendCap"
    },
    {
      "name": "TenantSso"
    },
    {
      "name": "TenantSubscription"
    },
    {
      "name": "TenantUpgrade"
    },
    {
      "name": "TenantUsageQuota"
    },
    {
      "name": "Throwing"
    },
    {
      "name": "ToolArgPolicy"
    },
    {
      "name": "ToolClassification"
    },
    {
      "name": "TrajectoryEval"
    },
    {
      "name": "TrialGrant"
    },
    {
      "name": "TurnJournal"
    },
    {
      "name": "TutorAgent"
    },
    {
      "name": "TwilioCredential"
    },
    {
      "name": "TwilioSmsWebhook"
    },
    {
      "name": "TwilioStatusCallback"
    },
    {
      "name": "TwilioVoiceWebhook"
    },
    {
      "name": "TwilioWebhook"
    },
    {
      "name": "UserAdmin"
    },
    {
      "name": "UserMemory"
    },
    {
      "name": "UserMemoryProvenance"
    },
    {
      "name": "UserToolScript"
    },
    {
      "name": "VideoGeneration"
    },
    {
      "name": "ViewAsSession"
    },
    {
      "name": "VisionSession"
    },
    {
      "name": "VoiceCall"
    },
    {
      "name": "VoiceCallRecording"
    },
    {
      "name": "VoiceChannel"
    },
    {
      "name": "Wallet"
    },
    {
      "name": "WebSearchProviders"
    },
    {
      "name": "WebhookSubscription"
    },
    {
      "name": "WhatsAppPolicy"
    },
    {
      "name": "WhatsAppQr"
    },
    {
      "name": "WhatsAppSend"
    },
    {
      "name": "WhatsAppTemplate"
    },
    {
      "name": "Workflow"
    },
    {
      "name": "WorkflowComment"
    },
    {
      "name": "WorkflowExport"
    },
    {
      "name": "WorkflowExpression"
    },
    {
      "name": "WorkflowForm"
    },
    {
      "name": "WorkflowImport"
    },
    {
      "name": "WorkflowInputRequest"
    },
    {
      "name": "WorkflowPin"
    },
    {
      "name": "WorkflowShare"
    },
    {
      "name": "WorkflowShareOwner"
    },
    {
      "name": "WorkflowShareVoice"
    },
    {
      "name": "WorkflowVersion"
    },
    {
      "name": "WorkflowWait"
    },
    {
      "name": "WorkflowWaitWebhook"
    },
    {
      "name": "WorkflowWebhook"
    },
    {
      "name": "WorkspaceFolder"
    },
    {
      "name": "X402Offer"
    },
    {
      "name": "X402Resource"
    },
    {
      "name": "XOAuth"
    },
    {
      "name": "XSend"
    }
  ],
  "externalDocs": {
    "description": "API conventions: errors, auth, paging, SDKs (docs/api/README.md)",
    "url": "https://github.com/CD-LC/vegaduta/blob/main/docs/api/README.md"
  },
  "paths": {
    "/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "A2aAgentCard"
        ],
        "summary": "Platform card",
        "operationId": "A2aAgentCardController_platformCard",
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "tags": [
          "A2aAgentCard"
        ],
        "summary": "Platform card",
        "operationId": "A2aAgentCardController_platformCard_2",
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/.well-known/jwks.json": {
      "get": {
        "tags": [
          "A2aAgentCard"
        ],
        "summary": "Jwks",
        "operationId": "A2aAgentCardController_jwks",
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/a2a": {
      "post": {
        "tags": [
          "A2aJsonRpc"
        ],
        "summary": "Platform",
        "operationId": "A2aJsonRpcController_platform",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/extendedAgentCard": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Extended agent card",
        "operationId": "A2aRestController_extendedAgentCard",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/message:send": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Send message",
        "operationId": "A2aRestController_sendMessage",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/a2a+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/message:stream": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Stream message",
        "operationId": "A2aRestController_streamMessage",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/a2a+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "List tasks",
        "operationId": "A2aRestController_listTasks",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks/{id}": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Get task",
        "operationId": "A2aRestController_getTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "historyLength",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks/{id}/pushNotificationConfigs": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Read push config",
        "operationId": "A2aRestController_readPushConfig",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Create push config",
        "operationId": "A2aRestController_createPushConfig",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks/{id}/pushNotificationConfigs/{configId}": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Read push config",
        "operationId": "A2aRestController_readPushConfig_3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Delete push config",
        "operationId": "A2aRestController_deletePushConfig",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks/{id}:cancel": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Cancel task",
        "operationId": "A2aRestController_cancelTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/a2a/rest/tasks/{id}:subscribe": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Subscribe to task",
        "operationId": "A2aRestController_subscribeToTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get",
        "operationId": "AccountController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AccountSelfDeletion"
        ],
        "summary": "Delete account",
        "operationId": "AccountSelfDeletionController_deleteAccount",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountSelfDeletionController_DeleteAccountRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/account/avatar": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get avatar",
        "operationId": "AccountController_getAvatar",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Upload avatar",
        "operationId": "AccountController_uploadAvatar",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/account/phone": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Set phone number",
        "operationId": "AccountController_setPhoneNumber",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePhoneNumberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons": {
      "get": {
        "tags": [
          "Addon"
        ],
        "summary": "List",
        "operationId": "AddonController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_Overview"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons/host/report": {
      "post": {
        "tags": [
          "Addon"
        ],
        "summary": "Host report",
        "operationId": "AddonController_hostReport",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddonApi_ReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_ReportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons/host/wanted": {
      "get": {
        "tags": [
          "Addon"
        ],
        "summary": "Host wanted",
        "operationId": "AddonController_hostWanted",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_HostWanted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons/{id}": {
      "get": {
        "tags": [
          "Addon"
        ],
        "summary": "Get",
        "operationId": "AddonController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons/{id}/disable": {
      "post": {
        "tags": [
          "Addon"
        ],
        "summary": "Disable",
        "operationId": "AddonController_disable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cascade",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_ChangeResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/addons/{id}/enable": {
      "post": {
        "tags": [
          "Addon"
        ],
        "summary": "Enable",
        "operationId": "AddonController_enable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonApi_ChangeResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/issues": {
      "get": {
        "tags": [
          "PlatformIssue"
        ],
        "summary": "List",
        "operationId": "PlatformIssueController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IssueStatus"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformIssueResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "PlatformIssue"
        ],
        "summary": "Create ticket",
        "operationId": "PlatformIssueController_createTicket",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIssueTicketRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformIssueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/issues/{id}/acknowledge": {
      "post": {
        "tags": [
          "PlatformIssue"
        ],
        "summary": "Acknowledge",
        "operationId": "PlatformIssueController_acknowledge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformIssueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/issues/{id}/resolve": {
      "post": {
        "tags": [
          "PlatformIssue"
        ],
        "summary": "Resolve",
        "operationId": "PlatformIssueController_resolve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformIssueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/llm-usage/calls": {
      "get": {
        "tags": [
          "LlmCallLog"
        ],
        "summary": "Recent calls",
        "operationId": "LlmCallLogController_recentCalls",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "all"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LlmCallLogController_LlmCallLogEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/llm-usage/calls/{id}/diagnose": {
      "post": {
        "tags": [
          "LlmCallLog"
        ],
        "summary": "Diagnose call",
        "operationId": "LlmCallLogController_diagnoseCall",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmCallLogController_LlmCallDiagnosisEntry"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/llm-usage/summary": {
      "get": {
        "tags": [
          "LlmCallLog"
        ],
        "summary": "Summary",
        "operationId": "LlmCallLogController_summary",
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LlmCallLogController_LlmProviderUsageSummaryEntry"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/llm-usage/tasks/{sessionId}": {
      "get": {
        "tags": [
          "LlmCallLog"
        ],
        "summary": "Calls for task",
        "operationId": "LlmCallLogController_callsForTask",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LlmCallLogController_LlmCallLogEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/by-agent": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "By agent",
        "operationId": "SpendReportController_byAgent",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpendReport_AgentUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/by-day": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "By day",
        "operationId": "SpendReportController_byDay",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpendReport_DayUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/by-modality": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "By modality",
        "operationId": "SpendReportController_byModality",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpendReport_ModalityUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/by-model": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "By model",
        "operationId": "SpendReportController_byModel",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpendReport_ModelUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/by-provider": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "By provider",
        "operationId": "SpendReportController_byProvider",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SpendReport_ProviderUsage"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/export.csv": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "Export csv",
        "operationId": "SpendReportController_exportCsv",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "day"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/spend-reports/summary": {
      "get": {
        "tags": [
          "SpendReport"
        ],
        "summary": "Summary",
        "operationId": "SpendReportController_summary",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendReport_Summary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/approved": {
      "get": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Approved",
        "operationId": "AdminTemplateController_approved",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/pending": {
      "get": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Pending",
        "operationId": "AdminTemplateController_pending",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/{id}/approve": {
      "post": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Approve",
        "operationId": "AdminTemplateController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/{id}/reject": {
      "post": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Reject",
        "operationId": "AdminTemplateController_reject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/{id}/unverify": {
      "post": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Unverify",
        "operationId": "AdminTemplateController_unverify",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/{id}/verify": {
      "post": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Verify",
        "operationId": "AdminTemplateController_verify",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/templates/{id}/withdraw": {
      "post": {
        "tags": [
          "AdminTemplate"
        ],
        "summary": "Withdraw",
        "operationId": "AdminTemplateController_withdraw",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/users": {
      "get": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "List",
        "operationId": "UserAdminController_list",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminUserResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "Create",
        "operationId": "UserAdminController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/users/{userId}/enabled": {
      "put": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "Set enabled",
        "operationId": "UserAdminController_setEnabled",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserEnabledRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/users/{userId}/invite-link": {
      "post": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "Reissue invite link",
        "operationId": "UserAdminController_reissueInviteLink",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/users/{userId}/permissions": {
      "put": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "Set permissions",
        "operationId": "UserAdminController_setPermissions",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserPermissionsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/admin/users/{userId}/roles": {
      "put": {
        "tags": [
          "UserAdmin"
        ],
        "summary": "Set roles",
        "operationId": "UserAdminController_setRoles",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetUserRolesRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-bundles/import": {
      "post": {
        "tags": [
          "TemplateBundle"
        ],
        "summary": "Import bundle",
        "operationId": "TemplateBundleController_importBundle",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentBundle"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-bundles/preview": {
      "post": {
        "tags": [
          "TemplateBundle"
        ],
        "summary": "Preview",
        "operationId": "TemplateBundleController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentBundle"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBundlePreview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-bundles/{agentId}": {
      "get": {
        "tags": [
          "TemplateBundle"
        ],
        "summary": "Export",
        "operationId": "TemplateBundleController_export",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBundle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-jobs": {
      "get": {
        "tags": [
          "AgentJob"
        ],
        "summary": "List for tenant",
        "operationId": "AgentJobController_listForTenant",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentJobSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-jobs/counts": {
      "get": {
        "tags": [
          "AgentJobOperator"
        ],
        "summary": "Counts",
        "operationId": "AgentJobOperatorController_counts",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "duration"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobCountsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agent-runtime/limits": {
      "get": {
        "tags": [
          "TenantRuntimeLimits"
        ],
        "summary": "Get",
        "operationId": "TenantRuntimeLimitsController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeLimitsView"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "TenantRuntimeLimits"
        ],
        "summary": "Put",
        "operationId": "TenantRuntimeLimitsController_put",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeLimits"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeLimitsView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TenantRuntimeLimits"
        ],
        "summary": "Clear",
        "operationId": "TenantRuntimeLimitsController_clear",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "List",
        "operationId": "AgentController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "description": "The tenant's agents the caller can see, newest first. Pass limit (and offset) for a page with X-Total-Count and X-Has-More.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Create",
        "operationId": "AgentController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreateRequest"
              }
            }
          }
        },
        "description": "Create an agent. Answers 201 with the new agent. Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/delegations/introspect": {
      "post": {
        "tags": [
          "Delegation"
        ],
        "summary": "Introspect",
        "operationId": "DelegationController_introspect",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegationDtos_IntrospectRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/directory/mine": {
      "get": {
        "tags": [
          "AgentDirectory"
        ],
        "summary": "Mine",
        "operationId": "AgentDirectoryController_mine",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/generate": {
      "post": {
        "tags": [
          "AgentGeneration"
        ],
        "summary": "Generate",
        "operationId": "AgentGenerationController_generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentGenerationController_AgentGenerationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/import": {
      "post": {
        "tags": [
          "AgentImport"
        ],
        "summary": "Import agent",
        "operationId": "AgentImportController_importAgent",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentImportDtos_ImportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/import/preview": {
      "post": {
        "tags": [
          "AgentImport"
        ],
        "summary": "Preview",
        "operationId": "AgentImportController_preview",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentImportDtos_PreviewResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/specialties/tags": {
      "get": {
        "tags": [
          "AgentSpecialty"
        ],
        "summary": "Tags",
        "operationId": "AgentSpecialtyController_tags",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Get",
        "operationId": "AgentController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "One agent with its settings. The ETag header is its current version: send it as If-Match on a settings PATCH to avoid overwriting a newer change.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Agent"
        ],
        "summary": "Delete",
        "operationId": "AgentController_delete",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "description": "Delete the agent. Refused with 409 while a workflow or another agent still uses it.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a": {
      "post": {
        "tags": [
          "A2aJsonRpc"
        ],
        "summary": "Agent scoped",
        "operationId": "A2aJsonRpcController_agentScoped",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/agent-card.json": {
      "get": {
        "tags": [
          "A2aAgentCard"
        ],
        "summary": "Agent card",
        "operationId": "A2aAgentCardController_agentCard",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/extendedAgentCard": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Extended agent card",
        "operationId": "A2aRestController_extendedAgentCard_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/message:send": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Send message",
        "operationId": "A2aRestController_sendMessage_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/a2a+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/message:stream": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Stream message",
        "operationId": "A2aRestController_streamMessage_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/a2a+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "List tasks",
        "operationId": "A2aRestController_listTasks_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks/{id}": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Get task",
        "operationId": "A2aRestController_getTask_2",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "historyLength",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks/{id}/pushNotificationConfigs": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Read push config",
        "operationId": "A2aRestController_readPushConfig_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Create push config",
        "operationId": "A2aRestController_createPushConfig_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks/{id}/pushNotificationConfigs/{configId}": {
      "get": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Read push config",
        "operationId": "A2aRestController_readPushConfig_4",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Delete push config",
        "operationId": "A2aRestController_deletePushConfig_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks/{id}:cancel": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Cancel task",
        "operationId": "A2aRestController_cancelTask_2",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/a2a/rest/tasks/{id}:subscribe": {
      "post": {
        "tags": [
          "A2aRest"
        ],
        "summary": "Subscribe to task",
        "operationId": "A2aRestController_subscribeToTask_2",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "A2A-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.a2a.enabled=true",
        "description": "Only available when the feature flag app.a2a.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/agui/run": {
      "post": {
        "tags": [
          "AgUiRun"
        ],
        "summary": "Run",
        "operationId": "AgUiRunController_run",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunAgentInput"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/agui/runs/{runId}/events": {
      "get": {
        "tags": [
          "AgUiRun"
        ],
        "summary": "Events",
        "operationId": "AgUiRunController_events",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/agui/tools": {
      "get": {
        "tags": [
          "AgUiRun"
        ],
        "summary": "Tools",
        "operationId": "AgUiRunController_tools",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgUiRunController_AgUiTool"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/autonomy-tier": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set autonomy tier",
        "operationId": "AgentController_setAutonomyTier",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentAutonomyTierUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/available-tools": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "List available tools",
        "operationId": "AgentController_listAvailableTools",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ToolDescriptor"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/biometric-consent": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set biometric consent enabled",
        "operationId": "AgentController_setBiometricConsentEnabled",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentBiometricConsentToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/capabilities": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "List capabilities",
        "operationId": "AgentController_listCapabilities",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentCapabilityResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/capabilities/{capabilityKey}": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set capability enabled",
        "operationId": "AgentController_setCapabilityEnabled",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "capabilityKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCapabilityUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/chat": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Chat",
        "operationId": "AgentController_chat",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Resumable-Stream",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Run one chat turn and stream the reply as Server-Sent Events: each event's data is the next text chunk. Send the same sessionId to continue a conversation; the server keeps the memory. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/chat-branching/capabilities": {
      "get": {
        "tags": [
          "ChatBranchCapabilities"
        ],
        "summary": "Capabilities",
        "operationId": "ChatBranchCapabilitiesController_capabilities",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatBranchDtos_Capabilities"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/chat/attachments": {
      "post": {
        "tags": [
          "AgentChatSession"
        ],
        "summary": "Upload chat attachment",
        "operationId": "AgentChatSessionController_uploadChatAttachment",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatAttachmentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/chat/sessions/{sessionId}/cancel": {
      "post": {
        "tags": [
          "AgentChatSession"
        ],
        "summary": "Cancel chat turn",
        "operationId": "AgentChatSessionController_cancelChatTurn",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Ask the in-flight chat turn of this session to stop; the turn ends on its next poll. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404.",
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/chat/sessions/{sessionId}/rewind": {
      "post": {
        "tags": [
          "AgentChatSession"
        ],
        "summary": "Rewind chat session",
        "operationId": "AgentChatSessionController_rewindChatSession",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRewindRequest"
              }
            }
          }
        },
        "description": "Truncate the session transcript to its first keepTurns entries so the conversation continues from there; no turn is re-run. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/code-intel-repo-access": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set code intel repo access",
        "operationId": "AgentController_setCodeIntelRepoAccess",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCodeIntelRepoAccessUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/collaborators": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set collaborators",
        "operationId": "AgentController_setCollaborators",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCollaboratorsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/cost-routing": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set cost routing",
        "operationId": "AgentController_setCostRouting",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCostRoutingUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/delegations": {
      "get": {
        "tags": [
          "Delegation"
        ],
        "summary": "List",
        "operationId": "DelegationController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DelegationDtos_GrantResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Delegation"
        ],
        "summary": "Create grant",
        "operationId": "DelegationController_createGrant",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegationDtos_CreateGrantRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/delegations/{grantId}/revoke": {
      "post": {
        "tags": [
          "Delegation"
        ],
        "summary": "Revoke",
        "operationId": "DelegationController_revoke",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegationDtos_RevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DelegationDtos_GrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/delegations/{grantId}/tokens": {
      "post": {
        "tags": [
          "Delegation"
        ],
        "summary": "Mint",
        "operationId": "DelegationController_mint",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DelegationDtos_MintTokenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DelegationDtos_MintedTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/directory/publish": {
      "post": {
        "tags": [
          "AgentDirectory"
        ],
        "summary": "Publish",
        "operationId": "AgentDirectoryController_publish",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDirectoryController_PublishRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/directory/unpublish": {
      "post": {
        "tags": [
          "AgentDirectory"
        ],
        "summary": "Unpublish",
        "operationId": "AgentDirectoryController_unpublish",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/duplicate": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Duplicate",
        "operationId": "AgentController_duplicate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/edge-routing-policy": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set edge routing policy",
        "operationId": "AgentController_setEdgeRoutingPolicy",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEdgeRoutingPolicyUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experience-mode": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set experience mode",
        "operationId": "AgentController_setExperienceMode",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentExperienceModeUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experiments": {
      "get": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "List",
        "operationId": "AgentExperimentController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "Create",
        "operationId": "AgentExperimentController_create",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentExperimentDtos_CreateExperimentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experiments/{experimentId}": {
      "get": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "Get",
        "operationId": "AgentExperimentController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experiments/{experimentId}/metrics": {
      "get": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "Metrics",
        "operationId": "AgentExperimentController_metrics",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experiments/{experimentId}/start": {
      "post": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "Start",
        "operationId": "AgentExperimentController_start",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/experiments/{experimentId}/stop": {
      "post": {
        "tags": [
          "AgentExperiment"
        ],
        "summary": "Stop",
        "operationId": "AgentExperimentController_stop",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentExperimentDtos_StopExperimentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentExperimentDtos_ExperimentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/fallback": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set fallback provider",
        "operationId": "AgentController_setFallbackProvider",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentFallbackUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/generation-params": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update generation params",
        "operationId": "AgentController_updateGenerationParams",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentGenerationParamsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/guardrails": {
      "get": {
        "tags": [
          "AgentGuardrail"
        ],
        "summary": "Get agent guardrails",
        "operationId": "AgentGuardrailController_getAgentGuardrails",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGuardrailsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "AgentGuardrail"
        ],
        "summary": "Update agent guardrails",
        "operationId": "AgentGuardrailController_updateAgentGuardrails",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentGuardrailsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGuardrailsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/hooks": {
      "get": {
        "tags": [
          "AgentHooks"
        ],
        "summary": "Get",
        "operationId": "AgentHooksController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHookDtos_AgentHooksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentHooks"
        ],
        "summary": "Put",
        "operationId": "AgentHooksController_put",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHookDtos_AgentHooksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/improvements": {
      "get": {
        "tags": [
          "AgentImprovement"
        ],
        "summary": "List",
        "operationId": "AgentImprovementController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImprovementDtos_SuggestionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/improvements/generate": {
      "post": {
        "tags": [
          "AgentImprovement"
        ],
        "summary": "Generate",
        "operationId": "AgentImprovementController_generate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ImprovementDtos_SuggestionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/improvements/health": {
      "get": {
        "tags": [
          "AgentImprovement"
        ],
        "summary": "Health",
        "operationId": "AgentImprovementController_health",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImprovementDtos_HealthScoreResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/improvements/{suggestionId}/accept": {
      "post": {
        "tags": [
          "AgentImprovement"
        ],
        "summary": "Accept",
        "operationId": "AgentImprovementController_accept",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImprovementDtos_SuggestionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/improvements/{suggestionId}/dismiss": {
      "post": {
        "tags": [
          "AgentImprovement"
        ],
        "summary": "Dismiss",
        "operationId": "AgentImprovementController_dismiss",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImprovementDtos_SuggestionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs": {
      "get": {
        "tags": [
          "AgentJob"
        ],
        "summary": "List for agent",
        "operationId": "AgentJobController_listForAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentJobSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "AgentJob"
        ],
        "summary": "Submit",
        "operationId": "AgentJobController_submit",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentJobStartRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs/{jobId}": {
      "get": {
        "tags": [
          "AgentJob"
        ],
        "summary": "Get",
        "operationId": "AgentJobController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs/{jobId}/cancel": {
      "post": {
        "tags": [
          "AgentJob"
        ],
        "summary": "Cancel",
        "operationId": "AgentJobController_cancel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs/{jobId}/progress": {
      "get": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Progress",
        "operationId": "AgentJobObservabilityController_progress",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentJobProgressNoteView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs/{jobId}/trace": {
      "get": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Trace",
        "operationId": "AgentJobObservabilityController_trace",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobTraceEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/jobs/{jobId}/trace/stream": {
      "get": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Trace stream",
        "operationId": "AgentJobObservabilityController_traceStream",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/knowledge-access": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set knowledge access",
        "operationId": "AgentController_setKnowledgeAccess",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentKnowledgeAccessUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/knowledge-base": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set knowledge base enabled",
        "operationId": "AgentController_setKnowledgeBaseEnabled",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentKnowledgeBaseToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/lab/capabilities": {
      "get": {
        "tags": [
          "AgentLab"
        ],
        "summary": "Capabilities",
        "operationId": "AgentLabController_capabilities",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentLabDtos_LabCapabilitiesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/lab/runs": {
      "post": {
        "tags": [
          "AgentLab"
        ],
        "summary": "Start run",
        "operationId": "AgentLabController_startRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentLabDtos_LabRunRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentLabDtos_LabRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/lab/runs/{runId}": {
      "get": {
        "tags": [
          "AgentLab"
        ],
        "summary": "Get run",
        "operationId": "AgentLabController_getRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentLabDtos_LabRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/lab/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "AgentLab"
        ],
        "summary": "Cancel run",
        "operationId": "AgentLabController_cancelRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentLabDtos_LabCancelResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/manifest": {
      "get": {
        "tags": [
          "Delegation"
        ],
        "summary": "Manifest",
        "operationId": "DelegationController_manifest",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/memories": {
      "get": {
        "tags": [
          "AgentMemory"
        ],
        "summary": "Memories",
        "operationId": "AgentMemoryController_memories",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subjectKey",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentMemoryEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/memories/{memoryId}": {
      "delete": {
        "tags": [
          "AgentMemory"
        ],
        "summary": "Forget memory",
        "operationId": "AgentMemoryController_forgetMemory",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "memoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/model": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update model",
        "operationId": "AgentController_updateModel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentModelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/procedures": {
      "get": {
        "tags": [
          "Procedure"
        ],
        "summary": "List for agent",
        "operationId": "ProcedureController_listForAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcedureResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Procedure"
        ],
        "summary": "Attach",
        "operationId": "ProcedureController_attach",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachProcedureRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/procedures/{procedureId}": {
      "delete": {
        "tags": [
          "Procedure"
        ],
        "summary": "Detach",
        "operationId": "ProcedureController_detach",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "procedureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/prompt": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update system prompt",
        "operationId": "AgentController_updateSystemPrompt",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPromptUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/prompt-preview": {
      "post": {
        "tags": [
          "AgentPromptPreview"
        ],
        "summary": "Preview",
        "operationId": "AgentPromptPreviewController_preview",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptPreviewService_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptPreviewService_Preview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/prompt/versions": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "List prompt versions",
        "operationId": "AgentController_listPromptVersions",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromptVersionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/prompt/versions/{versionId}/revert": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Revert to prompt version",
        "operationId": "AgentController_revertToPromptVersion",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/config": {
      "get": {
        "tags": [
          "Quality"
        ],
        "summary": "Get config",
        "operationId": "QualityController_getConfig",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityController_QualityConfigResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets": {
      "get": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "List datasets",
        "operationId": "EvalDatasetController_listDatasets",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvalDatasetDtos_DatasetResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Create dataset",
        "operationId": "EvalDatasetController_createDataset",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_UpsertDatasetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_DatasetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/seed-golden": {
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Seed golden dataset",
        "operationId": "EvalDatasetController_seedGoldenDataset",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_DatasetDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/seed-research": {
      "post": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Seed research",
        "operationId": "EvalCredibilityController_seedResearch",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCredibilityController_SeedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}": {
      "get": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Get dataset",
        "operationId": "EvalDatasetController_getDataset",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_DatasetDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Update dataset",
        "operationId": "EvalDatasetController_updateDataset",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_UpsertDatasetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_DatasetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Delete dataset",
        "operationId": "EvalDatasetController_deleteDataset",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/cases": {
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Add case",
        "operationId": "EvalDatasetController_addCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_UpsertCaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_CaseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/cases/import": {
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Import turn case",
        "operationId": "EvalDatasetController_importTurnCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_ImportTurnCaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_CaseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/cases/{caseId}": {
      "put": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Update case",
        "operationId": "EvalDatasetController_updateCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_UpsertCaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_CaseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Delete case",
        "operationId": "EvalDatasetController_deleteCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/cases/{caseId}/grader": {
      "put": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Set grader",
        "operationId": "EvalCredibilityController_setGrader",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalCredibilityController_SetGraderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalCredibilityController_GraderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/export.jsonl": {
      "get": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Dataset export jsonl",
        "operationId": "EvalCredibilityController_datasetExportJsonl",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs": {
      "get": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "List runs",
        "operationId": "EvalDatasetController_listRuns",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvalDatasetDtos_RunResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Trigger run",
        "operationId": "EvalDatasetController_triggerRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalDatasetDtos_TriggerRunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_RunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs/{runId}": {
      "get": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Get run",
        "operationId": "EvalDatasetController_getRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_RunDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs/{runId}/bundle": {
      "get": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Run bundle",
        "operationId": "EvalCredibilityController_runBundle",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalRunBundle_Bundle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Cancel run",
        "operationId": "EvalDatasetController_cancelRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalDatasetDtos_RunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs/{runId}/export.jsonl": {
      "get": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Run export jsonl",
        "operationId": "EvalCredibilityController_runExportJsonl",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/datasets/{datasetId}/runs/{runId}/junit": {
      "get": {
        "tags": [
          "EvalDataset"
        ],
        "summary": "Junit report",
        "operationId": "EvalDatasetController_junitReport",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/gate": {
      "get": {
        "tags": [
          "EvalGate"
        ],
        "summary": "Get gate",
        "operationId": "EvalGateController_getGate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalGateDtos_GateStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "EvalGate"
        ],
        "summary": "Upsert gate",
        "operationId": "EvalGateController_upsertGate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalGateDtos_UpsertGateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalGateDtos_GateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "EvalGate"
        ],
        "summary": "Delete gate",
        "operationId": "EvalGateController_deleteGate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/gate/check": {
      "get": {
        "tags": [
          "EvalGate"
        ],
        "summary": "Check",
        "operationId": "EvalGateController_check",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvalGateDtos_GateEvaluationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/history": {
      "get": {
        "tags": [
          "Quality"
        ],
        "summary": "Get history",
        "operationId": "QualityController_getHistory",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityHistoryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration": {
      "post": {
        "tags": [
          "EvalCredibility"
        ],
        "summary": "Calibrate",
        "operationId": "EvalCredibilityController_calibrate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalCredibilityController_CalibrationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeCalibrationService_CalibrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration-history": {
      "get": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "History",
        "operationId": "JudgeCalibrationSetController_history",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JudgeCalibrationSetController_ResultResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration-sets": {
      "get": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "List",
        "operationId": "JudgeCalibrationSetController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JudgeCalibrationSetController_SetResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Create",
        "operationId": "JudgeCalibrationSetController_create",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JudgeCalibrationSetController_CreateSetRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeCalibrationSetController_SetDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration-sets/{setId}": {
      "get": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Get",
        "operationId": "JudgeCalibrationSetController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeCalibrationSetController_SetDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Rename",
        "operationId": "JudgeCalibrationSetController_rename",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JudgeCalibrationSetController_RenameSetRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeCalibrationSetController_SetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Delete",
        "operationId": "JudgeCalibrationSetController_delete",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration-sets/{setId}/items": {
      "post": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Add items",
        "operationId": "JudgeCalibrationSetController_addItems",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JudgeCalibrationSetController_AddItemsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeCalibrationSetController_SetDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/judge-calibration-sets/{setId}/items/{itemId}": {
      "delete": {
        "tags": [
          "JudgeCalibrationSet"
        ],
        "summary": "Delete item",
        "operationId": "JudgeCalibrationSetController_deleteItem",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "setId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/reliability": {
      "get": {
        "tags": [
          "EvalReliability"
        ],
        "summary": "Get reliability",
        "operationId": "EvalReliabilityController_getReliability",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "maxRuns",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityDtos_AgentReliabilityResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/reliability/compare": {
      "get": {
        "tags": [
          "EvalReliability"
        ],
        "summary": "Compare runs",
        "operationId": "EvalReliabilityController_compareRuns",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "baselineRunId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "candidateRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityDtos_PairedComparisonResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/reliability/noise-floor": {
      "get": {
        "tags": [
          "EvalReliability"
        ],
        "summary": "Get noise floor",
        "operationId": "EvalReliabilityController_getNoiseFloor",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityDtos_DatasetNoiseFloorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/personas": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "List personas",
        "operationId": "SimulationController_listPersonas",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SimulationDtos_PersonaResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Simulation"
        ],
        "summary": "Create persona",
        "operationId": "SimulationController_createPersona",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulationDtos_CreatePersonaRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_PersonaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/personas/{key}": {
      "delete": {
        "tags": [
          "Simulation"
        ],
        "summary": "Delete persona",
        "operationId": "SimulationController_deletePersona",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/runs/{runId}": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "Get run",
        "operationId": "SimulationController_getRun",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_RunDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/sessions": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "List sessions",
        "operationId": "SimulationController_listSessions",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SimulationDtos_SessionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Simulation"
        ],
        "summary": "Create session",
        "operationId": "SimulationController_createSession",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulationDtos_CreateSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/sessions/{sessionId}": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "Get session",
        "operationId": "SimulationController_getSession",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/sessions/{sessionId}/attack-report": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "Attack report",
        "operationId": "SimulationController_attackReport",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_AttackReportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/sessions/{sessionId}/cancel": {
      "post": {
        "tags": [
          "Simulation"
        ],
        "summary": "Cancel session",
        "operationId": "SimulationController_cancelSession",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationDtos_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/simulations/sessions/{sessionId}/runs": {
      "get": {
        "tags": [
          "Simulation"
        ],
        "summary": "List runs",
        "operationId": "SimulationController_listRuns",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SimulationDtos_RunSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/statistics": {
      "get": {
        "tags": [
          "Quality"
        ],
        "summary": "Get statistics",
        "operationId": "QualityController_getStatistics",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityStatisticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/summary": {
      "get": {
        "tags": [
          "Quality"
        ],
        "summary": "Get summary",
        "operationId": "QualityController_getSummary",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualitySummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/trajectory-eval/config": {
      "get": {
        "tags": [
          "TrajectoryEval"
        ],
        "summary": "Config",
        "operationId": "TrajectoryEvalController_config",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrajectoryEvalDtos_Config"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/trajectory-eval/datasets/{datasetId}/cases/{caseId}": {
      "get": {
        "tags": [
          "TrajectoryEval"
        ],
        "summary": "Get case",
        "operationId": "TrajectoryEvalController_getCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrajectoryEvalDtos_CaseTrajectory"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "TrajectoryEval"
        ],
        "summary": "Set case",
        "operationId": "TrajectoryEvalController_setCase",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrajectoryEvalDtos_SetCaseRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrajectoryEvalDtos_CaseTrajectory"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/trajectory-eval/datasets/{datasetId}/runs/{runId}": {
      "get": {
        "tags": [
          "TrajectoryEval"
        ],
        "summary": "Run trajectories",
        "operationId": "TrajectoryEvalController_runTrajectories",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrajectoryEvalDtos_RunTrajectories"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/quality/trajectory-eval/datasets/{datasetId}/runs/{runId}/results/{resultId}/actual": {
      "get": {
        "tags": [
          "TrajectoryEval"
        ],
        "summary": "Actual",
        "operationId": "TrajectoryEvalController_actual",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resultId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrajectoryEvalDtos_ActualTrajectory"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/reasoning-depth": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set reasoning depth",
        "operationId": "AgentController_setReasoningDepth",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentReasoningDepthUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/reliability": {
      "get": {
        "tags": [
          "AgentChatSession"
        ],
        "summary": "Reliability",
        "operationId": "AgentChatSessionController_reliability",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentReliabilitySummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/response-caching": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set response caching enabled",
        "operationId": "AgentController_setResponseCachingEnabled",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentResponseCachingToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/result-schema": {
      "get": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Get result schema",
        "operationId": "AgentJobObservabilityController_getResultSchema",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobObservabilityController_ResultSchemaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Set result schema",
        "operationId": "AgentJobObservabilityController_setResultSchema",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentResultSchemaRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobObservabilityController_ResultSchemaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AgentJobObservability"
        ],
        "summary": "Clear result schema",
        "operationId": "AgentJobObservabilityController_clearResultSchema",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/run-budget": {
      "get": {
        "tags": [
          "AgentRunBudget"
        ],
        "summary": "Get",
        "operationId": "AgentRunBudgetController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunBudgetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "AgentRunBudget"
        ],
        "summary": "Update",
        "operationId": "AgentRunBudgetController_update",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunBudgetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/runtime-limits": {
      "get": {
        "tags": [
          "AgentRuntimeLimits"
        ],
        "summary": "Get",
        "operationId": "AgentRuntimeLimitsController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeLimitsView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentRuntimeLimits"
        ],
        "summary": "Put",
        "operationId": "AgentRuntimeLimitsController_put",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeLimits"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeLimitsView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/schedule": {
      "get": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Get",
        "operationId": "AgentScheduleController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Upsert",
        "operationId": "AgentScheduleController_upsert",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentScheduleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Disable",
        "operationId": "AgentScheduleController_disable",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "remove",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/schedule/resume": {
      "post": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Resume",
        "operationId": "AgentScheduleController_resume",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/schedule/run-now": {
      "post": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Run now",
        "operationId": "AgentScheduleController_runNow",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentScheduleRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/schedule/runs": {
      "get": {
        "tags": [
          "AgentSchedule"
        ],
        "summary": "Runs",
        "operationId": "AgentScheduleController_runs",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentScheduleRunResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/semantic-response-caching": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set semantic response caching enabled",
        "operationId": "AgentController_setSemanticResponseCachingEnabled",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentResponseCachingToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/export": {
      "get": {
        "tags": [
          "ChatExport"
        ],
        "summary": "Export",
        "operationId": "ChatExportController_export",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Download one chat session as a file (format=md|json|txt). Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Additionally requires the CHAT_EXPORT_ENABLED feature flag (app.chat-export.enabled); when it is off this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/llm-requests": {
      "get": {
        "tags": [
          "AgentSessionLlmRequest"
        ],
        "summary": "Requests",
        "operationId": "AgentSessionLlmRequestController_requests",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LlmRequestSnapshot"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/llm-usage": {
      "get": {
        "tags": [
          "AgentSessionLlmUsage"
        ],
        "summary": "Calls",
        "operationId": "AgentSessionLlmUsageController_calls",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentSessionLlmUsageController_SessionLlmCallEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/llm-usage/summary": {
      "get": {
        "tags": [
          "AgentSessionLlmUsage"
        ],
        "summary": "Summary",
        "operationId": "AgentSessionLlmUsageController_summary",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCostTimeline_Summary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/messages": {
      "get": {
        "tags": [
          "ChatBranch"
        ],
        "summary": "Messages",
        "operationId": "ChatBranchController_messages",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "active"
            }
          }
        ],
        "description": "The branch of the conversation currently shown and replayed to the model (branch=active is the only supported view). Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Requires the APP_CHAT_BRANCHING_ENABLED feature flag (app.chat.branching.enabled); when it is off this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatBranchDtos_ActivePathResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/messages/active-leaf": {
      "put": {
        "tags": [
          "ChatBranch"
        ],
        "summary": "Switch active leaf",
        "operationId": "ChatBranchController_switchActiveLeaf",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatBranchDtos_SwitchLeafRequest"
              }
            }
          }
        },
        "description": "Switch the conversation to another branch: the server lands on the newest leaf beneath the given message. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Requires the APP_CHAT_BRANCHING_ENABLED feature flag (app.chat.branching.enabled); when it is off this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatBranchDtos_ActivePathResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/messages/{messageId}/edit": {
      "post": {
        "tags": [
          "ChatBranch"
        ],
        "summary": "Edit",
        "operationId": "ChatBranchController_edit",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatBranchDtos_EditRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Replace the text of an earlier user message on a new branch and stream the new reply; the original branch is kept. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Requires the APP_CHAT_BRANCHING_ENABLED feature flag (app.chat.branching.enabled); when it is off this route answers 404. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/messages/{messageId}/regenerate": {
      "post": {
        "tags": [
          "ChatBranch"
        ],
        "summary": "Regenerate",
        "operationId": "ChatBranchController_regenerate",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatBranchDtos_RegenerateRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Produce another answer to the same user message and stream it; the previous answer is kept as a sibling. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Requires the APP_CHAT_BRANCHING_ENABLED feature flag (app.chat.branching.enabled); when it is off this route answers 404. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/messages/{messageId}/siblings": {
      "get": {
        "tags": [
          "ChatBranch"
        ],
        "summary": "Siblings",
        "operationId": "ChatBranchController_siblings",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "The versions of one message, in order, with the position of this one. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404. Requires the APP_CHAT_BRANCHING_ENABLED feature flag (app.chat.branching.enabled); when it is off this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatBranchDtos_SiblingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/sessions/{sessionId}/transcript": {
      "get": {
        "tags": [
          "ChatTranscript"
        ],
        "summary": "Transcript",
        "operationId": "ChatTranscriptController_transcript",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Reload one chat session as a structured transcript. Readable and changeable only by the caller who started the session: session memory is keyed by tenant + agent + user + client session id, so the same session id presented by any other caller resolves to nothing and answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatTranscriptService_Transcript"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/settings/history": {
      "get": {
        "tags": [
          "AgentSettings"
        ],
        "summary": "History",
        "operationId": "AgentSettingsController_history",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "description": "Every change to this agent's settings, newest first (EDITOR on the agent; an agent of another workspace is a 404). since keeps rows at or after that instant; page with limit and offset.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_HistoryPageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/settings/{key}": {
      "put": {
        "tags": [
          "AgentSettings"
        ],
        "summary": "Put",
        "operationId": "AgentSettingsController_put",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsController_ValueRequest"
              }
            }
          }
        },
        "description": "Set a runtime setting for one agent (EDITOR on the agent; a security key also needs a tenant admin). Same body and rules as the workspace PUT. Answers 409 SETTING_LOCKED when the key is pinned and 409 SETTING_CONFLICT when another writer changed it at the same moment.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_WriteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AgentSettings"
        ],
        "summary": "Delete",
        "operationId": "AgentSettingsController_delete",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Remove the agent's override so the workspace value applies again. A high or security key needs a typed reason (?reason=). Answers 409 SETTING_LOCKED when the key is pinned and 409 SETTING_CONFLICT when another writer changed it at the same moment.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_WriteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/share": {
      "get": {
        "tags": [
          "AgentShareOwner"
        ],
        "summary": "Status",
        "operationId": "AgentShareOwnerController_status",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentShareOwnerController_ShareStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "AgentShareOwner"
        ],
        "summary": "Create",
        "operationId": "AgentShareOwnerController_create",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentShareOwnerController_ShareStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AgentShareOwner"
        ],
        "summary": "Revoke",
        "operationId": "AgentShareOwnerController_revoke",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/share-memory": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set share memory with tenant",
        "operationId": "AgentController_setShareMemoryWithTenant",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentShareMemoryToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/skills": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Agent skills",
        "operationId": "SkillController_agentSkills",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_AgentSkillsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Skill"
        ],
        "summary": "Update agent skills",
        "operationId": "SkillController_updateAgentSkills",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillController_AgentSkillsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_AgentSkillsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/skills/distill": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Distill preview",
        "operationId": "SkillController_distillPreview",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillController_DistillPatternResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Skill"
        ],
        "summary": "Distill",
        "operationId": "SkillController_distill",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_DistillResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/specialties": {
      "get": {
        "tags": [
          "AgentSpecialty"
        ],
        "summary": "Get",
        "operationId": "AgentSpecialtyController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSpecialtyController_SpecialtiesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentSpecialty"
        ],
        "summary": "Put",
        "operationId": "AgentSpecialtyController_put",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentSpecialtyController_SpecialtiesRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSpecialtyController_SpecialtiesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/text-model": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update text model",
        "operationId": "AgentController_updateTextModel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTextModelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tier": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Apply tier",
        "operationId": "AgentController_applyTier",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTierUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tool-access": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set tool access",
        "operationId": "AgentController_setToolAccess",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentToolAccessUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tool-access/trifecta": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Tool access trifecta",
        "operationId": "AgentController_toolAccessTrifecta",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrifectaStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tool-calls": {
      "get": {
        "tags": [
          "AgentChatSession"
        ],
        "summary": "Tool calls",
        "operationId": "AgentChatSessionController_toolCalls",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentChatSessionController_ToolCallLogView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tool-policies": {
      "get": {
        "tags": [
          "ToolArgPolicy"
        ],
        "summary": "Get",
        "operationId": "ToolArgPolicyController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolArgPolicyDtos_PoliciesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "ToolArgPolicy"
        ],
        "summary": "Put",
        "operationId": "ToolArgPolicyController_put",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolArgPolicyDtos_PoliciesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/triggers": {
      "get": {
        "tags": [
          "AgentEventTrigger"
        ],
        "summary": "List",
        "operationId": "AgentEventTriggerController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentEventTriggerResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentEventTrigger"
        ],
        "summary": "Upsert",
        "operationId": "AgentEventTriggerController_upsert",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEventTriggerRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEventTriggerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/triggers/event-types": {
      "get": {
        "tags": [
          "AgentEventTrigger"
        ],
        "summary": "Event types",
        "operationId": "AgentEventTriggerController_eventTypes",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/triggers/{triggerId}": {
      "delete": {
        "tags": [
          "AgentEventTrigger"
        ],
        "summary": "Disable",
        "operationId": "AgentEventTriggerController_disable",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEventTriggerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tts-model": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update tts model",
        "operationId": "AgentController_updateTtsModel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTtsModelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/tuning-mode": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Set tuning mode",
        "operationId": "AgentController_setTuningMode",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTuningModeUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/turn-journal": {
      "get": {
        "tags": [
          "TurnJournal"
        ],
        "summary": "By session",
        "operationId": "TurnJournalController_bySession",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnJournalService_SessionView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/turns/feedback": {
      "post": {
        "tags": [
          "RlFeedback"
        ],
        "summary": "Submit",
        "operationId": "RlFeedbackController_submit",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TurnFeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/turns/{turnId}/journal": {
      "get": {
        "tags": [
          "TurnJournal"
        ],
        "summary": "Get",
        "operationId": "TurnJournalController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "turnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurnJournalService_JournalView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions": {
      "get": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "List",
        "operationId": "AgentVersionController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentVersionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Publish",
        "operationId": "AgentVersionController_publish",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVersionPublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPublishResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/diff": {
      "get": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Diff",
        "operationId": "AgentVersionController_diff",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/rollback": {
      "post": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Rollback",
        "operationId": "AgentVersionController_rollback",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/{versionId}": {
      "get": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Get",
        "operationId": "AgentVersionController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/{versionId}/label": {
      "put": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Set label",
        "operationId": "AgentVersionController_setLabel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVersionLabelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/{versionId}/promote": {
      "post": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Promote",
        "operationId": "AgentVersionController_promote",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVersionPromoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/versions/{versionId}/restore": {
      "post": {
        "tags": [
          "AgentVersion"
        ],
        "summary": "Restore",
        "operationId": "AgentVersionController_restore",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/video-model": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update video model",
        "operationId": "AgentController_updateVideoModel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVideoModelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/voice-model": {
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Update voice model",
        "operationId": "AgentController_updateVoiceModel",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVoiceModelUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/x402/offers": {
      "get": {
        "tags": [
          "X402Offer"
        ],
        "summary": "List",
        "operationId": "X402OfferController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "X402Offer"
        ],
        "summary": "Create",
        "operationId": "X402OfferController_create",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/X402OfferController_CreateOfferRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/agents/{agentId}/x402/offers/{offerId}/disable": {
      "post": {
        "tags": [
          "X402Offer"
        ],
        "summary": "Disable",
        "operationId": "X402OfferController_disable",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "offerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/ai-reports": {
      "post": {
        "tags": [
          "AiContentReport"
        ],
        "summary": "Submit",
        "operationId": "AiContentReportController_submit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiContentReportRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/ambient/digest": {
      "get": {
        "tags": [
          "AmbientDigest"
        ],
        "summary": "Digest",
        "operationId": "AmbientDigestController_digest",
        "parameters": [
          {
            "name": "sinceHours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AmbientDigestController_AmbientDigestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/approvals": {
      "get": {
        "tags": [
          "Approval"
        ],
        "summary": "List",
        "operationId": "ApprovalController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ApprovalStatus"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApprovalRequestResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/approvals/policy/{actionType}": {
      "put": {
        "tags": [
          "Approval"
        ],
        "summary": "Set policy",
        "operationId": "ApprovalController_setPolicy",
        "parameters": [
          {
            "name": "actionType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalPolicyUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_APPROVALS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_APPROVALS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/approvals/{id}": {
      "get": {
        "tags": [
          "Approval"
        ],
        "summary": "Get",
        "operationId": "ApprovalController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalRequestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/approvals/{id}/approve": {
      "post": {
        "tags": [
          "Approval"
        ],
        "summary": "Approve",
        "operationId": "ApprovalController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalRequestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/approvals/{id}/reject": {
      "post": {
        "tags": [
          "Approval"
        ],
        "summary": "Reject",
        "operationId": "ApprovalController_reject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalRequestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assist/code-edit": {
      "post": {
        "tags": [
          "Assist"
        ],
        "summary": "Code edit",
        "operationId": "AssistController_codeEdit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistCodeEditRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssistResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assist/draft": {
      "post": {
        "tags": [
          "Assist"
        ],
        "summary": "Draft",
        "operationId": "AssistController_draft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssistRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssistResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assistant/workspace": {
      "get": {
        "tags": [
          "WorkspaceFolder"
        ],
        "summary": "Workspace",
        "operationId": "WorkspaceFolderController_workspace",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceFolderController_WorkspaceResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assistant/workspace/files": {
      "post": {
        "tags": [
          "WorkspaceFolder"
        ],
        "summary": "Upload",
        "operationId": "WorkspaceFolderController_upload",
        "parameters": [
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assistant/workspace/folders": {
      "post": {
        "tags": [
          "WorkspaceFolder"
        ],
        "summary": "Create folder",
        "operationId": "WorkspaceFolderController_createFolder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceFolderController_CreateFolderRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assistant/workspace/previews": {
      "get": {
        "tags": [
          "WorkspaceFolder"
        ],
        "summary": "Previews",
        "operationId": "WorkspaceFolderController_previews",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceFolderController_PreviewEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/assistant/workspace/previews/{port}": {
      "delete": {
        "tags": [
          "WorkspaceFolder"
        ],
        "summary": "Stop preview",
        "operationId": "WorkspaceFolderController_stopPreview",
        "parameters": [
          {
            "name": "port",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log": {
      "get": {
        "tags": [
          "AuditLog"
        ],
        "summary": "List",
        "operationId": "AuditLogController_list",
        "parameters": [
          {
            "name": "actionType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "actor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "The tenant's audit trail, newest first, filtered by actionType, targetType, actor, q and a from/to window. Without limit or offset: the newest 200. With limit: a page with X-Total-Count; follow X-Next-Cursor with cursor for deep history. Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role). Keyset paging: pass the X-Next-Cursor value of a page as cursor to get the next one; offset is ignored and X-Total-Count is not sent when cursor is given.",
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Next-Cursor": {
                "$ref": "#/components/headers/X-Next-Cursor"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuditLogEntryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log/action-types": {
      "get": {
        "tags": [
          "AuditLog"
        ],
        "summary": "Action types",
        "operationId": "AuditLogController_actionTypes",
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log/counts": {
      "get": {
        "tags": [
          "AuditLog"
        ],
        "summary": "Counts",
        "operationId": "AuditLogController_counts",
        "parameters": [
          {
            "name": "actionType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "detailContains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogCountsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log/export": {
      "get": {
        "tags": [
          "AuditSeal"
        ],
        "summary": "Export",
        "operationId": "AuditSealController_export",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditSealDtos_ExportBundle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log/seals": {
      "get": {
        "tags": [
          "AuditSeal"
        ],
        "summary": "Seals",
        "operationId": "AuditSealController_seals",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditSealDtos_SealPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/audit-log/verify": {
      "get": {
        "tags": [
          "AuditSeal"
        ],
        "summary": "Verify",
        "operationId": "AuditSealController_verify",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_AUDIT_LOG"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_AUDIT_LOG (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditSealVerifier_Result"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/change-password": {
      "post": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Change password",
        "operationId": "LocalAuthController_changePassword",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalAuthController_ChangePasswordRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/config": {
      "get": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Config",
        "operationId": "LocalAuthController_config",
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_ConfigResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/login": {
      "post": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Login",
        "operationId": "LocalAuthController_login",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalAuthController_LoginRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/logout": {
      "post": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Logout",
        "operationId": "LocalAuthController_logout",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalAuthController_RefreshRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/refresh": {
      "post": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Refresh",
        "operationId": "LocalAuthController_refresh",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalAuthController_RefreshRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/setup": {
      "post": {
        "tags": [
          "LocalAuth"
        ],
        "summary": "Setup",
        "operationId": "LocalAuthController_setup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalAuthController_SetupRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/devices": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Enrol device",
        "operationId": "LocalUnlockController_enrolDevice",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalUnlockController_DeviceRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalDevices_Enrolled"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/devices/{id}": {
      "delete": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Remove device",
        "operationId": "LocalUnlockController_removeDevice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/login": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Login",
        "operationId": "LocalUnlockController_login",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalUnlockController_UnlockLoginRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/methods": {
      "get": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Methods",
        "operationId": "LocalUnlockController_methods",
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalUnlockService_Methods"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/passkey/login-options": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Login options",
        "operationId": "LocalUnlockController_loginOptions",
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalPasskeyService_Options"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/passkey/register": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Register",
        "operationId": "LocalUnlockController_register",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalUnlockController_RegisterRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalUnlockController_RegisterResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/passkey/register-options": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Register options",
        "operationId": "LocalUnlockController_registerOptions",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalUnlockController_RegisterOptionsRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalPasskeyService_Options"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/passkeys/{id}": {
      "delete": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Remove passkey",
        "operationId": "LocalUnlockController_removePasskey",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/recovery-codes": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Recovery codes",
        "operationId": "LocalUnlockController_recoveryCodes",
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalUnlockController_CodesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/local/unlock/setup/pin": {
      "post": {
        "tags": [
          "LocalUnlock"
        ],
        "summary": "Setup with pin",
        "operationId": "LocalUnlockController_setupWithPin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalUnlockController_SetupPinRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.auth.mode=local",
        "description": "Only available when the feature flag app.auth.mode=local is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalUnlockController_SetupPinResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/auth/social-providers": {
      "get": {
        "tags": [
          "SocialAuthConfig"
        ],
        "summary": "Social providers",
        "operationId": "SocialAuthConfigController_socialProviders",
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProvidersResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/billing/checkout/close-upi-qr/{qrCodeId}": {
      "post": {
        "tags": [
          "RazorpayCheckout"
        ],
        "summary": "Close upi qr",
        "operationId": "RazorpayCheckoutController_closeUpiQr",
        "parameters": [
          {
            "name": "qrCodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RazorpayCheckoutController_CloseUpiQrResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/checkout/create-order": {
      "post": {
        "tags": [
          "PaymentCheckout"
        ],
        "summary": "Create order",
        "operationId": "PaymentCheckoutController_createOrder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCheckoutController_CreateOrderRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCheckoutController_CreateOrderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/checkout/create-upi-collect": {
      "post": {
        "tags": [
          "RazorpayCheckout"
        ],
        "summary": "Create upi collect",
        "operationId": "RazorpayCheckoutController_createUpiCollect",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RazorpayCheckoutController_CreateUpiCollectRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RazorpayCheckoutController_CreateUpiCollectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/checkout/create-upi-qr": {
      "post": {
        "tags": [
          "RazorpayCheckout"
        ],
        "summary": "Create upi qr",
        "operationId": "RazorpayCheckoutController_createUpiQr",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RazorpayCheckoutController_CreateUpiQrRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RazorpayCheckoutController_CreateUpiQrResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/checkout/verify-payment": {
      "post": {
        "tags": [
          "PaymentCheckout"
        ],
        "summary": "Verify payment",
        "operationId": "PaymentCheckoutController_verifyPayment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCheckoutController_VerifyPaymentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCheckoutController_VerifyPaymentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/gateways": {
      "get": {
        "tags": [
          "PaymentCheckout"
        ],
        "summary": "Gateways",
        "operationId": "PaymentCheckoutController_gateways",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentCheckoutController_GatewayListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/billing/webhook/{gateway}": {
      "post": {
        "tags": [
          "BillingWebhook"
        ],
        "summary": "Handle webhook",
        "operationId": "BillingWebhookController_handleWebhook",
        "parameters": [
          {
            "name": "gateway",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/briefs": {
      "get": {
        "tags": [
          "Brief"
        ],
        "summary": "List",
        "operationId": "BriefController_list",
        "parameters": [
          {
            "name": "entityId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BriefDtos_ListItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Brief"
        ],
        "summary": "Create",
        "operationId": "BriefController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BriefDtos_BriefRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefDtos_CreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/plan": {
      "post": {
        "tags": [
          "Brief"
        ],
        "summary": "Plan",
        "operationId": "BriefController_plan",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefDtos_PlanResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}": {
      "get": {
        "tags": [
          "Brief"
        ],
        "summary": "Get",
        "operationId": "BriefController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefDtos_Detail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Brief"
        ],
        "summary": "Update",
        "operationId": "BriefController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BriefDtos_BriefRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefDtos_UpdateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Brief"
        ],
        "summary": "Delete",
        "operationId": "BriefController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "purgeEntities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BriefDtos_DeleteRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/apply": {
      "post": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Apply",
        "operationId": "BriefLifecycleController_apply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyDtos_ApplyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "allOf": [
            "PERM_MANAGE_AGENTS",
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires both PERM_MANAGE_AGENTS and PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/apply/{jobId}": {
      "get": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Job",
        "operationId": "BriefLifecycleController_job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyDtos_ApplyResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/experiments": {
      "post": {
        "tags": [
          "BriefProof"
        ],
        "summary": "Experiment",
        "operationId": "BriefProofController_experiment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LedgerDtos_ExperimentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerDtos_ExperimentStarted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/ledger": {
      "get": {
        "tags": [
          "BriefProof"
        ],
        "summary": "Ledger",
        "operationId": "BriefProofController_ledger",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerDtos_Ledger"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/readiness": {
      "post": {
        "tags": [
          "Brief"
        ],
        "summary": "Readiness",
        "operationId": "BriefController_readiness",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BriefDtos_ReadinessResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/rehearsals": {
      "get": {
        "tags": [
          "BriefProof"
        ],
        "summary": "Rehearsals",
        "operationId": "BriefProofController_rehearsals",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LedgerDtos_RehearsalView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/rehearse": {
      "post": {
        "tags": [
          "BriefProof"
        ],
        "summary": "Rehearse",
        "operationId": "BriefProofController_rehearse",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerDtos_RehearsalStarted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/trust/proposal": {
      "post": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Proposal",
        "operationId": "BriefLifecycleController_proposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Restricted to tenant-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrustDtos_TrustProposal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/trust/{rung}": {
      "post": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Set rung",
        "operationId": "BriefLifecycleController_setRung",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "rung",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Restricted to tenant-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrustDtos_TrustChange"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/tune": {
      "post": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Tune",
        "operationId": "BriefLifecycleController_tune",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyDtos_TuneRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyDtos_TuneResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/versions": {
      "get": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Versions",
        "operationId": "BriefLifecycleController_versions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BriefDtos_VersionSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/versions/diff": {
      "get": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Diff",
        "operationId": "BriefLifecycleController_diff",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyDtos_VersionDiff"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/briefs/{id}/versions/{version}/rollback": {
      "post": {
        "tags": [
          "BriefLifecycle"
        ],
        "summary": "Rollback",
        "operationId": "BriefLifecycleController_rollback",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyDtos_RollbackRequest"
              }
            }
          }
        },
        "x-permissions": {
          "allOf": [
            "PERM_MANAGE_AGENTS",
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires both PERM_MANAGE_AGENTS and PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/automation/capabilities": {
      "get": {
        "tags": [
          "BrowserAutomation"
        ],
        "summary": "Capabilities",
        "operationId": "BrowserAutomationController_capabilities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_Capabilities"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/profiles": {
      "get": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "List",
        "operationId": "BrowserProfileController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BrowserAutomationDtos_ProfileView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Create",
        "operationId": "BrowserProfileController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserAutomationDtos_CreateProfileRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_ProfileView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/profiles/{id}": {
      "delete": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Delete",
        "operationId": "BrowserProfileController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Update",
        "operationId": "BrowserProfileController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserAutomationDtos_UpdateProfileRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_ProfileView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/profiles/{id}/agents/{agentId}": {
      "put": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Attach",
        "operationId": "BrowserProfileController_attach",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_ProfileView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Detach",
        "operationId": "BrowserProfileController_detach",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/profiles/{id}/clear-state": {
      "post": {
        "tags": [
          "BrowserProfile"
        ],
        "summary": "Clear state",
        "operationId": "BrowserProfileController_clearState",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/recipes": {
      "get": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "List",
        "operationId": "BrowserRecipeController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "Create",
        "operationId": "BrowserRecipeController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserAutomationDtos_CreateRecipeRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/recipes/from-run": {
      "post": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "From run",
        "operationId": "BrowserRecipeController_fromRun",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeFromRunRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/recipes/{id}": {
      "get": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "Get",
        "operationId": "BrowserRecipeController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "Delete",
        "operationId": "BrowserRecipeController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "BrowserRecipe"
        ],
        "summary": "Update",
        "operationId": "BrowserRecipeController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserAutomationDtos_UpdateRecipeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/capabilities": {
      "get": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Capabilities",
        "operationId": "BrowserTakeoverController_capabilities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/pause": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Pause",
        "operationId": "BrowserTakeoverController_pause",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserTakeoverDtos_SessionRef"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserTakeoverDtos_View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/status": {
      "get": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Status",
        "operationId": "BrowserTakeoverController_status",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/begin": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Begin",
        "operationId": "BrowserTakeoverController_begin",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserTakeoverDtos_Begin"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/cancel": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Cancel",
        "operationId": "BrowserTakeoverController_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserTakeoverDtos_View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/hand-back": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Hand back",
        "operationId": "BrowserTakeoverController_handBack",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserTakeoverDtos_View"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/input": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Input",
        "operationId": "BrowserTakeoverController_input",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Takeover-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowserTakeoverDtos_InputEvent"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/stream": {
      "get": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Stream",
        "operationId": "BrowserTakeoverController_stream",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Takeover-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/browser/takeover/{id}/token": {
      "post": {
        "tags": [
          "BrowserTakeover"
        ],
        "summary": "Token",
        "operationId": "BrowserTakeoverController_token",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrowserTakeoverDtos_TokenRefresh"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/budget/top-up": {
      "post": {
        "tags": [
          "BudgetTopUp"
        ],
        "summary": "Purchase",
        "operationId": "BudgetTopUpController_purchase",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetTopUpPurchaseRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetTopUpPurchaseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/budget/top-up/confirm": {
      "post": {
        "tags": [
          "BudgetTopUp"
        ],
        "summary": "Confirm",
        "operationId": "BudgetTopUpController_confirm",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetTopUpConfirmRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetTopUpConfirmResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/budget/top-up/options": {
      "get": {
        "tags": [
          "BudgetTopUp"
        ],
        "summary": "Options",
        "operationId": "BudgetTopUpController_options",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BudgetTopUpOptionsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities": {
      "get": {
        "tags": [
          "Capability"
        ],
        "summary": "Catalog",
        "operationId": "CapabilityController_catalog",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CapabilityController_CapabilityDescriptor"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities/decision/playground": {
      "post": {
        "tags": [
          "DecisionCapability"
        ],
        "summary": "Playground",
        "operationId": "DecisionCapabilityController_playground",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionPlaygroundRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities/decision/status": {
      "get": {
        "tags": [
          "DecisionCapability"
        ],
        "summary": "Status",
        "operationId": "DecisionCapabilityController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities/{capability}/credential": {
      "post": {
        "tags": [
          "Capability"
        ],
        "summary": "Activate",
        "operationId": "CapabilityController_activate",
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapabilityCredentialRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Capability"
        ],
        "summary": "Deactivate",
        "operationId": "CapabilityController_deactivate",
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities/{capability}/credential/status": {
      "get": {
        "tags": [
          "Capability"
        ],
        "summary": "Credential status",
        "operationId": "CapabilityController_credentialStatus",
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/capabilities/{capability}/policy": {
      "get": {
        "tags": [
          "Capability"
        ],
        "summary": "Policy",
        "operationId": "CapabilityController_policy",
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilityPolicyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Capability"
        ],
        "summary": "Update policy",
        "operationId": "CapabilityController_updatePolicy",
        "parameters": [
          {
            "name": "capability",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilityPolicyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contact-groups": {
      "get": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "List groups",
        "operationId": "ChannelContactController_listGroups",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelContactController_GroupResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Create group",
        "operationId": "ChannelContactController_createGroup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelContactController_GroupRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactController_GroupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contact-groups/{id}": {
      "put": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Update group",
        "operationId": "ChannelContactController_updateGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelContactController_GroupRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactController_GroupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Delete group",
        "operationId": "ChannelContactController_deleteGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contacts": {
      "get": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "List",
        "operationId": "ChannelContactController_list",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelContactController_ContactResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Create",
        "operationId": "ChannelContactController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelContactController_ContactRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactController_ContactResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contacts/import": {
      "post": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Import file",
        "operationId": "ChannelContactController_importFile",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactService_ImportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contacts/import-rows": {
      "post": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Import rows",
        "operationId": "ChannelContactController_importRows",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelContactController_ImportRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactService_ImportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/contacts/{id}": {
      "put": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Update",
        "operationId": "ChannelContactController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelContactController_ContactUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelContactController_ContactResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ChannelContact"
        ],
        "summary": "Delete",
        "operationId": "ChannelContactController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/discord/credential": {
      "get": {
        "tags": [
          "DiscordCredential"
        ],
        "summary": "Current",
        "operationId": "DiscordCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "DiscordCredential"
        ],
        "summary": "Activate",
        "operationId": "DiscordCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "DiscordCredential"
        ],
        "summary": "Disconnect",
        "operationId": "DiscordCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/discord/default-agent": {
      "put": {
        "tags": [
          "DiscordSend"
        ],
        "summary": "Set default agent",
        "operationId": "DiscordSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/discord/send": {
      "post": {
        "tags": [
          "DiscordSend"
        ],
        "summary": "Send",
        "operationId": "DiscordSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/jobs/{jobId}/fail": {
      "post": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Fail",
        "operationId": "EdgeRelayController_fail",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdgeRelayController_FailRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/jobs/{jobId}/reply": {
      "post": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Reply",
        "operationId": "EdgeRelayController_reply",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdgeRelayController_ReplyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/register": {
      "post": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Register",
        "operationId": "EdgeRelayController_register",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdgeRelayController_RegisterRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeRelayController_RegisterResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/status": {
      "get": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Status",
        "operationId": "EdgeRelayController_status",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeRelayController_StatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/{relayId}": {
      "delete": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Unregister",
        "operationId": "EdgeRelayController_unregister",
        "parameters": [
          {
            "name": "relayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/{relayId}/heartbeat": {
      "post": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Heartbeat",
        "operationId": "EdgeRelayController_heartbeat",
        "parameters": [
          {
            "name": "relayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/edge-relay/{relayId}/next": {
      "get": {
        "tags": [
          "EdgeRelay"
        ],
        "summary": "Next",
        "operationId": "EdgeRelayController_next",
        "parameters": [
          {
            "name": "relayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelayJob"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/email/credential": {
      "get": {
        "tags": [
          "EmailCredential"
        ],
        "summary": "Current",
        "operationId": "EmailCredentialController_current",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "EmailCredential"
        ],
        "summary": "Activate",
        "operationId": "EmailCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "EmailCredential"
        ],
        "summary": "Disconnect",
        "operationId": "EmailCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/email/default-agent": {
      "put": {
        "tags": [
          "EmailSend"
        ],
        "summary": "Set default agent",
        "operationId": "EmailSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/email/send": {
      "post": {
        "tags": [
          "EmailSend"
        ],
        "summary": "Send",
        "operationId": "EmailSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/authorize-url": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Authorize url",
        "operationId": "GoogleOAuthController_authorizeUrl",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleOAuthController_AuthorizeUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/connection": {
      "delete": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Disconnect",
        "operationId": "GoogleOAuthController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/oauth-config": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Oauth config",
        "operationId": "GoogleOAuthController_oauthConfig",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/personal/authorize-url": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Personal authorize url",
        "operationId": "GoogleOAuthController_personalAuthorizeUrl",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleOAuthController_AuthorizeUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/personal/connection": {
      "delete": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Disconnect personal",
        "operationId": "GoogleOAuthController_disconnectPersonal",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/status": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Status",
        "operationId": "GoogleOAuthController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleConnectionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/google/youtube-upload/authorize-url": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Youtube upload authorize url",
        "operationId": "GoogleOAuthController_youtubeUploadAuthorizeUrl",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleOAuthController_AuthorizeUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/health/{key}": {
      "post": {
        "tags": [
          "ChannelHealth"
        ],
        "summary": "Check",
        "operationId": "ChannelHealthController_check",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelHealthController_ChannelHealthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/imessage/credential": {
      "get": {
        "tags": [
          "ImessageCredential"
        ],
        "summary": "Current",
        "operationId": "ImessageCredentialController_current",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImessageCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ImessageCredential"
        ],
        "summary": "Activate",
        "operationId": "ImessageCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImessageActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImessageCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ImessageCredential"
        ],
        "summary": "Disconnect",
        "operationId": "ImessageCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/imessage/credential/settings": {
      "put": {
        "tags": [
          "ImessageCredential"
        ],
        "summary": "Update settings",
        "operationId": "ImessageCredentialController_updateSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImessageSettingsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImessageCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/imessage/default-agent": {
      "put": {
        "tags": [
          "ImessageSend"
        ],
        "summary": "Set default agent",
        "operationId": "ImessageSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/imessage/send": {
      "post": {
        "tags": [
          "ImessageSend"
        ],
        "summary": "Send",
        "operationId": "ImessageSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImessageSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImessageSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/matrix/credential": {
      "get": {
        "tags": [
          "Matrix"
        ],
        "summary": "Current",
        "operationId": "MatrixController_current",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Matrix"
        ],
        "summary": "Activate",
        "operationId": "MatrixController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatrixActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Matrix"
        ],
        "summary": "Disconnect",
        "operationId": "MatrixController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/matrix/default-agent": {
      "put": {
        "tags": [
          "Matrix"
        ],
        "summary": "Set default agent",
        "operationId": "MatrixController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/matrix/policy": {
      "put": {
        "tags": [
          "Matrix"
        ],
        "summary": "Update policy",
        "operationId": "MatrixController_updatePolicy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatrixPolicyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/matrix/send": {
      "post": {
        "tags": [
          "Matrix"
        ],
        "summary": "Send",
        "operationId": "MatrixController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatrixController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/meta-social/credential": {
      "get": {
        "tags": [
          "MetaSocialCredential"
        ],
        "summary": "Current",
        "operationId": "MetaSocialCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaSocialCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "MetaSocialCredential"
        ],
        "summary": "Activate",
        "operationId": "MetaSocialCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetaSocialActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaSocialCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "MetaSocialCredential"
        ],
        "summary": "Disconnect",
        "operationId": "MetaSocialCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/meta-whatsapp/credential": {
      "get": {
        "tags": [
          "MetaWhatsAppCredential"
        ],
        "summary": "Current",
        "operationId": "MetaWhatsAppCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "MetaWhatsAppCredential"
        ],
        "summary": "Activate",
        "operationId": "MetaWhatsAppCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetaActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "MetaWhatsAppCredential"
        ],
        "summary": "Disconnect",
        "operationId": "MetaWhatsAppCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/meta-whatsapp/embedded-signup/config": {
      "get": {
        "tags": [
          "MetaEmbeddedSignup"
        ],
        "summary": "Config",
        "operationId": "MetaEmbeddedSignupController_config",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddedSignupConfigResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/meta-whatsapp/embedded-signup/exchange": {
      "post": {
        "tags": [
          "MetaEmbeddedSignup"
        ],
        "summary": "Exchange",
        "operationId": "MetaEmbeddedSignupController_exchange",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddedSignupExchangeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/erase-subject": {
      "post": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Erase subject",
        "operationId": "ChannelPairingController_eraseSubject",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelPairingController_EraseSubjectRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/pending": {
      "get": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Pending",
        "operationId": "ChannelPairingController_pending",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelPairingController_PendingPairingResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/{sessionId}": {
      "delete": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Reject",
        "operationId": "ChannelPairingController_reject",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/{sessionId}/agent": {
      "put": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Rebind agent",
        "operationId": "ChannelPairingController_rebindAgent",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelPairingController_RebindAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/{sessionId}/approve": {
      "post": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Approve",
        "operationId": "ChannelPairingController_approve",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPairingController_PendingPairingResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/pairing/{sessionId}/unpair": {
      "post": {
        "tags": [
          "ChannelPairing"
        ],
        "summary": "Unpair",
        "operationId": "ChannelPairingController_unpair",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPairingController_PendingPairingResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/routing": {
      "get": {
        "tags": [
          "ChannelRouting"
        ],
        "summary": "List",
        "operationId": "ChannelRoutingController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelRoutingController_RoutingResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/routing/{channel}": {
      "put": {
        "tags": [
          "ChannelRouting"
        ],
        "summary": "Set",
        "operationId": "ChannelRoutingController_set",
        "parameters": [
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelRoutingController_RoutingRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelRoutingController_RoutingResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/signal/credential": {
      "get": {
        "tags": [
          "SignalCredential"
        ],
        "summary": "Current",
        "operationId": "SignalCredentialController_current",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "SignalCredential"
        ],
        "summary": "Activate",
        "operationId": "SignalCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "SignalCredential"
        ],
        "summary": "Disconnect",
        "operationId": "SignalCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/signal/credential/policy": {
      "put": {
        "tags": [
          "SignalCredential"
        ],
        "summary": "Update policy",
        "operationId": "SignalCredentialController_updatePolicy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalPolicyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/signal/default-agent": {
      "put": {
        "tags": [
          "SignalSend"
        ],
        "summary": "Set default agent",
        "operationId": "SignalSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/signal/send": {
      "post": {
        "tags": [
          "SignalSend"
        ],
        "summary": "Send",
        "operationId": "SignalSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/slack/credential": {
      "get": {
        "tags": [
          "SlackCredential"
        ],
        "summary": "Current",
        "operationId": "SlackCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "SlackCredential"
        ],
        "summary": "Activate",
        "operationId": "SlackCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "SlackCredential"
        ],
        "summary": "Disconnect",
        "operationId": "SlackCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/slack/default-agent": {
      "put": {
        "tags": [
          "SlackSend"
        ],
        "summary": "Set default agent",
        "operationId": "SlackSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/slack/send": {
      "post": {
        "tags": [
          "SlackSend"
        ],
        "summary": "Send",
        "operationId": "SlackSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlackSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/sms/default-agent": {
      "put": {
        "tags": [
          "SmsChannel"
        ],
        "summary": "Set default agent",
        "operationId": "SmsChannelController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/social/instagram/default-agent": {
      "put": {
        "tags": [
          "MetaSocialSend"
        ],
        "summary": "Set instagram default agent",
        "operationId": "MetaSocialSendController_setInstagramDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/social/instagram/send": {
      "post": {
        "tags": [
          "MetaSocialSend"
        ],
        "summary": "Send instagram",
        "operationId": "MetaSocialSendController_sendInstagram",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetaSocialSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaSocialSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/social/messenger/default-agent": {
      "put": {
        "tags": [
          "MetaSocialSend"
        ],
        "summary": "Set messenger default agent",
        "operationId": "MetaSocialSendController_setMessengerDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/social/messenger/send": {
      "post": {
        "tags": [
          "MetaSocialSend"
        ],
        "summary": "Send messenger",
        "operationId": "MetaSocialSendController_sendMessenger",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetaSocialSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaSocialSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/status": {
      "get": {
        "tags": [
          "ChannelStatus"
        ],
        "summary": "Status",
        "operationId": "ChannelStatusController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelStatusService_ChannelStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/teams/credential": {
      "get": {
        "tags": [
          "TeamsCredential"
        ],
        "summary": "Current",
        "operationId": "TeamsCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamsCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "TeamsCredential"
        ],
        "summary": "Activate",
        "operationId": "TeamsCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamsCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TeamsCredential"
        ],
        "summary": "Disconnect",
        "operationId": "TeamsCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/teams/default-agent": {
      "put": {
        "tags": [
          "TeamsSend"
        ],
        "summary": "Set default agent",
        "operationId": "TeamsSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/teams/send": {
      "post": {
        "tags": [
          "TeamsSend"
        ],
        "summary": "Send",
        "operationId": "TeamsSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamsSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamsSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/telegram/credential": {
      "get": {
        "tags": [
          "TelegramCredential"
        ],
        "summary": "Current",
        "operationId": "TelegramCredentialController_current",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "TelegramCredential"
        ],
        "summary": "Activate",
        "operationId": "TelegramCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelegramActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TelegramCredential"
        ],
        "summary": "Disconnect",
        "operationId": "TelegramCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/telegram/default-agent": {
      "put": {
        "tags": [
          "TelegramSend"
        ],
        "summary": "Set default agent",
        "operationId": "TelegramSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/telegram/send": {
      "post": {
        "tags": [
          "TelegramSend"
        ],
        "summary": "Send",
        "operationId": "TelegramSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TelegramSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/twilio/credential": {
      "get": {
        "tags": [
          "TwilioCredential"
        ],
        "summary": "Current",
        "operationId": "TwilioCredentialController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwilioCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "TwilioCredential"
        ],
        "summary": "Activate",
        "operationId": "TwilioCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TwilioActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwilioCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TwilioCredential"
        ],
        "summary": "Disconnect",
        "operationId": "TwilioCredentialController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/voice/default-agent": {
      "put": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "Set default agent",
        "operationId": "VoiceChannelController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/voice/dtmf-menu": {
      "get": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "List dtmf menu",
        "operationId": "VoiceChannelController_listDtmfMenu",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceDtmfMappingResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/voice/dtmf-menu/{digit}": {
      "put": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "Upsert dtmf menu entry",
        "operationId": "VoiceChannelController_upsertDtmfMenuEntry",
        "parameters": [
          {
            "name": "digit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceDtmfMappingUpsertRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceDtmfMappingResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "Delete dtmf menu entry",
        "operationId": "VoiceChannelController_deleteDtmfMenuEntry",
        "parameters": [
          {
            "name": "digit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/voice/numbers": {
      "get": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "List numbers",
        "operationId": "VoiceChannelController_listNumbers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VoiceNumberAgentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/voice/numbers/{number}": {
      "put": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "Upsert number",
        "operationId": "VoiceChannelController_upsertNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceNumberAgentUpsertRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceNumberAgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "VoiceChannel"
        ],
        "summary": "Delete number",
        "operationId": "VoiceChannelController_deleteNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-compliance/opt-in": {
      "get": {
        "tags": [
          "WhatsAppPolicy"
        ],
        "summary": "List opt ins",
        "operationId": "WhatsAppPolicyController_listOptIns",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "activeOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WhatsAppPolicyController_OptInListItemResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WhatsAppPolicy"
        ],
        "summary": "Record opt in",
        "operationId": "WhatsAppPolicyController_recordOptIn",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppPolicyController_OptInRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppPolicyController_OptInResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "WhatsAppPolicy"
        ],
        "summary": "Revoke opt in",
        "operationId": "WhatsAppPolicyController_revokeOptIn",
        "parameters": [
          {
            "name": "phone",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-compliance/quality": {
      "get": {
        "tags": [
          "WhatsAppPolicy"
        ],
        "summary": "Quality",
        "operationId": "WhatsAppPolicyController_quality",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppPolicyController_QualityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-compliance/tasks": {
      "get": {
        "tags": [
          "WhatsAppPolicy"
        ],
        "summary": "Tasks",
        "operationId": "WhatsAppPolicyController_tasks",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-qr/default-agent": {
      "put": {
        "tags": [
          "WhatsAppQr"
        ],
        "summary": "Set default agent",
        "operationId": "WhatsAppQrController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-qr/send": {
      "post": {
        "tags": [
          "WhatsAppQr"
        ],
        "summary": "Send",
        "operationId": "WhatsAppQrController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppQrController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppQrController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp-qr/session": {
      "get": {
        "tags": [
          "WhatsAppQr"
        ],
        "summary": "Status",
        "operationId": "WhatsAppQrController_status",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppQrStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WhatsAppQr"
        ],
        "summary": "Connect",
        "operationId": "WhatsAppQrController_connect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppQrStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "WhatsAppQr"
        ],
        "summary": "Disconnect",
        "operationId": "WhatsAppQrController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp/default-agent": {
      "put": {
        "tags": [
          "WhatsAppSend"
        ],
        "summary": "Set default agent",
        "operationId": "WhatsAppSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppSendController_WhatsAppDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp/send": {
      "post": {
        "tags": [
          "WhatsAppSend"
        ],
        "summary": "Send",
        "operationId": "WhatsAppSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsAppSendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsAppSendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/whatsapp/templates": {
      "get": {
        "tags": [
          "WhatsAppTemplate"
        ],
        "summary": "List",
        "operationId": "WhatsAppTemplateController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WhatsAppTemplateController_WhatsAppTemplateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/x/authorize-url": {
      "get": {
        "tags": [
          "XOAuth"
        ],
        "summary": "Authorize url",
        "operationId": "XOAuthController_authorizeUrl",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XOAuthController_AuthorizeUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/x/connection": {
      "delete": {
        "tags": [
          "XOAuth"
        ],
        "summary": "Disconnect",
        "operationId": "XOAuthController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/x/credential": {
      "get": {
        "tags": [
          "XOAuth"
        ],
        "summary": "Current",
        "operationId": "XOAuthController_current",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XConnectionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "XOAuth"
        ],
        "summary": "Register app",
        "operationId": "XOAuthController_registerApp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XAppRegistrationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XConnectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/x/default-agent": {
      "put": {
        "tags": [
          "XSend"
        ],
        "summary": "Set default agent",
        "operationId": "XSendController_setDefaultAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultAgentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/channels/x/send": {
      "post": {
        "tags": [
          "XSend"
        ],
        "summary": "Send",
        "operationId": "XSendController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/XSendController_SendRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XSendController_SendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import": {
      "post": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Import json",
        "operationId": "ChatImportController_importJson",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatPortDtos_JsonUpload"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatPortDtos_ImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/chats": {
      "get": {
        "tags": [
          "ChatImport"
        ],
        "summary": "List",
        "operationId": "ChatImportController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatPortDtos_ImportedSummary"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/chats/{id}": {
      "get": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Get",
        "operationId": "ChatImportController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatPortDtos_ImportedChatView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Delete",
        "operationId": "ChatImportController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/chats/{id}/export": {
      "get": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Export one",
        "operationId": "ChatImportController_exportOne",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/export": {
      "get": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Export all",
        "operationId": "ChatImportController_exportAll",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/features": {
      "get": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Features",
        "operationId": "ChatImportController_features",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatPortDtos_Features"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/memory-candidates": {
      "post": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Memory candidates",
        "operationId": "ChatImportController_memoryCandidates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatPortDtos_MemoryCandidatesRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryImportDtos_PreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat-import/preview": {
      "post": {
        "tags": [
          "ChatImport"
        ],
        "summary": "Preview json",
        "operationId": "ChatImportController_previewJson",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatPortDtos_JsonUpload"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatPortDtos_PreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat/threads": {
      "get": {
        "tags": [
          "ChatThread"
        ],
        "summary": "List",
        "operationId": "ChatThreadController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatBranchDtos_ThreadsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat/threads/{agentId}/{sessionId}": {
      "delete": {
        "tags": [
          "ChatThread"
        ],
        "summary": "Delete",
        "operationId": "ChatThreadController_delete",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat/turns/{turnId}": {
      "get": {
        "tags": [
          "ResumableChatTurn"
        ],
        "summary": "Snapshot",
        "operationId": "ResumableChatTurnController_snapshot",
        "parameters": [
          {
            "name": "turnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumableChatStreamService_TurnSnapshot"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat/turns/{turnId}/reply": {
      "get": {
        "tags": [
          "ResumableChatTurn"
        ],
        "summary": "Persisted reply",
        "operationId": "ResumableChatTurnController_persistedReply",
        "parameters": [
          {
            "name": "turnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResumableTurnReplyService_PersistedReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/chat/turns/{turnId}/stream": {
      "get": {
        "tags": [
          "ResumableChatTurn"
        ],
        "summary": "Stream",
        "operationId": "ResumableChatTurnController_stream",
        "parameters": [
          {
            "name": "turnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/approvals": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "List approvals",
        "operationId": "CodeIntelController_listApprovals",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/approvals/{approvalId}/resolve": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Resolve approval",
        "operationId": "CodeIntelController_resolveApproval",
        "parameters": [
          {
            "name": "approvalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/audit": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Audit",
        "operationId": "CodeIntelController_audit",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/health": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Health",
        "operationId": "CodeIntelController_health",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/knowledge/query": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Knowledge query",
        "operationId": "CodeIntelController_knowledgeQuery",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/policy": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Get policy",
        "operationId": "CodeIntelController_getPolicy",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Set policy",
        "operationId": "CodeIntelController_setPolicy",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "List repos",
        "operationId": "CodeIntelController_listRepos",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Register repo",
        "operationId": "CodeIntelController_registerRepo",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}": {
      "delete": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Delete repo",
        "operationId": "CodeIntelController_deleteRepo",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/agent/resolve": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Agent resolve",
        "operationId": "CodeIntelController_agentResolve",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/graph/build": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Graph build",
        "operationId": "CodeIntelController_graphBuild",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/graph/callees/{symbol}": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Callees",
        "operationId": "CodeIntelController_callees",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/graph/callers/{symbol}": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Callers",
        "operationId": "CodeIntelController_callers",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/graph/impact/{symbol}": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Impact",
        "operationId": "CodeIntelController_impact",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/graph/stats": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Graph stats",
        "operationId": "CodeIntelController_graphStats",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/index": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Index repo",
        "operationId": "CodeIntelController_indexRepo",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/search": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Search",
        "operationId": "CodeIntelController_search",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/status": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Repo status",
        "operationId": "CodeIntelController_repoStatus",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/workspaces": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Create workspace",
        "operationId": "CodeIntelController_createWorkspace",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/workspaces/{workspaceId}": {
      "delete": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Delete workspace",
        "operationId": "CodeIntelController_deleteWorkspace",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/workspaces/{workspaceId}/apply": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Apply",
        "operationId": "CodeIntelController_apply",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/workspaces/{workspaceId}/diff": {
      "get": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Diff workspace",
        "operationId": "CodeIntelController_diffWorkspace",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/code-intel/repos/{repoId}/workspaces/{workspaceId}/run": {
      "post": {
        "tags": [
          "CodeIntel"
        ],
        "summary": "Run",
        "operationId": "CodeIntelController_run",
        "parameters": [
          {
            "name": "repoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks": {
      "get": {
        "tags": [
          "CodingTask"
        ],
        "summary": "List",
        "operationId": "CodingTaskController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Start",
        "operationId": "CodingTaskController_start",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instruction",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "testCommand",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repoUrl",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxSteps",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "maxWallSeconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "maxTokens",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "maxFixIterations",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "archive": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/capabilities": {
      "get": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Capabilities",
        "operationId": "CodingTaskController_capabilities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_Capabilities"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}": {
      "get": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Get",
        "operationId": "CodingTaskController_get",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}/approve": {
      "post": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Approve",
        "operationId": "CodingTaskController_approve",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodingTaskDtos_ApproveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}/cancel": {
      "post": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Cancel",
        "operationId": "CodingTaskController_cancel",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_CancelResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}/diff": {
      "get": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Diff",
        "operationId": "CodingTaskController_diff",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_DiffResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}/reject": {
      "post": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Reject",
        "operationId": "CodingTaskController_reject",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/coding-tasks/{taskId}/rollback": {
      "post": {
        "tags": [
          "CodingTask"
        ],
        "summary": "Rollback",
        "operationId": "CodingTaskController_rollback",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodingTaskDtos_TaskView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/feed/{tenantId}": {
      "get": {
        "tags": [
          "ProductFeed"
        ],
        "summary": "Feed",
        "operationId": "ProductFeedController_feed",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/commerce/feed/{tenantId}/checkout": {
      "post": {
        "tags": [
          "ProductFeed"
        ],
        "summary": "Checkout",
        "operationId": "ProductFeedController_checkout",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductFeedController_FeedCheckoutRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductFeedController_FeedCheckoutResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/commerce/mandates": {
      "get": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "List",
        "operationId": "CommerceMandateController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/intent": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Create intent",
        "operationId": "CommerceMandateController_createIntent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommerceDtos_CreateIntentRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{cartId}/authorize": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Authorize",
        "operationId": "CommerceMandateController_authorize",
        "parameters": [
          {
            "name": "cartId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{cartId}/capture": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Capture",
        "operationId": "CommerceMandateController_capture",
        "parameters": [
          {
            "name": "cartId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{cartId}/refund": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Refund",
        "operationId": "CommerceMandateController_refund",
        "parameters": [
          {
            "name": "cartId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommerceDtos_RevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{id}": {
      "get": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Get",
        "operationId": "CommerceMandateController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{id}/events": {
      "get": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Events",
        "operationId": "CommerceMandateController_events",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommerceDtos_EventResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{id}/revoke": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Revoke",
        "operationId": "CommerceMandateController_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommerceDtos_RevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{intentId}/cart": {
      "post": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Create cart",
        "operationId": "CommerceMandateController_createCart",
        "parameters": [
          {
            "name": "intentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommerceDtos_CreateCartRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/commerce/mandates/{intentId}/carts": {
      "get": {
        "tags": [
          "CommerceMandate"
        ],
        "summary": "Carts",
        "operationId": "CommerceMandateController_carts",
        "parameters": [
          {
            "name": "intentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommerceDtos_MandateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/completions/agent-turn": {
      "post": {
        "tags": [
          "AgentTurn"
        ],
        "summary": "Agent turn",
        "operationId": "AgentTurnController_agentTurn",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTurn_Request"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentTurn_Result"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/completions/fim": {
      "post": {
        "tags": [
          "FimCompletion"
        ],
        "summary": "Fim",
        "operationId": "FimCompletionController_fim",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FimCompletionController_FimCompletionRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FimCompletionController_FimCompletionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables": {
      "get": {
        "tags": [
          "DataTable"
        ],
        "summary": "List",
        "operationId": "DataTableController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataTableDtos_TableView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Create",
        "operationId": "DataTableController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_CreateTableRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/config": {
      "get": {
        "tags": [
          "DataTable"
        ],
        "summary": "Config",
        "operationId": "DataTableController_config",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_Config"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/import": {
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Create from csv",
        "operationId": "DataTableController_createFromCsv",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_ImportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}": {
      "get": {
        "tags": [
          "DataTable"
        ],
        "summary": "Get",
        "operationId": "DataTableController_get",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "DataTable"
        ],
        "summary": "Update",
        "operationId": "DataTableController_update",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_UpdateTableRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "DataTable"
        ],
        "summary": "Delete",
        "operationId": "DataTableController_delete",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/columns": {
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Add column",
        "operationId": "DataTableController_addColumn",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_AddColumnRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/columns/{column}": {
      "put": {
        "tags": [
          "DataTable"
        ],
        "summary": "Alter column",
        "operationId": "DataTableController_alterColumn",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "column",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_AlterColumnRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "DataTable"
        ],
        "summary": "Drop column",
        "operationId": "DataTableController_dropColumn",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "column",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_TableView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/export.csv": {
      "get": {
        "tags": [
          "DataTable"
        ],
        "summary": "Export csv",
        "operationId": "DataTableController_exportCsv",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/import": {
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Import csv",
        "operationId": "DataTableController_importCsv",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_ImportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/rows": {
      "get": {
        "tags": [
          "DataTable"
        ],
        "summary": "Rows",
        "operationId": "DataTableController_rows",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_RowPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Insert row",
        "operationId": "DataTableController_insertRow",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_RowRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_RowView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/rows/bulk": {
      "post": {
        "tags": [
          "DataTable"
        ],
        "summary": "Insert rows",
        "operationId": "DataTableController_insertRows",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_BulkRowsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataTableDtos_RowView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/data-tables/{table}/rows/{rowId}": {
      "put": {
        "tags": [
          "DataTable"
        ],
        "summary": "Update row",
        "operationId": "DataTableController_updateRow",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataTableDtos_RowRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataTableDtos_RowView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "DataTable"
        ],
        "summary": "Delete row",
        "operationId": "DataTableController_deleteRow",
        "parameters": [
          {
            "name": "table",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/demo/channels": {
      "get": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Status",
        "operationId": "DemoChannelController_status",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/channels/telegram": {
      "delete": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Unlink telegram",
        "operationId": "DemoChannelController_unlinkTelegram",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/channels/telegram/pair": {
      "post": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Pair telegram",
        "operationId": "DemoChannelController_pairTelegram",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/channels/whatsapp": {
      "delete": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Unlink whats app",
        "operationId": "DemoChannelController_unlinkWhatsApp",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/channels/whatsapp/pair": {
      "post": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Pair whats app",
        "operationId": "DemoChannelController_pairWhatsApp",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/channels/whatsapp/preview": {
      "post": {
        "tags": [
          "DemoChannel"
        ],
        "summary": "Record whats app preview",
        "operationId": "DemoChannelController_recordWhatsAppPreview",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/chat": {
      "post": {
        "tags": [
          "DemoChat"
        ],
        "summary": "Chat",
        "operationId": "DemoChatController_chat",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoChatController_DemoChatRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoChatController_DemoChatResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/history": {
      "get": {
        "tags": [
          "DemoSession"
        ],
        "summary": "History",
        "operationId": "DemoSessionController_history",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/image": {
      "post": {
        "tags": [
          "DemoImage"
        ],
        "summary": "Generate",
        "operationId": "DemoImageController_generate",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoImageController_DemoImageRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoImageController_DemoImageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/image/{id}": {
      "get": {
        "tags": [
          "DemoImage"
        ],
        "summary": "Serve",
        "operationId": "DemoImageController_serve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/magic/plan": {
      "post": {
        "tags": [
          "DemoMagic"
        ],
        "summary": "Plan",
        "operationId": "DemoMagicController_plan",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoMagicController_MagicPlanRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/magic/run/{shareId}": {
      "get": {
        "tags": [
          "DemoMagic"
        ],
        "summary": "Run meta",
        "operationId": "DemoMagicController_runMeta",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoMagic"
        ],
        "summary": "Run",
        "operationId": "DemoMagicController_run",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoMagicController_MagicRunRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/magic/{workflowId}/preview": {
      "post": {
        "tags": [
          "DemoMagic"
        ],
        "summary": "Preview",
        "operationId": "DemoMagicController_preview",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoMagicController_MagicRunRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/magic/{workflowId}/publish": {
      "post": {
        "tags": [
          "DemoMagic"
        ],
        "summary": "Publish",
        "operationId": "DemoMagicController_publish",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/music": {
      "post": {
        "tags": [
          "DemoMusic"
        ],
        "summary": "Generate",
        "operationId": "DemoMusicController_generate",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoMusicController_DemoMusicRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoMusicController_DemoMusicResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/music/status": {
      "get": {
        "tags": [
          "DemoMusic"
        ],
        "summary": "Status",
        "operationId": "DemoMusicController_status",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoMusicController_DemoMusicStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/music/{id}": {
      "get": {
        "tags": [
          "DemoMusic"
        ],
        "summary": "Serve",
        "operationId": "DemoMusicController_serve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/session": {
      "get": {
        "tags": [
          "DemoSession"
        ],
        "summary": "Status",
        "operationId": "DemoSessionController_status",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoSession"
        ],
        "summary": "Create",
        "operationId": "DemoSessionController_create",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoSessionCreateRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/session/event": {
      "post": {
        "tags": [
          "DemoShareOwner"
        ],
        "summary": "Event",
        "operationId": "DemoShareOwnerController_event",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoShareOwnerController_DemoEventRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/session/reset": {
      "post": {
        "tags": [
          "DemoSession"
        ],
        "summary": "Reset",
        "operationId": "DemoSessionController_reset",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoSessionCreateRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/session/share": {
      "post": {
        "tags": [
          "DemoShareOwner"
        ],
        "summary": "Share",
        "operationId": "DemoShareOwnerController_share",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/share/{shareId}": {
      "get": {
        "tags": [
          "DemoShare"
        ],
        "summary": "Meta",
        "operationId": "DemoShareController_meta",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/share/{shareId}/chat": {
      "post": {
        "tags": [
          "DemoShare"
        ],
        "summary": "Chat",
        "operationId": "DemoShareController_chat",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoShareController_ShareChatRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/share/{shareId}/report": {
      "post": {
        "tags": [
          "DemoShare"
        ],
        "summary": "Report",
        "operationId": "DemoShareController_report",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoShareController_ShareReportRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "List agents",
        "operationId": "DemoStudioController_listAgents",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoStudioService_AgentView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Create agent",
        "operationId": "DemoStudioController_createAgent",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_AgentRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioService_AgentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Get agent",
        "operationId": "DemoStudioController_getAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioService_AgentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "delete": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Delete agent",
        "operationId": "DemoStudioController_deleteAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "patch": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Update agent",
        "operationId": "DemoStudioController_updateAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_AgentRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioService_AgentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/connectors": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "List connectors",
        "operationId": "DemoStudioController_listConnectors",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoStudioConnectorService_ConnectorView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Connect",
        "operationId": "DemoStudioController_connect",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_ConnectRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioConnectorService_ConnectorView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/connectors/{server}": {
      "delete": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Disconnect",
        "operationId": "DemoStudioController_disconnect",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "server",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/documents": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "List documents",
        "operationId": "DemoStudioController_listDocuments",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoStudioDocumentService_DocumentView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Upload document",
        "operationId": "DemoStudioController_uploadDocument",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioDocumentService_DocumentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/documents/text": {
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Upload text",
        "operationId": "DemoStudioController_uploadText",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_TextDocumentRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioDocumentService_DocumentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/documents/{documentId}": {
      "delete": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Delete document",
        "operationId": "DemoStudioController_deleteDocument",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/live": {
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Make live",
        "operationId": "DemoStudioController_makeLive",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioService_AgentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/agents/{agentId}/mission": {
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Mission",
        "operationId": "DemoStudioController_mission",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_MissionRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/mcp/search": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Search mcp",
        "operationId": "DemoStudioController_searchMcp",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioConnectorService_RegistryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/palette": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Palette",
        "operationId": "DemoStudioController_palette",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioService_Palette"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/runs/{runId}/decision": {
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Decide",
        "operationId": "DemoStudioController_decide",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_DecisionRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/status": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Status",
        "operationId": "DemoStudioController_status",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioController_StudioStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/workflows": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "List workflows",
        "operationId": "DemoStudioController_listWorkflows",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoStudioController_WorkflowView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Create workflow",
        "operationId": "DemoStudioController_createWorkflow",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_WorkflowRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioController_WorkflowView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/workflows/{workflowId}": {
      "put": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Update workflow",
        "operationId": "DemoStudioController_updateWorkflow",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_WorkflowRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoStudioController_WorkflowView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "delete": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Delete workflow",
        "operationId": "DemoStudioController_deleteWorkflow",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/workflows/{workflowId}/run": {
      "post": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "Run workflow",
        "operationId": "DemoStudioController_runWorkflow",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoStudioController_RunRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/studio/workflows/{workflowId}/runs": {
      "get": {
        "tags": [
          "DemoStudio"
        ],
        "summary": "List runs",
        "operationId": "DemoStudioController_listRuns",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DemoStudioController_RunView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/transcript-email": {
      "post": {
        "tags": [
          "DemoTranscriptEmail"
        ],
        "summary": "Send",
        "operationId": "DemoTranscriptEmailController_send",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoTranscriptEmailRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/video": {
      "post": {
        "tags": [
          "DemoVideo"
        ],
        "summary": "Generate",
        "operationId": "DemoVideoController_generate",
        "parameters": [
          {
            "name": "X-Demo-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoVideoController_DemoVideoRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoVideoController_DemoVideoResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/demo/video/{id}": {
      "get": {
        "tags": [
          "DemoVideo"
        ],
        "summary": "Serve",
        "operationId": "DemoVideoController_serve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/dev/v1/agents": {
      "get": {
        "tags": [
          "DeveloperApi"
        ],
        "summary": "List agents",
        "operationId": "DeveloperApiController_listAgents",
        "description": "Authenticated with a long-lived vmcp_ grant key, not a user JWT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeveloperApiController_AgentSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/dev/v1/agents/{agentId}/chat": {
      "post": {
        "tags": [
          "DeveloperApi"
        ],
        "summary": "Chat",
        "operationId": "DeveloperApiController_chat",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeveloperApiController_ChatRequest"
              }
            }
          }
        },
        "description": "Authenticated with a long-lived vmcp_ grant key, not a user JWT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/dev/v1/workflows": {
      "get": {
        "tags": [
          "DeveloperApi"
        ],
        "summary": "List workflows",
        "operationId": "DeveloperApiController_listWorkflows",
        "description": "Authenticated with a long-lived vmcp_ grant key, not a user JWT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeveloperApiController_WorkflowSummaryDto"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/dev/v1/workflows/{workflowId}/run": {
      "post": {
        "tags": [
          "DeveloperApi"
        ],
        "summary": "Run",
        "operationId": "DeveloperApiController_run",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeveloperApiController_RunRequest"
              }
            }
          }
        },
        "description": "Authenticated with a long-lived vmcp_ grant key, not a user JWT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/dev/v1/workflows/{workflowId}/runs/{runId}": {
      "get": {
        "tags": [
          "DeveloperApi"
        ],
        "summary": "Run status",
        "operationId": "DeveloperApiController_runStatus",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Authenticated with a long-lived vmcp_ grant key, not a user JWT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/api/devices": {
      "get": {
        "tags": [
          "Device"
        ],
        "summary": "List",
        "operationId": "DeviceController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/devices/app-usage": {
      "post": {
        "tags": [
          "DeviceDataIngestion"
        ],
        "summary": "App usage",
        "operationId": "DeviceDataIngestionController_appUsage",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestAppUsageRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/capabilities": {
      "post": {
        "tags": [
          "DeviceGateway"
        ],
        "summary": "Capabilities",
        "operationId": "DeviceGatewayController_capabilities",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCapabilitiesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/devices/claim": {
      "post": {
        "tags": [
          "DeviceGateway"
        ],
        "summary": "Claim",
        "operationId": "DeviceGatewayController_claim",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/commands/{commandId}/result": {
      "post": {
        "tags": [
          "DeviceGateway"
        ],
        "summary": "Result",
        "operationId": "DeviceGatewayController_result",
        "parameters": [
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandResultRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/notifications": {
      "post": {
        "tags": [
          "DeviceDataIngestion"
        ],
        "summary": "Notifications",
        "operationId": "DeviceDataIngestionController_notifications",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestNotificationsRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/pairing-code": {
      "post": {
        "tags": [
          "Device"
        ],
        "summary": "Generate pairing code",
        "operationId": "DeviceController_generatePairingCode",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairingCodeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/devices/poll": {
      "post": {
        "tags": [
          "DeviceGateway"
        ],
        "summary": "Poll",
        "operationId": "DeviceGatewayController_poll",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/register": {
      "post": {
        "tags": [
          "Device"
        ],
        "summary": "Register",
        "operationId": "DeviceController_register",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDeviceRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/devices/screen-state": {
      "post": {
        "tags": [
          "DeviceDataIngestion"
        ],
        "summary": "Screen state",
        "operationId": "DeviceDataIngestionController_screenState",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestScreenStateRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/sms": {
      "post": {
        "tags": [
          "DeviceDataIngestion"
        ],
        "summary": "Sms",
        "operationId": "DeviceDataIngestionController_sms",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestSmsRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/devices/{deviceId}": {
      "delete": {
        "tags": [
          "Device"
        ],
        "summary": "Revoke",
        "operationId": "DeviceController_revoke",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/devices/{deviceId}/commands": {
      "get": {
        "tags": [
          "Device"
        ],
        "summary": "Command history",
        "operationId": "DeviceController_commandHistory",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommandResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Device"
        ],
        "summary": "Enqueue",
        "operationId": "DeviceController_enqueue",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueCommandRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/directory/agents": {
      "get": {
        "tags": [
          "AgentDirectory"
        ],
        "summary": "List",
        "operationId": "AgentDirectoryController_list",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/directory/agents/{agentId}": {
      "get": {
        "tags": [
          "AgentDirectory"
        ],
        "summary": "Get",
        "operationId": "AgentDirectoryController_get",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/documentgen/documents": {
      "get": {
        "tags": [
          "DocumentGeneration"
        ],
        "summary": "List",
        "operationId": "DocumentGenerationController_list",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_DocumentGenerationJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "DocumentGeneration"
        ],
        "summary": "Generate",
        "operationId": "DocumentGenerationController_generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentGenerationRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentGenerationJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/documentgen/documents/{id}": {
      "get": {
        "tags": [
          "DocumentGeneration"
        ],
        "summary": "Download",
        "operationId": "DocumentGenerationController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/edge/config": {
      "get": {
        "tags": [
          "EdgeAgentsConfig"
        ],
        "summary": "Get config",
        "operationId": "EdgeAgentsConfigController_getConfig",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeConfigResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/edge/manifest": {
      "get": {
        "tags": [
          "EdgeAgentsConfig"
        ],
        "summary": "Get manifest",
        "operationId": "EdgeAgentsConfigController_getManifest",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelManifest"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/edge/manifest/full": {
      "get": {
        "tags": [
          "EdgeAgentsConfig"
        ],
        "summary": "Get manifest for editor",
        "operationId": "EdgeAgentsConfigController_getManifestForEditor",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeManifestEditorResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/edge/manifest/registry": {
      "get": {
        "tags": [
          "EdgeAgentsConfig"
        ],
        "summary": "Get registry",
        "operationId": "EdgeAgentsConfigController_getRegistry",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelEntry"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/edge/memory": {
      "get": {
        "tags": [
          "EdgeToolExecution"
        ],
        "summary": "List memory",
        "operationId": "EdgeToolExecutionController_listMemory",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeToolExecutionController_EdgeMemoryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/edge/prompts": {
      "get": {
        "tags": [
          "EdgePromptBundle"
        ],
        "summary": "Bundle",
        "operationId": "EdgePromptBundleController_bundle",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgePromptBundleController_EdgePromptBundle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/edge/tools": {
      "get": {
        "tags": [
          "EdgeToolExecution"
        ],
        "summary": "List tools",
        "operationId": "EdgeToolExecutionController_listTools",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeToolExecutionController_EdgeToolListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/edge/tools/execute": {
      "post": {
        "tags": [
          "EdgeToolExecution"
        ],
        "summary": "Execute",
        "operationId": "EdgeToolExecutionController_execute",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdgeToolExecutionController_EdgeToolExecuteRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdgeToolExecutionController_EdgeToolExecuteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/edge/turns": {
      "post": {
        "tags": [
          "EdgeTurnTelemetry"
        ],
        "summary": "Report",
        "operationId": "EdgeTurnTelemetryController_report",
        "parameters": [
          {
            "name": "X-Device-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EdgeTurnTelemetryController_EdgeTurnReportRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "202": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/elevenlabs/audio": {
      "get": {
        "tags": [
          "ElevenLabsGeneratedAudio"
        ],
        "summary": "List",
        "operationId": "ElevenLabsGeneratedAudioController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ElevenLabsGeneratedAudioResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/elevenlabs/audio/{id}": {
      "get": {
        "tags": [
          "ElevenLabsGeneratedAudio"
        ],
        "summary": "Download",
        "operationId": "ElevenLabsGeneratedAudioController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/elevenlabs/credential": {
      "post": {
        "tags": [
          "ElevenLabs"
        ],
        "summary": "Activate",
        "operationId": "ElevenLabsController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElevenLabsCredentialActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElevenLabsCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ElevenLabs"
        ],
        "summary": "Deactivate",
        "operationId": "ElevenLabsController_deactivate",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/elevenlabs/credential/status": {
      "get": {
        "tags": [
          "ElevenLabs"
        ],
        "summary": "Status",
        "operationId": "ElevenLabsController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElevenLabsCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/elevenlabs/voices": {
      "get": {
        "tags": [
          "ElevenLabsVoice"
        ],
        "summary": "List",
        "operationId": "ElevenLabsVoiceController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ElevenLabsVoiceResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ElevenLabsVoice"
        ],
        "summary": "Clone",
        "operationId": "ElevenLabsVoiceController_clone",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElevenLabsVoiceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/elevenlabs/voices/{id}": {
      "delete": {
        "tags": [
          "ElevenLabsVoice"
        ],
        "summary": "Delete",
        "operationId": "ElevenLabsVoiceController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/email/messages": {
      "get": {
        "tags": [
          "EmailMessage"
        ],
        "summary": "List",
        "operationId": "EmailMessageController_list",
        "parameters": [
          {
            "name": "runId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmailMessageController_EmailMessageResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/face-enrollments": {
      "get": {
        "tags": [
          "FaceEnrollment"
        ],
        "summary": "List",
        "operationId": "FaceEnrollmentController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "collectionId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FaceEnrollmentController_FaceEnrollmentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "FaceEnrollment"
        ],
        "summary": "Enroll",
        "operationId": "FaceEnrollmentController_enroll",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceEnrollmentController_FaceEnrollmentRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaceEnrollmentController_FaceEnrollmentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/face-enrollments/{enrollmentId}": {
      "delete": {
        "tags": [
          "FaceEnrollment"
        ],
        "summary": "Delete",
        "operationId": "FaceEnrollmentController_delete",
        "parameters": [
          {
            "name": "enrollmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/guardrails/rules": {
      "get": {
        "tags": [
          "GuardrailRule"
        ],
        "summary": "List",
        "operationId": "GuardrailRuleController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GuardrailRuleResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "GuardrailRule"
        ],
        "summary": "Create",
        "operationId": "GuardrailRuleController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuardrailRuleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailRuleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/guardrails/rules/{id}": {
      "get": {
        "tags": [
          "GuardrailRule"
        ],
        "summary": "Get",
        "operationId": "GuardrailRuleController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailRuleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "GuardrailRule"
        ],
        "summary": "Update",
        "operationId": "GuardrailRuleController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuardrailRuleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuardrailRuleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "GuardrailRule"
        ],
        "summary": "Delete",
        "operationId": "GuardrailRuleController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/conversations": {
      "get": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Conversations",
        "operationId": "OperatorInboxController_conversations",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ChannelType"
            }
          },
          {
            "name": "view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperatorInboxController_ConversationPageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/inbox": {
      "get": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Inbox",
        "operationId": "OperatorInboxController_inbox",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OperatorInboxController_InboxSessionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/sessions/{sessionId}/escalate": {
      "post": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Escalate",
        "operationId": "OperatorInboxController_escalate",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperatorInboxController_EscalateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/sessions/{sessionId}/release": {
      "post": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Release",
        "operationId": "OperatorInboxController_release",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/sessions/{sessionId}/reply": {
      "post": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Reply",
        "operationId": "OperatorInboxController_reply",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperatorInboxController_ReplyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/sessions/{sessionId}/take-over": {
      "post": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Take over",
        "operationId": "OperatorInboxController_takeOver",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_CHANNELS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_CHANNELS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/sessions/{sessionId}/transcript": {
      "get": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Transcript",
        "operationId": "OperatorInboxController_transcript",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/handoff/stats": {
      "get": {
        "tags": [
          "OperatorInbox"
        ],
        "summary": "Stats",
        "operationId": "OperatorInboxController_stats",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperatorInboxService_InboxStats"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/imagegen/images": {
      "get": {
        "tags": [
          "GeneratedImage"
        ],
        "summary": "List",
        "operationId": "GeneratedImageController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeneratedImageResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/imagegen/images/{id}": {
      "get": {
        "tags": [
          "GeneratedImage"
        ],
        "summary": "Download",
        "operationId": "GeneratedImageController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/internal/abuse/blacklist/ip": {
      "post": {
        "tags": [
          "FraudAnalysis"
        ],
        "summary": "Blacklist ip",
        "operationId": "FraudAnalysisController_blacklistIp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudAnalysisController_BlacklistIpRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.fraud-detection.enabled=true",
        "description": "Only available when the feature flag app.fraud-detection.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/internal/abuse/blacklist/user": {
      "post": {
        "tags": [
          "FraudAnalysis"
        ],
        "summary": "Blacklist user",
        "operationId": "FraudAnalysisController_blacklistUser",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudAnalysisController_BlacklistUserRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.fraud-detection.enabled=true",
        "description": "Only available when the feature flag app.fraud-detection.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/internal/abuse/status": {
      "get": {
        "tags": [
          "FraudAnalysis"
        ],
        "summary": "Get abuse status",
        "operationId": "FraudAnalysisController_getAbuseStatus",
        "x-feature-flag": "app.fraud-detection.enabled=true",
        "description": "Only available when the feature flag app.fraud-detection.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/internal/abuse/verify-captcha": {
      "post": {
        "tags": [
          "FraudAnalysis"
        ],
        "summary": "Verify captcha",
        "operationId": "FraudAnalysisController_verifyCaptcha",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FraudAnalysisController_HCaptchaVerifyRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.fraud-detection.enabled=true",
        "description": "Only available when the feature flag app.fraud-detection.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/internal/app-builder/generate-files": {
      "post": {
        "tags": [
          "AppBuilderCompletion"
        ],
        "summary": "Generate files",
        "operationId": "AppBuilderCompletionController_generateFiles",
        "parameters": [
          {
            "name": "X-Service-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuilderGenerateFilesResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/internal/app-builder/generate-image": {
      "post": {
        "tags": [
          "AppBuilderImage"
        ],
        "summary": "Generate image",
        "operationId": "AppBuilderImageController_generateImage",
        "parameters": [
          {
            "name": "X-Service-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/jev/credential": {
      "post": {
        "tags": [
          "Jev"
        ],
        "summary": "Activate",
        "operationId": "JevController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JevCredentialActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JevCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Jev"
        ],
        "summary": "Deactivate",
        "operationId": "JevController_deactivate",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/jev/credential/status": {
      "get": {
        "tags": [
          "Jev"
        ],
        "summary": "Credential status",
        "operationId": "JevController_credentialStatus",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JevCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/jev/playground": {
      "post": {
        "tags": [
          "Jev"
        ],
        "summary": "Playground",
        "operationId": "JevController_playground",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JevPlaygroundRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/jev/policy": {
      "get": {
        "tags": [
          "Jev"
        ],
        "summary": "Policy",
        "operationId": "JevController_policy",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JevPolicyResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Jev"
        ],
        "summary": "Update policy",
        "operationId": "JevController_updatePolicy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JevPolicyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JevPolicyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/jev/status": {
      "get": {
        "tags": [
          "Jev"
        ],
        "summary": "Status",
        "operationId": "JevController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JevStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections": {
      "get": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "List",
        "operationId": "KnowledgeCollectionController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeCollectionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Create",
        "operationId": "KnowledgeCollectionController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeCollectionCreateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/embedding-models": {
      "get": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Embedding models",
        "operationId": "KnowledgeCollectionController_embeddingModels",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmbeddingModelCatalog_ModelOption"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/text-search-configs": {
      "get": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Text search configs",
        "operationId": "KnowledgeCollectionController_textSearchConfigs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TextSearchConfigCatalog_ConfigOption"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/{collectionId}": {
      "get": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Get",
        "operationId": "KnowledgeCollectionController_get",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Update",
        "operationId": "KnowledgeCollectionController_update",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeCollectionUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCollectionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Delete",
        "operationId": "KnowledgeCollectionController_delete",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/{collectionId}/documents": {
      "get": {
        "tags": [
          "KnowledgeCollection"
        ],
        "summary": "Documents",
        "operationId": "KnowledgeCollectionController_documents",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeDocumentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/{collectionId}/reembed": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Latest reembed",
        "operationId": "KnowledgeController_latestReembed",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeReembedJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Reembed",
        "operationId": "KnowledgeController_reembed",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeReembedRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeReembedJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/collections/{collectionId}/retrieval-settings": {
      "get": {
        "tags": [
          "KnowledgeRagSettings"
        ],
        "summary": "Get",
        "operationId": "KnowledgeRagSettingsController_get",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagDtos_RagSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "KnowledgeRagSettings"
        ],
        "summary": "Update",
        "operationId": "KnowledgeRagSettingsController_update",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RagDtos_RagSettingsUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagDtos_RagSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/connectors": {
      "get": {
        "tags": [
          "KnowledgeConnector"
        ],
        "summary": "List",
        "operationId": "KnowledgeConnectorController_list",
        "parameters": [
          {
            "name": "collectionId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "KnowledgeConnector"
        ],
        "summary": "Create",
        "operationId": "KnowledgeConnectorController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeConnectorController_ConnectorUpsertRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/connectors/{id}": {
      "put": {
        "tags": [
          "KnowledgeConnector"
        ],
        "summary": "Update",
        "operationId": "KnowledgeConnectorController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeConnectorController_ConnectorUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "KnowledgeConnector"
        ],
        "summary": "Delete",
        "operationId": "KnowledgeConnectorController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/connectors/{id}/sync": {
      "post": {
        "tags": [
          "KnowledgeConnector"
        ],
        "summary": "Sync",
        "operationId": "KnowledgeConnectorController_sync",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeConnectorService_ConnectorSyncResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/documents/{documentId}": {
      "delete": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Delete document",
        "operationId": "KnowledgeController_deleteDocument",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/documents/{documentId}/file": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Download original file",
        "operationId": "KnowledgeController_downloadOriginalFile",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/ingest": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Ingest",
        "operationId": "KnowledgeController_ingest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/jobs/{jobId}": {
      "get": {
        "tags": [
          "KnowledgeIngestionJob"
        ],
        "summary": "Get",
        "operationId": "KnowledgeIngestionJobController_get",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeIngestionJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/ocr-provider": {
      "post": {
        "tags": [
          "OcrProviderConfig"
        ],
        "summary": "Activate",
        "operationId": "OcrProviderConfigController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OcrProviderActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "OcrProviderConfig"
        ],
        "summary": "Deactivate",
        "operationId": "OcrProviderConfigController_deactivate",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/ocr-provider/status": {
      "get": {
        "tags": [
          "OcrProviderConfig"
        ],
        "summary": "Status",
        "operationId": "OcrProviderConfigController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OcrProviderStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/reembed-jobs/{jobId}": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Reembed job",
        "operationId": "KnowledgeController_reembedJob",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeReembedJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/search": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Search",
        "operationId": "KnowledgeController_search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchResultResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/stats": {
      "get": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Stats",
        "operationId": "KnowledgeController_stats",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeStatsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/upload": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Upload",
        "operationId": "KnowledgeController_upload",
        "parameters": [
          {
            "name": "chunkSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "chunkOverlap",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "collectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/upload-audio": {
      "post": {
        "tags": [
          "Knowledge"
        ],
        "summary": "Upload audio",
        "operationId": "KnowledgeController_uploadAudio",
        "parameters": [
          {
            "name": "chunkSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "chunkOverlap",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "collectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeIngestionJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/knowledge/{collectionId}/eval": {
      "post": {
        "tags": [
          "RagEval"
        ],
        "summary": "Run",
        "operationId": "RagEvalController_run",
        "parameters": [
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RagDtos_RagEvalRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RagDtos_RagEvalResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads": {
      "get": {
        "tags": [
          "Lead"
        ],
        "summary": "List",
        "operationId": "LeadController_list",
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_PageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Lead"
        ],
        "summary": "Create",
        "operationId": "LeadController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadController_LeadRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_LeadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/export.csv": {
      "get": {
        "tags": [
          "Lead"
        ],
        "summary": "Export",
        "operationId": "LeadController_export",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/import": {
      "post": {
        "tags": [
          "Lead"
        ],
        "summary": "Import file",
        "operationId": "LeadController_importFile",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadService_ImportResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/pipeline": {
      "get": {
        "tags": [
          "Lead"
        ],
        "summary": "Pipeline",
        "operationId": "LeadController_pipeline",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LeadService_StageTotal"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/{id}": {
      "get": {
        "tags": [
          "Lead"
        ],
        "summary": "Get",
        "operationId": "LeadController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_LeadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Lead"
        ],
        "summary": "Update",
        "operationId": "LeadController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadController_LeadRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_LeadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Lead"
        ],
        "summary": "Delete",
        "operationId": "LeadController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/{id}/activities": {
      "get": {
        "tags": [
          "Lead"
        ],
        "summary": "Activities",
        "operationId": "LeadController_activities",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LeadController_ActivityResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Lead"
        ],
        "summary": "Add activity",
        "operationId": "LeadController_addActivity",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadController_ActivityRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_ActivityResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/leads/{id}/stage": {
      "post": {
        "tags": [
          "Lead"
        ],
        "summary": "Stage",
        "operationId": "LeadController_stage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadController_StageRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_LEADS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_LEADS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadController_LeadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/learning/proposals": {
      "get": {
        "tags": [
          "LearningProposal"
        ],
        "summary": "List",
        "operationId": "LearningProposalController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "x-feature-flag": "app.learning.proposals.enabled=true",
        "description": "Only available when the feature flag app.learning.proposals.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LearningProposalView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/learning/proposals/{id}/approve": {
      "post": {
        "tags": [
          "LearningProposal"
        ],
        "summary": "Approve",
        "operationId": "LearningProposalController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LearningProposalController_ApproveRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.learning.proposals.enabled=true",
        "description": "Only available when the feature flag app.learning.proposals.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningProposalView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/learning/proposals/{id}/reject": {
      "post": {
        "tags": [
          "LearningProposal"
        ],
        "summary": "Reject",
        "operationId": "LearningProposalController_reject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.learning.proposals.enabled=true",
        "description": "Only available when the feature flag app.learning.proposals.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningProposalView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/learning/review/summary": {
      "get": {
        "tags": [
          "LearningReview"
        ],
        "summary": "Summary",
        "operationId": "LearningReviewController_summary",
        "x-feature-flag": "app.learning.proposals.enabled=true",
        "description": "Only available when the feature flag app.learning.proposals.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyLearningSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/probe": {
      "post": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Probe",
        "operationId": "LocalModelsController_probe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalModelsController_TagRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_ProbeResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/pull": {
      "post": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Pull",
        "operationId": "LocalModelsController_pull",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalModelsController_TagRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/pull/{jobId}": {
      "get": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Pull status",
        "operationId": "LocalModelsController_pullStatus",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelPullService_Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/recommendation": {
      "get": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Recommendation",
        "operationId": "LocalModelsController_recommendation",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_Recommended"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/settings": {
      "get": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Settings",
        "operationId": "LocalModelsController_settings",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_Settings"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Update settings",
        "operationId": "LocalModelsController_updateSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalModelsService_SettingsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_Settings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/use": {
      "post": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Use",
        "operationId": "LocalModelsController_use",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalModelsController_TagRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_UseResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/local-models/warm": {
      "post": {
        "tags": [
          "LocalModels"
        ],
        "summary": "Warm",
        "operationId": "LocalModelsController_warm",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalModelsController_WarmRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalModelsService_WarmResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp-apps/{appId}": {
      "get": {
        "tags": [
          "McpApps"
        ],
        "summary": "View",
        "operationId": "McpAppsController_view",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.mcp.apps.enabled=true",
        "description": "Only available when the feature flag app.mcp.apps.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpAppsService_AppView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp-apps/{appId}/tools/call": {
      "post": {
        "tags": [
          "McpApps"
        ],
        "summary": "Call tool",
        "operationId": "McpAppsController_callTool",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpAppsController_ToolCallRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.mcp.apps.enabled=true",
        "description": "Only available when the feature flag app.mcp.apps.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpAppsController_ToolCallResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/providers": {
      "get": {
        "tags": [
          "OAuthProvider"
        ],
        "summary": "Providers",
        "operationId": "OAuthProviderController_providers",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthProviderController_ProvidersResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/remote": {
      "get": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Capabilities",
        "operationId": "McpOAuthController_capabilities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthController_CapabilitiesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Disconnect",
        "operationId": "McpOAuthController_disconnect",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthController_DisconnectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/remote/authorize": {
      "post": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Authorize",
        "operationId": "McpOAuthController_authorize",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthController_AuthorizeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthController_AuthorizeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/remote/status": {
      "post": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Status",
        "operationId": "McpOAuthController_status",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpOAuthController_UrlRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpOAuthController_StatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/{provider}": {
      "delete": {
        "tags": [
          "OAuthProvider"
        ],
        "summary": "Disconnect",
        "operationId": "OAuthProviderController_disconnect",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthProviderController_DisconnectResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/{provider}/attach/{registrationId}": {
      "post": {
        "tags": [
          "OAuthProvider"
        ],
        "summary": "Attach",
        "operationId": "OAuthProviderController_attach",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/oauth/{provider}/authorize": {
      "post": {
        "tags": [
          "OAuthProvider"
        ],
        "summary": "Authorize",
        "operationId": "OAuthProviderController_authorize",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthProviderController_AuthorizeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthProviderController_AuthorizeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registrations/{id}/acknowledge": {
      "post": {
        "tags": [
          "McpRegistrationTest"
        ],
        "summary": "Acknowledge",
        "operationId": "McpRegistrationTestController_acknowledge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registrations/{id}/test": {
      "post": {
        "tags": [
          "McpRegistrationTest"
        ],
        "summary": "Test",
        "operationId": "McpRegistrationTestController_test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpConnectionTestResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry": {
      "get": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "List",
        "operationId": "McpRegistryController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpServerRegistrationResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Register",
        "operationId": "McpRegistryController_register",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerRegistrationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/atlassian/authorize-url": {
      "get": {
        "tags": [
          "AtlassianOAuth"
        ],
        "summary": "Authorize url",
        "operationId": "AtlassianOAuthController_authorizeUrl",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AtlassianOAuthController_AuthorizeUrlResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/atlassian/connection": {
      "delete": {
        "tags": [
          "AtlassianOAuth"
        ],
        "summary": "Disconnect",
        "operationId": "AtlassianOAuthController_disconnect",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/catalog": {
      "get": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Catalog",
        "operationId": "McpRegistryController_catalog",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpCatalogEntry"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/search": {
      "get": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Search",
        "operationId": "McpRegistryController_search",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistrySearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/{id}": {
      "delete": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Delete",
        "operationId": "McpRegistryController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Toggle",
        "operationId": "McpRegistryController_toggle",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerToggleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/{id}/connect": {
      "post": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Connect now",
        "operationId": "McpRegistryController_connectNow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/registry/{id}/edge-eligible": {
      "patch": {
        "tags": [
          "McpRegistry"
        ],
        "summary": "Set edge eligible",
        "operationId": "McpRegistryController_setEdgeEligible",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpEdgeEligibilityRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/tool-pins": {
      "get": {
        "tags": [
          "McpToolPin"
        ],
        "summary": "Changed",
        "operationId": "McpToolPinController_changed",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpToolPinService_PinStatus"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/tool-pins/{id}": {
      "get": {
        "tags": [
          "McpToolPin"
        ],
        "summary": "Get",
        "operationId": "McpToolPinController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolPinService_PinStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcp/tool-pins/{id}/approve": {
      "post": {
        "tags": [
          "McpToolPin"
        ],
        "summary": "Approve",
        "operationId": "McpToolPinController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolPinService_PinStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/exposure/{kind}/{resourceId}": {
      "get": {
        "tags": [
          "McpToolExposure"
        ],
        "summary": "Get",
        "operationId": "McpToolExposureController_get",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolExposureController_ExposureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "McpToolExposure"
        ],
        "summary": "Update",
        "operationId": "McpToolExposureController_update",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolExposureController_ExposureUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolExposureController_ExposureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/grants": {
      "get": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "List",
        "operationId": "McpServerAccessController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpServerAccessGrantResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Create",
        "operationId": "McpServerAccessController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerAccessGrantCreateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerAccessGrantCreatedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/grants/auth-options": {
      "get": {
        "tags": [
          "McpServerAuthOptions"
        ],
        "summary": "Get",
        "operationId": "McpServerAuthOptionsController_get",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerAuthOptionsController_AuthOptions"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/grants/{id}": {
      "put": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Update",
        "operationId": "McpServerAccessController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerAccessGrantUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerAccessGrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Revoke",
        "operationId": "McpServerAccessController_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Toggle",
        "operationId": "McpServerAccessController_toggle",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerAccessGrantToggleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerAccessGrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/grants/{id}/rotate": {
      "post": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Rotate",
        "operationId": "McpServerAccessController_rotate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerAccessGrantCreatedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mcpserver/grants/{id}/tool-calls": {
      "get": {
        "tags": [
          "McpServerAccess"
        ],
        "summary": "Tool calls",
        "operationId": "McpServerAccessController_toolCalls",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpServerAccessController_McpGrantToolCallView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Me",
        "operationId": "MeController_me",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeController_MeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory": {
      "get": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Overview",
        "operationId": "UserMemoryController_overview",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMemoryController_MemoryOverview"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Forget all",
        "operationId": "UserMemoryController_forgetAll",
        "parameters": [
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMemoryController_ForgetAllResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/blocks/{label}": {
      "put": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Put block",
        "operationId": "UserMemoryController_putBlock",
        "parameters": [
          {
            "name": "label",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserMemoryController_ContentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMemoryController_BlockView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Delete block",
        "operationId": "UserMemoryController_deleteBlock",
        "parameters": [
          {
            "name": "label",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/export": {
      "get": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Export",
        "operationId": "UserMemoryController_export",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMemoryController_MemoryExport"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/facts": {
      "post": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Add fact",
        "operationId": "UserMemoryController_addFact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserMemoryController_FactCreateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMemoryController_FactView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/facts/{scope}/{id}": {
      "delete": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Delete fact",
        "operationId": "UserMemoryController_deleteFact",
        "parameters": [
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "UserMemory"
        ],
        "summary": "Edit fact",
        "operationId": "UserMemoryController_editFact",
        "parameters": [
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserMemoryController_ContentRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/facts/{scope}/{id}/source": {
      "get": {
        "tags": [
          "UserMemoryProvenance"
        ],
        "summary": "Source",
        "operationId": "UserMemoryProvenanceController_source",
        "parameters": [
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryProvenanceService_FactSource"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/import": {
      "post": {
        "tags": [
          "MemoryImport"
        ],
        "summary": "Import facts",
        "operationId": "MemoryImportController_importFacts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryImportDtos_ImportRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryImportDtos_ImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/import/limits": {
      "get": {
        "tags": [
          "MemoryImport"
        ],
        "summary": "Limits",
        "operationId": "MemoryImportController_limits",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryImportDtos_ImportLimits"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/memory/import/preview": {
      "post": {
        "tags": [
          "MemoryImport"
        ],
        "summary": "Preview",
        "operationId": "MemoryImportController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryImportDtos_PreviewRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryImportDtos_PreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mobile/sentinels/admin/summary": {
      "get": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Admin summary",
        "operationId": "MobileSentinelController_adminSummary",
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Restricted to tenant-admin or platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileSentinelService_AdminSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mobile/sentinels/events": {
      "get": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Events",
        "operationId": "MobileSentinelController_events",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sentinelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MobileSentinelService_EventView"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Ingest",
        "operationId": "MobileSentinelController_ingest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileSentinelService_IngestRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileSentinelService_IngestResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Erase",
        "operationId": "MobileSentinelController_erase",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/mobile/sentinels/policy": {
      "get": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Policy",
        "operationId": "MobileSentinelController_policy",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileSentinelService_PolicyView"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "MobileSentinel"
        ],
        "summary": "Update policy",
        "operationId": "MobileSentinelController_updatePolicy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileSentinelService_PolicyRequest"
              }
            }
          }
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Restricted to tenant-admin or platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileSentinelService_PolicyView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/model-pricing": {
      "get": {
        "tags": [
          "ModelPricing"
        ],
        "summary": "Pricing",
        "operationId": "ModelPricingController_pricing_2",
        "parameters": [
          {
            "name": "modelIds",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelPricingController_ModelPriceEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ModelPricing"
        ],
        "summary": "Pricing",
        "operationId": "ModelPricingController_pricing",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelPricingController_ModelPricingRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModelPricingController_ModelPriceEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/moderation/review": {
      "get": {
        "tags": [
          "ModerationReview"
        ],
        "summary": "List",
        "operationId": "ModerationReviewController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ModerationReviewStatus"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ModerationReviewItemResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/moderation/review/{id}": {
      "get": {
        "tags": [
          "ModerationReview"
        ],
        "summary": "Get",
        "operationId": "ModerationReviewController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationReviewItemResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/moderation/review/{id}/approve": {
      "post": {
        "tags": [
          "ModerationReview"
        ],
        "summary": "Approve",
        "operationId": "ModerationReviewController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationReviewDecisionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationReviewItemResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/moderation/review/{id}/block": {
      "post": {
        "tags": [
          "ModerationReview"
        ],
        "summary": "Block",
        "operationId": "ModerationReviewController_block",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationReviewDecisionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationReviewItemResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/moderation/review/{id}/escalate": {
      "post": {
        "tags": [
          "ModerationReview"
        ],
        "summary": "Escalate",
        "operationId": "ModerationReviewController_escalate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationReviewDecisionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationReviewItemResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/musicgen/tracks": {
      "get": {
        "tags": [
          "GeneratedMusic"
        ],
        "summary": "List",
        "operationId": "GeneratedMusicController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeneratedMusicResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/musicgen/tracks/{id}": {
      "get": {
        "tags": [
          "GeneratedMusic"
        ],
        "summary": "Download",
        "operationId": "GeneratedMusicController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/notifications": {
      "get": {
        "tags": [
          "Notification"
        ],
        "summary": "List",
        "operationId": "NotificationController_list",
        "parameters": [
          {
            "name": "unreadOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NotificationResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/notifications/read-all": {
      "post": {
        "tags": [
          "Notification"
        ],
        "summary": "Mark all read",
        "operationId": "NotificationController_markAllRead",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/notifications/unread-count": {
      "get": {
        "tags": [
          "Notification"
        ],
        "summary": "Unread count",
        "operationId": "NotificationController_unreadCount",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/notifications/{id}/read": {
      "post": {
        "tags": [
          "Notification"
        ],
        "summary": "Mark read",
        "operationId": "NotificationController_markRead",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/onboarding": {
      "post": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Onboard",
        "operationId": "OnboardingController_onboard",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnboardingRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/openapi.json": {
      "get": {
        "tags": [
          "ApiSpec"
        ],
        "summary": "Open api",
        "operationId": "ApiSpecController_openApi",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "List",
        "operationId": "PaymentController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentDtos_MandateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Grant",
        "operationId": "PaymentController_grant",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentDtos_CreateMandateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates/preview": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Preview",
        "operationId": "PaymentController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentDtos_CreateMandateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_MandatePreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates/spend": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Spend for agent",
        "operationId": "PaymentController_spendForAgent",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentDtos_MandateSpendResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates/{id}": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Get",
        "operationId": "PaymentController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates/{id}/revoke": {
      "post": {
        "tags": [
          "Payment"
        ],
        "summary": "Revoke",
        "operationId": "PaymentController_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentDtos_RevokeMandateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_MandateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/mandates/{id}/spend": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Spend",
        "operationId": "PaymentController_spend",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_MandateSpendResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/transactions": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Transactions",
        "operationId": "PaymentController_transactions",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mandateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentDtos_TransactionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/payments/transactions/{id}": {
      "get": {
        "tags": [
          "Payment"
        ],
        "summary": "Transaction",
        "operationId": "PaymentController_transaction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDtos_TransactionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform-llm/warm": {
      "post": {
        "tags": [
          "PlatformPoolWarm"
        ],
        "summary": "Warm",
        "operationId": "PlatformPoolWarmController_warm",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/anomalies": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Anomalies",
        "operationId": "AbuseMonitorController_anomalies",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbuseAnomalyEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/config": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Config",
        "operationId": "AbuseMonitorController_config",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbuseThresholds"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/scores": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Scores",
        "operationId": "AbuseMonitorController_scores",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbuseRiskScore"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/scores/{tenantId}": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Tenant score",
        "operationId": "AbuseMonitorController_tenantScore",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbuseRiskScore"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/scores/{tenantId}/{userId}": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Principal score",
        "operationId": "AbuseMonitorController_principalScore",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbuseRiskScore"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/throttle/{tenantId}/clear": {
      "post": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Clear tenant throttle",
        "operationId": "AbuseMonitorController_clearTenantThrottle",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/throttle/{tenantId}/{userId}/clear": {
      "post": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Clear throttle",
        "operationId": "AbuseMonitorController_clearThrottle",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/abuse-monitor/throttled": {
      "get": {
        "tags": [
          "AbuseMonitor"
        ],
        "summary": "Throttled",
        "operationId": "AbuseMonitorController_throttled",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbuseThrottleService_ThrottleEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/activity": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Recent activity",
        "operationId": "PlatformController_recentActivity",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformActivityEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/ai-reports": {
      "get": {
        "tags": [
          "AiContentReport"
        ],
        "summary": "List",
        "operationId": "AiContentReportController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/ai-reports/{id}": {
      "patch": {
        "tags": [
          "AiContentReport"
        ],
        "summary": "Review",
        "operationId": "AiContentReportController_review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiContentReportReviewRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/alerts/fallback-status": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get fallback alert status",
        "operationId": "PlatformController_getFallbackAlertStatus",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFallbackAlertStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/alerts/fallback-threshold": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update fallback alert threshold",
        "operationId": "PlatformController_updateFallbackAlertThreshold",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFallbackAlertThresholdRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFallbackAlertStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/announcement": {
      "get": {
        "tags": [
          "PlatformBroadcast"
        ],
        "summary": "Announcement",
        "operationId": "PlatformBroadcastController_announcement",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBroadcastService_AnnouncementState"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "PlatformBroadcast"
        ],
        "summary": "Set announcement",
        "operationId": "PlatformBroadcastController_setAnnouncement",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformBroadcastService_AnnouncementUpdate"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBroadcastService_AnnouncementState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/audit/search": {
      "get": {
        "tags": [
          "PlatformAuditSearch"
        ],
        "summary": "Search",
        "operationId": "PlatformAuditSearchController_search",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actorId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actionType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformAuditSearchService_SearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/billing/comp-grants": {
      "get": {
        "tags": [
          "PlatformBilling"
        ],
        "summary": "Comp grants",
        "operationId": "PlatformBillingController_compGrants",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBillingService_CompGrantList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/billing/invoices": {
      "get": {
        "tags": [
          "PlatformBilling"
        ],
        "summary": "Invoices",
        "operationId": "PlatformBillingController_invoices",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBillingService_InvoiceList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/billing/subscriptions": {
      "get": {
        "tags": [
          "PlatformBilling"
        ],
        "summary": "Subscriptions",
        "operationId": "PlatformBillingController_subscriptions",
        "parameters": [
          {
            "name": "plan",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBillingService_SubscriptionList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/billing/summary": {
      "get": {
        "tags": [
          "PlatformBilling"
        ],
        "summary": "Summary",
        "operationId": "PlatformBillingController_summary",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBillingService_BillingSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/chat-generation-settings": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get chat generation settings",
        "operationId": "PlatformController_getChatGenerationSettings",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatGenerationSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update chat generation settings",
        "operationId": "PlatformController_updateChatGenerationSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatGenerationSettingsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatGenerationSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/demo-metrics": {
      "get": {
        "tags": [
          "DemoSandbox"
        ],
        "summary": "Get demo metrics",
        "operationId": "DemoSandboxController_getDemoMetrics",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/demo-sandboxes": {
      "get": {
        "tags": [
          "DemoSandboxReclaim"
        ],
        "summary": "List",
        "operationId": "DemoSandboxReclaimController_list",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoSandboxReclaimService_SandboxListing"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/demo-sandboxes/reclaim": {
      "post": {
        "tags": [
          "DemoSandboxReclaim"
        ],
        "summary": "Reclaim",
        "operationId": "DemoSandboxReclaimController_reclaim",
        "parameters": [
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoSandboxReclaimController_ReclaimRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoSandboxReclaimService_ReclaimResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/demo-settings": {
      "get": {
        "tags": [
          "DemoSandbox"
        ],
        "summary": "Get demo settings",
        "operationId": "DemoSandboxController_getDemoSettings",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "DemoSandbox"
        ],
        "summary": "Update demo settings",
        "operationId": "DemoSandboxController_updateDemoSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoSettingsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/email/suppressions": {
      "get": {
        "tags": [
          "PlatformEmailSuppression"
        ],
        "summary": "List",
        "operationId": "PlatformEmailSuppressionController_list",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformEmailSuppressionService_SuppressionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/email/suppressions/{email}": {
      "delete": {
        "tags": [
          "PlatformEmailSuppression"
        ],
        "summary": "Remove",
        "operationId": "PlatformEmailSuppressionController_remove",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/feature-flags": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List feature flags",
        "operationId": "PlatformController_listFeatureFlags",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeatureFlagResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/feature-flags/{key}": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Upsert feature flag",
        "operationId": "PlatformController_upsertFeatureFlag",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureFlagUpsertRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeatureFlagResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Platform"
        ],
        "summary": "Delete feature flag",
        "operationId": "PlatformController_deleteFeatureFlag",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/feature-flags/{key}/assignments": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List feature flag assignments",
        "operationId": "PlatformController_listFeatureFlagAssignments",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExperimentAssignmentResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/fleet/health": {
      "get": {
        "tags": [
          "FleetHealth"
        ],
        "summary": "Health",
        "operationId": "FleetHealthController_health",
        "parameters": [
          {
            "name": "windowHours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 24
            }
          },
          {
            "name": "maxErrorRate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.10
            }
          },
          {
            "name": "minJobSuccessRate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.90
            }
          },
          {
            "name": "evalDriftDrop",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.05
            }
          },
          {
            "name": "spendSpikeRatio",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double",
              "default": 3.0
            }
          },
          {
            "name": "minCallsForSlo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 5
            }
          },
          {
            "name": "minSpendUsd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double",
              "default": 1.0
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetHealthService_FleetHealthResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/free-tier-quota": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get free tier quota",
        "operationId": "PlatformController_getFreeTierQuota",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeTierUsageLimiterService_QuotaConfig"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update free tier quota",
        "operationId": "PlatformController_updateFreeTierQuota",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreeTierQuotaConfigUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeTierUsageLimiterService_QuotaConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/health": {
      "get": {
        "tags": [
          "PlatformHealth"
        ],
        "summary": "Health",
        "operationId": "PlatformHealthController_health",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/health/dependencies": {
      "get": {
        "tags": [
          "ReliabilityHealth"
        ],
        "summary": "Dependencies",
        "operationId": "ReliabilityHealthController_dependencies",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityApi_DependenciesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-cost": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Hosted llm cost summary",
        "operationId": "PlatformController_hostedLlmCostSummary",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformHostedLlmCostSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-cost/budget": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update hosted llm budget",
        "operationId": "PlatformController_updateHostedLlmBudget",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformHostedLlmBudgetUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformHostedLlmCostSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-cost/by-day": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Hosted llm cost by day",
        "operationId": "PlatformController_hostedLlmCostByDay",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformHostedLlmCostDay"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-providers": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List hosted llm providers",
        "operationId": "PlatformController_listHostedLlmProviders",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformHostedLlmProviderResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Create hosted llm provider",
        "operationId": "PlatformController_createHostedLlmProvider",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformHostedLlmProviderUpsertRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformHostedLlmProviderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-providers/discover-models": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Discover hosted models",
        "operationId": "PlatformController_discoverHostedModels",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformController_DiscoverHostedModelsRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformController_DiscoverHostedModelsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-providers/settings": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get hosted llm pool settings",
        "operationId": "PlatformController_getHostedLlmPoolSettings",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedLlmPoolSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update hosted llm pool settings",
        "operationId": "PlatformController_updateHostedLlmPoolSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HostedLlmPoolSettingsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedLlmPoolSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/hosted-llm-providers/{id}": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update hosted llm provider",
        "operationId": "PlatformController_updateHostedLlmProvider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformHostedLlmProviderUpsertRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformHostedLlmProviderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Platform"
        ],
        "summary": "Delete hosted llm provider",
        "operationId": "PlatformController_deleteHostedLlmProvider",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/impersonation": {
      "get": {
        "tags": [
          "PlatformImpersonation"
        ],
        "summary": "List",
        "operationId": "PlatformImpersonationController_list",
        "parameters": [
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationService_SessionPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "PlatformImpersonation"
        ],
        "summary": "Start",
        "operationId": "PlatformImpersonationController_start",
        "parameters": [
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformImpersonationController_StartRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationService_StartedSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/impersonation/{id}": {
      "delete": {
        "tags": [
          "PlatformImpersonation"
        ],
        "summary": "End",
        "operationId": "PlatformImpersonationController_end",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/issues": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List issues",
        "operationId": "PlatformController_listIssues",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformIssueSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/issues/open-count": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Open issue count",
        "operationId": "PlatformController_openIssueCount",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformObservabilityService_OpenIssueCount"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/jobs": {
      "get": {
        "tags": [
          "PlatformOps"
        ],
        "summary": "Jobs",
        "operationId": "PlatformOpsController_jobs",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledJobRegistryService_JobView"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/jobs/{id}/run": {
      "post": {
        "tags": [
          "PlatformOps"
        ],
        "summary": "Run job",
        "operationId": "PlatformOpsController_runJob",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/kill-switch": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get kill switch status",
        "operationId": "PlatformController_getKillSwitchStatus",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKillSwitchStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/kill-switch/resume": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Resume platform",
        "operationId": "PlatformController_resumePlatform",
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKillSwitchStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/kill-switch/stop": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Stop platform",
        "operationId": "PlatformController_stopPlatform",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmergencyStopRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformKillSwitchStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/landing-metrics": {
      "get": {
        "tags": [
          "LandingEvent"
        ],
        "summary": "Metrics",
        "operationId": "LandingEventController_metrics",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 14
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LandingEventController_LandingMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/llm-tasks": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List llm tasks",
        "operationId": "PlatformController_listLlmTasks",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformLlmTaskConfigResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/llm-tasks/{task}": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Upsert llm task",
        "operationId": "PlatformController_upsertLlmTask",
        "parameters": [
          {
            "name": "task",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PlatformTask"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformLlmTaskUpsertRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformLlmTaskConfigResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/llm-usage": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Llm usage by tenant",
        "operationId": "PlatformController_llmUsageByTenant",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformTenantLlmUsageSummary"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/maintenance": {
      "get": {
        "tags": [
          "PlatformBroadcast"
        ],
        "summary": "Maintenance",
        "operationId": "PlatformBroadcastController_maintenance",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBroadcastService_MaintenanceState"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "PlatformBroadcast"
        ],
        "summary": "Set maintenance",
        "operationId": "PlatformBroadcastController_setMaintenance",
        "parameters": [
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformBroadcastService_MaintenanceUpdate"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformBroadcastService_MaintenanceState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/mcp-review/pending": {
      "get": {
        "tags": [
          "McpRegistryReview"
        ],
        "summary": "Pending",
        "operationId": "McpRegistryReviewController_pending",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/McpPendingReviewResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/mcp-review/{tenantId}/{id}/approve": {
      "post": {
        "tags": [
          "McpRegistryReview"
        ],
        "summary": "Approve",
        "operationId": "McpRegistryReviewController_approve",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/mcp-review/{tenantId}/{id}/reject": {
      "post": {
        "tags": [
          "McpRegistryReview"
        ],
        "summary": "Reject",
        "operationId": "McpRegistryReviewController_reject",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpReviewDecisionRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerRegistrationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/metrics/north-star": {
      "get": {
        "tags": [
          "NorthStar"
        ],
        "summary": "North star",
        "operationId": "NorthStarController_northStar",
        "parameters": [
          {
            "name": "weeks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 12
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NorthStarDtos_NorthStarResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/migrations": {
      "get": {
        "tags": [
          "PlatformOps"
        ],
        "summary": "Migrations",
        "operationId": "PlatformOpsController_migrations",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformMigrationService_MigrationsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/model-catalog/refresh-now": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Refresh model catalog now",
        "operationId": "PlatformController_refreshModelCatalogNow",
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformController_ModelCatalogRefreshResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/moderation/blocklists": {
      "get": {
        "tags": [
          "Moderation"
        ],
        "summary": "Get blocklists",
        "operationId": "ModerationController_getBlocklists",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_BlocklistsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Moderation"
        ],
        "summary": "Upsert blocklist entry",
        "operationId": "ModerationController_upsertBlocklistEntry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationController_BlocklistUpsertRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_BlocklistEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/moderation/policy-packs": {
      "get": {
        "tags": [
          "Moderation"
        ],
        "summary": "Get policy packs",
        "operationId": "ModerationController_getPolicyPacks",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "PLAN"
            }
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "FREE"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_PolicyPacksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Moderation"
        ],
        "summary": "Update policy packs",
        "operationId": "ModerationController_updatePolicyPacks",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationController_PolicyPacksUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_PolicyPacksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/moderation/review-queue": {
      "get": {
        "tags": [
          "Moderation"
        ],
        "summary": "Get review queue",
        "operationId": "ModerationController_getReviewQueue",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_ReviewQueueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/moderation/review-queue/{id}/decision": {
      "post": {
        "tags": [
          "Moderation"
        ],
        "summary": "Decide",
        "operationId": "ModerationController_decide",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationController_ReviewDecisionRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationController_ReviewItemResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/moderation/thresholds": {
      "get": {
        "tags": [
          "Moderation"
        ],
        "summary": "Get thresholds",
        "operationId": "ModerationController_getThresholds",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationThresholdService_Thresholds"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Moderation"
        ],
        "summary": "Update thresholds",
        "operationId": "ModerationController_updateThresholds",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModerationController_ThresholdsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModerationThresholdService_Thresholds"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/newsletter": {
      "post": {
        "tags": [
          "Newsletter"
        ],
        "summary": "Send",
        "operationId": "NewsletterController_send",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsletterSendRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsletterSendResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/newsletter/recipients": {
      "get": {
        "tags": [
          "Newsletter"
        ],
        "summary": "List recipients",
        "operationId": "NewsletterController_listRecipients",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NewsletterRecipient"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/per-user-budget": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get per user budget",
        "operationId": "PlatformController_getPerUserBudget",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerUserBudgetService_BudgetConfig"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update per user budget",
        "operationId": "PlatformController_updatePerUserBudget",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PerUserBudgetConfigUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerUserBudgetService_BudgetConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/plan-limits": {
      "get": {
        "tags": [
          "PlanLimits"
        ],
        "summary": "List plan limits",
        "operationId": "PlanLimitsController_listPlanLimits",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlanLimitsResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/plan-limits/{plan}": {
      "put": {
        "tags": [
          "PlanLimits"
        ],
        "summary": "Update plan limits",
        "operationId": "PlanLimitsController_updatePlanLimits",
        "parameters": [
          {
            "name": "plan",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TenantPlan"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanLimitsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanLimitsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/plugins/artifacts": {
      "post": {
        "tags": [
          "PluginArtifact"
        ],
        "summary": "Upload",
        "operationId": "PluginArtifactController_upload",
        "parameters": [
          {
            "name": "pluginId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginArtifactService_StoredArtifact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/promos/unlimited-14d": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Grant site wide unlimited promo",
        "operationId": "PlatformController_grantSiteWideUnlimitedPromo",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteWidePromoRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteWidePromoResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/rate-control/circuit-breakers": {
      "get": {
        "tags": [
          "PlatformCircuitBreaker"
        ],
        "summary": "List",
        "operationId": "PlatformCircuitBreakerController_list",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformCircuitBreakerController_Listing"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/rate-control/circuit-breakers/reset": {
      "post": {
        "tags": [
          "PlatformCircuitBreaker"
        ],
        "summary": "Reset",
        "operationId": "PlatformCircuitBreakerController_reset",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformCircuitBreakerController_ResetRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformCircuitBreakerController_ResetResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/security/outbound-policy": {
      "get": {
        "tags": [
          "OutboundPolicy"
        ],
        "summary": "Outbound policy",
        "operationId": "OutboundPolicyController_outboundPolicy",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/settings": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List settings",
        "operationId": "PlatformController_listSettings",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformSettingResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/settings/{key}": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update setting",
        "operationId": "PlatformController_updateSetting",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformSettingUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSettingResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/slo": {
      "get": {
        "tags": [
          "ReliabilityHealth"
        ],
        "summary": "Slo",
        "operationId": "ReliabilityHealthController_slo",
        "parameters": [
          {
            "name": "windowHours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 24
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityApi_SloResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/smart-ai": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get smart ai budget",
        "operationId": "PlatformController_getSmartAiBudget",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFeatureBudgetService_GlobalConfig"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update smart ai budget",
        "operationId": "PlatformController_updateSmartAiBudget",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmartAiBudgetConfigUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFeatureBudgetService_GlobalConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/smart-ai/features/{key}": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get smart ai feature",
        "operationId": "PlatformController_getSmartAiFeature",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFeatureBudgetService_FeatureConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update smart ai feature",
        "operationId": "PlatformController_updateSmartAiFeature",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmartAiFeatureConfigUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformFeatureBudgetService_FeatureConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/by-day": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "By day",
        "operationId": "PlatformSpendController_byDay",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSpendService_DayReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/by-model": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "By model",
        "operationId": "PlatformSpendController_byModel",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSpendService_ModelReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/by-provider": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "By provider",
        "operationId": "PlatformSpendController_byProvider",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSpendService_ProviderReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/by-tenant": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "By tenant",
        "operationId": "PlatformSpendController_byTenant",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSpendService_TenantReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/export.csv": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "Export csv",
        "operationId": "PlatformSpendController_exportCsv",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "tenant"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/spend/summary": {
      "get": {
        "tags": [
          "PlatformSpend"
        ],
        "summary": "Summary",
        "operationId": "PlatformSpendController_summary",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSpendService_SummaryReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenant-counts": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Tenant counts",
        "operationId": "PlatformController_tenantCounts",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTenantCounts"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenant-detail": {
      "get": {
        "tags": [
          "PlatformTenantDetail"
        ],
        "summary": "List",
        "operationId": "PlatformTenantDetailController_list",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformTenantDetailController_TenantRef"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenant-detail/{tenantId}": {
      "get": {
        "tags": [
          "PlatformTenantDetail"
        ],
        "summary": "Get",
        "operationId": "PlatformTenantDetailController_get",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTenantDetailController_TenantDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "List tenants",
        "operationId": "PlatformController_listTenants",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformTenantSummary"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}": {
      "delete": {
        "tags": [
          "TenantDeletion"
        ],
        "summary": "Delete tenant",
        "operationId": "TenantDeletionController_deleteTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantDeletionController_DeleteTenantRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/data-residency": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Change data residency region",
        "operationId": "PlatformController_changeDataResidencyRegion",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformTenantDataResidencyUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTenantSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/emergency-resume": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Emergency resume tenant",
        "operationId": "PlatformController_emergencyResumeTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/emergency-stop": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Emergency stop tenant",
        "operationId": "PlatformController_emergencyStopTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmergencyStopRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/logout-all": {
      "post": {
        "tags": [
          "PlatformSession"
        ],
        "summary": "Logout tenant",
        "operationId": "PlatformSessionController_logoutTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "format": "int32"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/plan": {
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Change tenant plan",
        "operationId": "PlatformController_changeTenantPlan",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformTenantPlanUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTenantSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/spend-cap": {
      "get": {
        "tags": [
          "PlatformSpendCap"
        ],
        "summary": "Get",
        "operationId": "PlatformSpendCapController_get",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendCapService_CapStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "PlatformSpendCap"
        ],
        "summary": "Put",
        "operationId": "PlatformSpendCapController_put",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Master-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformSpendCapController_SpendCapUpdate"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendCapService_CapStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tenants/{tenantId}/usage-quota/reset": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Reset tenant usage quota",
        "operationId": "PlatformController_resetTenantUsageQuota",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tool-credentials": {
      "get": {
        "tags": [
          "PlatformToolCredential"
        ],
        "summary": "List all",
        "operationId": "PlatformToolCredentialController_listAll",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlatformToolCredentialStatusResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tool-credentials/{toolKey}": {
      "post": {
        "tags": [
          "PlatformToolCredential"
        ],
        "summary": "Activate",
        "operationId": "PlatformToolCredentialController_activate",
        "parameters": [
          {
            "name": "toolKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformToolCredentialActivationRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformToolCredentialStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "PlatformToolCredential"
        ],
        "summary": "Deactivate",
        "operationId": "PlatformToolCredentialController_deactivate",
        "parameters": [
          {
            "name": "toolKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/tool-credentials/{toolKey}/status": {
      "get": {
        "tags": [
          "PlatformToolCredential"
        ],
        "summary": "Status",
        "operationId": "PlatformToolCredentialController_status",
        "parameters": [
          {
            "name": "toolKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformToolCredentialStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/traces": {
      "get": {
        "tags": [
          "PlatformTrace"
        ],
        "summary": "List",
        "operationId": "PlatformTraceController_list",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTraceDtos_TraceListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/traces/metrics": {
      "get": {
        "tags": [
          "PlatformTrace"
        ],
        "summary": "Metrics",
        "operationId": "PlatformTraceController_metrics",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTraceDtos_TraceMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/traces/{id}": {
      "get": {
        "tags": [
          "PlatformTrace"
        ],
        "summary": "Detail",
        "operationId": "PlatformTraceController_detail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformTraceDtos_TraceDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/translation-job": {
      "get": {
        "tags": [
          "Platform"
        ],
        "summary": "Get translation job",
        "operationId": "PlatformController_getTranslationJob",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranslationJobSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Platform"
        ],
        "summary": "Update translation job",
        "operationId": "PlatformController_updateTranslationJob",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranslationJobSettingsUpdateRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranslationJobSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/translation-job/run-now": {
      "post": {
        "tags": [
          "Platform"
        ],
        "summary": "Run translation job now",
        "operationId": "PlatformController_runTranslationJobNow",
        "x-roles": [
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranslationJobSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users": {
      "get": {
        "tags": [
          "PlatformUser"
        ],
        "summary": "List",
        "operationId": "PlatformUserController_list",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUserController_UserListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users/{keycloakUserId}/logout": {
      "post": {
        "tags": [
          "PlatformSession"
        ],
        "summary": "Logout user",
        "operationId": "PlatformSessionController_logoutUser",
        "parameters": [
          {
            "name": "keycloakUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users/{userId}": {
      "get": {
        "tags": [
          "PlatformUser"
        ],
        "summary": "Get",
        "operationId": "PlatformUserController_get",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUserController_UserDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users/{userId}/enabled": {
      "put": {
        "tags": [
          "PlatformUser"
        ],
        "summary": "Set enabled",
        "operationId": "PlatformUserController_setEnabled",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformUserController_EnabledRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUserController_UserDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users/{userId}/password-reset-email": {
      "post": {
        "tags": [
          "PlatformUser"
        ],
        "summary": "Send password reset",
        "operationId": "PlatformUserController_sendPasswordReset",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUserController_ActionResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/users/{userId}/roles": {
      "put": {
        "tags": [
          "PlatformUser"
        ],
        "summary": "Set roles",
        "operationId": "PlatformUserController_setRoles",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlatformUserController_RolesRequest"
              }
            }
          }
        },
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformUserController_UserDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/version": {
      "get": {
        "tags": [
          "PlatformOps"
        ],
        "summary": "Version",
        "operationId": "PlatformOpsController_version",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformVersionService_VersionsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/platform/web-search/providers": {
      "get": {
        "tags": [
          "WebSearchProviders"
        ],
        "summary": "Providers",
        "operationId": "WebSearchProvidersController_providers",
        "x-roles": [
          "platform-admin"
        ],
        "description": "Restricted to platform-admin.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSearchProviderRegistry_Status"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/plugins/artifacts/{pluginId}/{version}/{fileName}": {
      "get": {
        "tags": [
          "PluginArtifact"
        ],
        "summary": "Download",
        "operationId": "PluginArtifactController_download",
        "parameters": [
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/plugins/catalog": {
      "get": {
        "tags": [
          "PluginCatalog"
        ],
        "summary": "Get catalog",
        "operationId": "PluginCatalogController_getCatalog",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginCatalogController_PluginCatalog"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/procedures": {
      "get": {
        "tags": [
          "Procedure"
        ],
        "summary": "List",
        "operationId": "ProcedureController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProcedureResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Procedure"
        ],
        "summary": "Create",
        "operationId": "ProcedureController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcedureRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcedureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/procedures/{id}": {
      "get": {
        "tags": [
          "Procedure"
        ],
        "summary": "Get",
        "operationId": "ProcedureController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcedureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Procedure"
        ],
        "summary": "Update",
        "operationId": "ProcedureController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcedureRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcedureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Procedure"
        ],
        "summary": "Delete",
        "operationId": "ProcedureController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/procedures/{id}/activate": {
      "post": {
        "tags": [
          "Procedure"
        ],
        "summary": "Activate",
        "operationId": "ProcedureController_activate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcedureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/procedures/{id}/archive": {
      "post": {
        "tags": [
          "Procedure"
        ],
        "summary": "Archive",
        "operationId": "ProcedureController_archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcedureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompt-directives": {
      "get": {
        "tags": [
          "PromptDirective"
        ],
        "summary": "Overview",
        "operationId": "PromptDirectiveController_overview",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDirectiveAdminService_Overview"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompt-directives/custom-instructions": {
      "put": {
        "tags": [
          "PromptDirective"
        ],
        "summary": "Put custom instructions",
        "operationId": "PromptDirectiveController_putCustomInstructions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptDirectiveController_CustomInstructionsUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDirectiveAdminService_Overview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "PromptDirective"
        ],
        "summary": "Clear custom instructions",
        "operationId": "PromptDirectiveController_clearCustomInstructions",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompt-directives/{key}": {
      "put": {
        "tags": [
          "PromptDirective"
        ],
        "summary": "Put",
        "operationId": "PromptDirectiveController_put",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptDirectiveController_DirectiveUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDirectiveAdminService_Overview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "PromptDirective"
        ],
        "summary": "Reset",
        "operationId": "PromptDirectiveController_reset",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts": {
      "get": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "List",
        "operationId": "PromptAdminController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromptOverrideService_PromptView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts/{key}": {
      "get": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "Get",
        "operationId": "PromptAdminController_get",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverrideService_PromptView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts/{key}/history": {
      "get": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "History",
        "operationId": "PromptAdminController_history",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "tenant"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromptHistoryEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts/{key}/overrides/{scope}": {
      "put": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "Put",
        "operationId": "PromptAdminController_put",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptAdminController_OverrideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverrideService_Applied"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "Revert",
        "operationId": "PromptAdminController_revert",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expectedVersion",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverrideService_Applied"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts/{key}/overrides/{scope}/restore": {
      "post": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "Restore",
        "operationId": "PromptAdminController_restore",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptAdminController_RestoreRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverrideService_Applied"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/prompts/{key}/validate": {
      "post": {
        "tags": [
          "PromptAdmin"
        ],
        "summary": "Validate",
        "operationId": "PromptAdminController_validate",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptAdminController_ValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptOverrideService_Validation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers": {
      "get": {
        "tags": [
          "Provider"
        ],
        "summary": "List",
        "operationId": "ProviderController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Provider"
        ],
        "summary": "Activate",
        "operationId": "ProviderController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/availability": {
      "get": {
        "tags": [
          "Provider"
        ],
        "summary": "Availability",
        "operationId": "ProviderController_availability",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderAvailabilityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/default-model": {
      "get": {
        "tags": [
          "TenantDefaultModel"
        ],
        "summary": "Default model",
        "operationId": "TenantDefaultModelController_defaultModel",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDefaultModelService_DefaultModel"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/local-openai/probe": {
      "post": {
        "tags": [
          "LocalOpenAiProbe"
        ],
        "summary": "Probe",
        "operationId": "LocalOpenAiProbeController_probe",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocalOpenAiProbeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalOpenAiProbeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/modalities": {
      "get": {
        "tags": [
          "Provider"
        ],
        "summary": "Modalities",
        "operationId": "ProviderController_modalities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModalityCatalogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/platform-llm": {
      "get": {
        "tags": [
          "Provider"
        ],
        "summary": "Platform llm",
        "operationId": "ProviderController_platformLlm",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformHostedLlmActiveResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/{provider}": {
      "delete": {
        "tags": [
          "Provider"
        ],
        "summary": "Deactivate",
        "operationId": "ProviderController_deactivate",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/providers/{provider}/models": {
      "get": {
        "tags": [
          "Provider"
        ],
        "summary": "List models",
        "operationId": "ProviderController_listModels",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderModelResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/public/apps/by-host": {
      "get": {
        "tags": [
          "StudioAppDomainPublic"
        ],
        "summary": "By host",
        "operationId": "StudioAppDomainPublicController_byHost",
        "parameters": [
          {
            "name": "host",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/domain-check": {
      "get": {
        "tags": [
          "StudioAppDomainPublic"
        ],
        "summary": "Domain check",
        "operationId": "StudioAppDomainPublicController_domainCheck",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}": {
      "get": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Manifest",
        "operationId": "StudioAppPublicController_manifest",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/ai/chat": {
      "post": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Ai chat",
        "operationId": "StudioAppPublicController_aiChat",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppPublicController_AiChatRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/auth/login": {
      "post": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Login",
        "operationId": "StudioAppPublicController_login",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppPublicController_LoginRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/auth/logout": {
      "post": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Logout",
        "operationId": "StudioAppPublicController_logout",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/auth/me": {
      "get": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Me",
        "operationId": "StudioAppPublicController_me",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/auth/signup": {
      "post": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Signup",
        "operationId": "StudioAppPublicController_signup",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppPublicController_SignupRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/apps/{slug}/call/{alias}": {
      "post": {
        "tags": [
          "StudioAppPublic"
        ],
        "summary": "Call",
        "operationId": "StudioAppPublicController_call",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alias",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppPublicController_CallRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/email/unsubscribe": {
      "get": {
        "tags": [
          "EmailUnsubscribe"
        ],
        "summary": "Confirm",
        "operationId": "EmailUnsubscribeController_confirm",
        "parameters": [
          {
            "name": "t",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "EmailUnsubscribe"
        ],
        "summary": "Unsubscribe",
        "operationId": "EmailUnsubscribeController_unsubscribe",
        "parameters": [
          {
            "name": "t",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/landing-event": {
      "post": {
        "tags": [
          "LandingEvent"
        ],
        "summary": "Record",
        "operationId": "LandingEventController_record",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LandingEventController_LandingEventRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/status": {
      "get": {
        "tags": [
          "PublicStatus"
        ],
        "summary": "Get",
        "operationId": "PublicStatusController_get",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicStatusController_PublicStatusResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/public/workflow-forms/{token}": {
      "get": {
        "tags": [
          "WorkflowForm"
        ],
        "summary": "View",
        "operationId": "WorkflowFormController_view",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "WorkflowForm"
        ],
        "summary": "Submit",
        "operationId": "WorkflowFormController_submit",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/quick-task": {
      "post": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Run",
        "operationId": "QuickTaskController_run",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickTaskRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickTaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/quick-task/preview": {
      "post": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Preview",
        "operationId": "QuickTaskController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickTaskPreviewRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickTaskPreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/quick-task/recent": {
      "get": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Recent tasks",
        "operationId": "QuickTaskController_recentTasks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QuickTaskRunSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/quick-task/stream": {
      "post": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Run stream",
        "operationId": "QuickTaskController_runStream",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuickTaskRequest"
              }
            }
          }
        },
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/quick-task/{taskId}": {
      "get": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Get task",
        "operationId": "QuickTaskController_getTask",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickTaskRunDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/quick-task/{taskId}/cancel": {
      "post": {
        "tags": [
          "QuickTask"
        ],
        "summary": "Cancel task",
        "operationId": "QuickTaskController_cancelTask",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/research/runs": {
      "get": {
        "tags": [
          "ResearchRun"
        ],
        "summary": "List",
        "operationId": "ResearchRunController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentJobSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ResearchRun"
        ],
        "summary": "Start",
        "operationId": "ResearchRunController_start",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResearchRunStartRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/research/runs/{jobId}": {
      "get": {
        "tags": [
          "ResearchRun"
        ],
        "summary": "Get",
        "operationId": "ResearchRunController_get",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/research/runs/{jobId}/cancel": {
      "post": {
        "tags": [
          "ResearchRun"
        ],
        "summary": "Cancel",
        "operationId": "ResearchRunController_cancel",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/research/status": {
      "get": {
        "tags": [
          "ResearchRun"
        ],
        "summary": "Status",
        "operationId": "ResearchRunController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/export/preferences": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Preferences jsonl",
        "operationId": "RlController_preferencesJsonl",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 500
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/export/trajectories": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Trajectories jsonl",
        "operationId": "RlController_trajectoriesJsonl",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 500
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/policies": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Policies",
        "operationId": "RlController_policies",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RlSummaryResponse_PolicyState"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/policies/{dimension}": {
      "put": {
        "tags": [
          "Rl"
        ],
        "summary": "Update policy",
        "operationId": "RlController_updatePolicy",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dimension",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PolicyDimension"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyUpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RlSummaryResponse_PolicyState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/policies/{dimension}/arms": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Arms",
        "operationId": "RlController_arms",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dimension",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PolicyDimension"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PolicyArmResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Rl"
        ],
        "summary": "Add arm",
        "operationId": "RlController_addArm",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dimension",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PolicyDimension"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyArmRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyArmResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/policies/{dimension}/arms/{armId}": {
      "delete": {
        "tags": [
          "Rl"
        ],
        "summary": "Delete arm",
        "operationId": "RlController_deleteArm",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dimension",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PolicyDimension"
            }
          },
          {
            "name": "armId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/preferences": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Preferences",
        "operationId": "RlController_preferences",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 500
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RlPreferenceExport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/rl/agents/{agentId}/summary": {
      "get": {
        "tags": [
          "Rl"
        ],
        "summary": "Summary",
        "operationId": "RlController_summary",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RlSummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sandbox/artifacts/{id}": {
      "get": {
        "tags": [
          "SandboxArtifact"
        ],
        "summary": "Download",
        "operationId": "SandboxArtifactController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sarvam/audio": {
      "get": {
        "tags": [
          "SarvamGeneratedAudio"
        ],
        "summary": "List",
        "operationId": "SarvamGeneratedAudioController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SarvamGeneratedAudioResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sarvam/audio/{id}": {
      "get": {
        "tags": [
          "SarvamGeneratedAudio"
        ],
        "summary": "Download",
        "operationId": "SarvamGeneratedAudioController_download",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sarvam/credential": {
      "post": {
        "tags": [
          "Sarvam"
        ],
        "summary": "Activate",
        "operationId": "SarvamController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SarvamCredentialActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SarvamCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Sarvam"
        ],
        "summary": "Deactivate",
        "operationId": "SarvamController_deactivate",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sarvam/credential/status": {
      "get": {
        "tags": [
          "Sarvam"
        ],
        "summary": "Status",
        "operationId": "SarvamController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SarvamCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks": {
      "get": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "List",
        "operationId": "ScheduledTaskController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Create",
        "operationId": "ScheduledTaskController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledTaskDtos_TaskRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/capabilities": {
      "get": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Capabilities",
        "operationId": "ScheduledTaskController_capabilities",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_Capabilities"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/preview": {
      "post": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Preview",
        "operationId": "ScheduledTaskController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledTaskDtos_PreviewRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_PreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/{id}": {
      "get": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Get",
        "operationId": "ScheduledTaskController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Update",
        "operationId": "ScheduledTaskController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledTaskDtos_TaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Delete",
        "operationId": "ScheduledTaskController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/{id}/pause": {
      "post": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Pause",
        "operationId": "ScheduledTaskController_pause",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/{id}/resume": {
      "post": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Resume",
        "operationId": "ScheduledTaskController_resume",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_TaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/{id}/run-now": {
      "post": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Run now",
        "operationId": "ScheduledTaskController_runNow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledTaskDtos_RunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/scheduled-tasks/{id}/runs": {
      "get": {
        "tags": [
          "ScheduledTask"
        ],
        "summary": "Runs",
        "operationId": "ScheduledTaskController_runs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledTaskDtos_RunResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/credential": {
      "post": {
        "tags": [
          "E2bCredential"
        ],
        "summary": "Activate",
        "operationId": "E2bCredentialController_activate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/E2bCredentialActivationRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2bCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "E2bCredential"
        ],
        "summary": "Deactivate",
        "operationId": "E2bCredentialController_deactivate",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/credential/code-execution-template": {
      "put": {
        "tags": [
          "E2bCredential"
        ],
        "summary": "Set code execution template",
        "operationId": "E2bCredentialController_setCodeExecutionTemplate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/E2bCodeExecutionTemplateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2bCredentialResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/credential/status": {
      "get": {
        "tags": [
          "E2bCredential"
        ],
        "summary": "Status",
        "operationId": "E2bCredentialController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2bCredentialResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/sandbox": {
      "get": {
        "tags": [
          "E2bSandbox"
        ],
        "summary": "List",
        "operationId": "E2bSandboxController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SandboxSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "E2bSandbox"
        ],
        "summary": "Create",
        "operationId": "E2bSandboxController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSandboxRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/sandbox/run-code": {
      "post": {
        "tags": [
          "E2bSandbox"
        ],
        "summary": "Run code",
        "operationId": "E2bSandboxController_runCode",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunCodeRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunCodeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/sdlc/sandbox/{sandboxId}": {
      "delete": {
        "tags": [
          "E2bSandbox"
        ],
        "summary": "Kill",
        "operationId": "E2bSandboxController_kill",
        "parameters": [
          {
            "name": "sandboxId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/secrets": {
      "get": {
        "tags": [
          "SecretVault"
        ],
        "summary": "List",
        "operationId": "SecretVaultController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SecretResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "SecretVault"
        ],
        "summary": "Store",
        "operationId": "SecretVaultController_store",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretStoreRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/secrets/{id}": {
      "delete": {
        "tags": [
          "SecretVault"
        ],
        "summary": "Delete",
        "operationId": "SecretVaultController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "purge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/secrets/{id}/allowed-hosts": {
      "put": {
        "tags": [
          "SecretVault"
        ],
        "summary": "Update allowed hosts",
        "operationId": "SecretVaultController_updateAllowedHosts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretVaultController_AllowedHostsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/session/config": {
      "get": {
        "tags": [
          "SessionConfig"
        ],
        "summary": "Get config",
        "operationId": "SessionConfigController_getConfig",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionConfigController_SessionConfigResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/agent-hooks": {
      "get": {
        "tags": [
          "AgentHooksDefaults"
        ],
        "summary": "Get",
        "operationId": "AgentHooksDefaultsController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHookDtos_TenantHooksResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "AgentHooksDefaults"
        ],
        "summary": "Put",
        "operationId": "AgentHooksDefaultsController_put",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentHookDtos_TenantHooksResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/catalog": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Catalog",
        "operationId": "SettingsController_catalog",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_CatalogResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/effective": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Effective",
        "operationId": "SettingsController_effective",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_EffectiveResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/history": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "History all",
        "operationId": "SettingsController_historyAll",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "description": "The change history of every setting in one call, newest first. scope=all (default) is the workspace's own changes plus every agent's (tenant admin), scope=tenant the workspace's only, scope=agent every agent's (tenant admin), scope=agent with agentId one agent's (EDITOR on it). since (ISO-8601 instant) keeps rows at or after it; page with limit and offset, the body carries total and hasMore.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_HistoryPageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/tenant/{key}": {
      "put": {
        "tags": [
          "Settings"
        ],
        "summary": "Put tenant",
        "operationId": "SettingsController_putTenant",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsController_ValueRequest"
              }
            }
          }
        },
        "description": "Set a runtime setting for the whole workspace (tenant admin). Body {value, reason}: a high or security key needs a typed reason, and a security key can only be made stricter than the value it inherits. Answers 409 SETTING_LOCKED when the operator pinned the key (app.settings.locked) and 409 SETTING_CONFLICT when another writer changed the same key at the same moment (reload and retry).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_WriteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Settings"
        ],
        "summary": "Delete tenant",
        "operationId": "SettingsController_deleteTenant",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Remove the workspace override so the platform value applies again (tenant admin). A high or security key needs a typed reason (?reason=), like a PUT. Answers 409 SETTING_LOCKED when the key is pinned and 409 SETTING_CONFLICT when another writer changed it at the same moment.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsController_WriteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/settings/{key}/history": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "History",
        "operationId": "SettingsController_history",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "tenant"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "description": "The change history of one setting, newest first. scope=tenant needs a tenant admin; scope=agent with agentId needs EDITOR on the agent. For every key at once use GET /api/settings/history.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SettingHistoryEntry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/share/agents/{shareId}": {
      "get": {
        "tags": [
          "AgentShare"
        ],
        "summary": "Meta",
        "operationId": "AgentShareController_meta",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/chat": {
      "post": {
        "tags": [
          "AgentShare"
        ],
        "summary": "Chat",
        "operationId": "AgentShareController_chat",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentShareController_ShareChatRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/chat/stream": {
      "post": {
        "tags": [
          "AgentShare"
        ],
        "summary": "Chat stream",
        "operationId": "AgentShareController_chatStream",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentShareController_ShareChatStreamRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/event-stream": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/report": {
      "post": {
        "tags": [
          "AgentShare"
        ],
        "summary": "Report",
        "operationId": "AgentShareController_report",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentShareController_ShareReportRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/vision/sessions": {
      "post": {
        "tags": [
          "AgentShareVision"
        ],
        "summary": "Start",
        "operationId": "AgentShareVisionController_start",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentShareVisionController_ShareVisionSessionStartRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/vision/sessions/{sessionId}/end": {
      "post": {
        "tags": [
          "AgentShareVision"
        ],
        "summary": "End",
        "operationId": "AgentShareVisionController_end",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/voice/token": {
      "post": {
        "tags": [
          "AgentShareVoice"
        ],
        "summary": "Token",
        "operationId": "AgentShareVoiceController_token",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceTokenRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/agents/{shareId}/voice/turn": {
      "post": {
        "tags": [
          "AgentShareVoice"
        ],
        "summary": "Turn",
        "operationId": "AgentShareVoiceController_turn",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "audio": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "audio"
                ]
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/event-stream": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/branding/{tenantId}/logo.{ext}": {
      "get": {
        "tags": [
          "TenantBrandingLogo"
        ],
        "summary": "Serve",
        "operationId": "TenantBrandingLogoController_serve",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ext",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/workflows/{shareId}": {
      "get": {
        "tags": [
          "WorkflowShare"
        ],
        "summary": "Meta",
        "operationId": "WorkflowShareController_meta",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/workflows/{shareId}/report": {
      "post": {
        "tags": [
          "WorkflowShare"
        ],
        "summary": "Report",
        "operationId": "WorkflowShareController_report",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowShareController_ShareReportRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/workflows/{shareId}/run": {
      "post": {
        "tags": [
          "WorkflowShare"
        ],
        "summary": "Run",
        "operationId": "WorkflowShareController_run",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowShareController_ShareRunRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/share/workflows/{shareId}/turn": {
      "post": {
        "tags": [
          "WorkflowShareVoice"
        ],
        "summary": "Turn",
        "operationId": "WorkflowShareVoiceController_turn",
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "audio": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "audio"
                ]
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/shared-with-me": {
      "get": {
        "tags": [
          "SharedWithMe"
        ],
        "summary": "Shared with me",
        "operationId": "SharedWithMeController_sharedWithMe",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedWithMeController_SharedResourceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/signup": {
      "post": {
        "tags": [
          "TenantSignup"
        ],
        "summary": "Signup",
        "operationId": "TenantSignupController_signup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupRequest"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/skill-security/preview/archive": {
      "post": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Preview archive",
        "operationId": "SkillSupplyChainController_previewArchive",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_PreviewResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/preview/draft": {
      "post": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Preview draft",
        "operationId": "SkillSupplyChainController_previewDraft",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillSupplyChainController_DraftPreviewRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_PreviewResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/preview/registry": {
      "post": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Preview registry",
        "operationId": "SkillSupplyChainController_previewRegistry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillSupplyChainController_RegistryPreviewRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_PreviewResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/reviews": {
      "get": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Reviews",
        "operationId": "SkillSupplyChainController_reviews",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillSupplyChainService_SkillReviewItem"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/skills/{name}/approve": {
      "post": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Approve",
        "operationId": "SkillSupplyChainController_approve",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillSupplyChainController_ApproveRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_SkillSecurityReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/skills/{name}/report": {
      "get": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Report",
        "operationId": "SkillSupplyChainController_report",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_SkillSecurityReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skill-security/summary": {
      "get": {
        "tags": [
          "SkillSupplyChain"
        ],
        "summary": "Summary",
        "operationId": "SkillSupplyChainController_summary",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillSupplyChainService_SecurityOverview"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "List",
        "operationId": "SkillController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillController_SkillSummaryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Skill"
        ],
        "summary": "Create",
        "operationId": "SkillController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillController_SkillWriteRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/import": {
      "post": {
        "tags": [
          "Skill"
        ],
        "summary": "Import archive",
        "operationId": "SkillController_importArchive",
        "parameters": [
          {
            "name": "replace",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_ImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/registry/install": {
      "post": {
        "tags": [
          "Skill"
        ],
        "summary": "Install from registry",
        "operationId": "SkillController_installFromRegistry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillController_RegistryInstallRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_ImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/registry/search": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Search registry",
        "operationId": "SkillController_searchRegistry",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillRegistryClient_SearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}": {
      "put": {
        "tags": [
          "Skill"
        ],
        "summary": "Update",
        "operationId": "SkillController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillController_SkillWriteRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Skill"
        ],
        "summary": "Delete",
        "operationId": "SkillController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/agents": {
      "post": {
        "tags": [
          "SkillLifecycle"
        ],
        "summary": "Set agents",
        "operationId": "SkillLifecycleController_setAgents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillLifecycleController_AgentsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillLifecycleController_AgentsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/approve": {
      "post": {
        "tags": [
          "SkillLifecycle"
        ],
        "summary": "Approve",
        "operationId": "SkillLifecycleController_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillSummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/archive": {
      "post": {
        "tags": [
          "SkillLifecycle"
        ],
        "summary": "Archive",
        "operationId": "SkillLifecycleController_archive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillSummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/improvement": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Pending improvement",
        "operationId": "SkillController_pendingImprovement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_PendingImprovementResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Skill"
        ],
        "summary": "Discard improvement",
        "operationId": "SkillController_discardImprovement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/improvement/apply": {
      "post": {
        "tags": [
          "Skill"
        ],
        "summary": "Apply improvement",
        "operationId": "SkillController_applyImprovement",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/reject": {
      "post": {
        "tags": [
          "SkillLifecycle"
        ],
        "summary": "Reject",
        "operationId": "SkillLifecycleController_reject",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillLifecycleController_RejectRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillSummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{id}/versions": {
      "get": {
        "tags": [
          "SkillLifecycle"
        ],
        "summary": "Versions",
        "operationId": "SkillLifecycleController_versions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SkillLifecycleController_VersionSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{name}": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Get",
        "operationId": "SkillController_get",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillController_SkillDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{name}/enabled": {
      "patch": {
        "tags": [
          "Skill"
        ],
        "summary": "Set enabled",
        "operationId": "SkillController_setEnabled",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillController_EnabledRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin",
          "platform-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin or platform-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{name}/export": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "Export",
        "operationId": "SkillController_export",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/skills/{name}/file": {
      "get": {
        "tags": [
          "Skill"
        ],
        "summary": "File",
        "operationId": "SkillController_file",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps": {
      "get": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "List",
        "operationId": "StudioAppOwnerController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioAppOwnerController_AppSummary"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/publish": {
      "post": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Publish",
        "operationId": "StudioAppOwnerController_publish",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppService_PublishRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}": {
      "get": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Detail",
        "operationId": "StudioAppOwnerController_detail",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Delete",
        "operationId": "StudioAppOwnerController_delete",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/disable": {
      "post": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Disable",
        "operationId": "StudioAppOwnerController_disable",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/domains": {
      "get": {
        "tags": [
          "StudioAppDomain"
        ],
        "summary": "List",
        "operationId": "StudioAppDomainController_list",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioAppDomainController_DomainView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "StudioAppDomain"
        ],
        "summary": "Add",
        "operationId": "StudioAppDomainController_add",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAppDomainController_AddRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/domains/{domainId}": {
      "delete": {
        "tags": [
          "StudioAppDomain"
        ],
        "summary": "Remove",
        "operationId": "StudioAppDomainController_remove",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/domains/{domainId}/verify": {
      "post": {
        "tags": [
          "StudioAppDomain"
        ],
        "summary": "Verify",
        "operationId": "StudioAppDomainController_verify",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioAppDomainController_DomainView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/enable": {
      "post": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Enable",
        "operationId": "StudioAppOwnerController_enable",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/users": {
      "get": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Users",
        "operationId": "StudioAppOwnerController_users",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/users/{userId}": {
      "delete": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Delete user",
        "operationId": "StudioAppOwnerController_deleteUser",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/users/{userId}/disable": {
      "post": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Disable user",
        "operationId": "StudioAppOwnerController_disableUser",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-apps/{appId}/users/{userId}/enable": {
      "post": {
        "tags": [
          "StudioAppOwner"
        ],
        "summary": "Enable user",
        "operationId": "StudioAppOwnerController_enableUser",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects": {
      "get": {
        "tags": [
          "StudioProject"
        ],
        "summary": "List",
        "operationId": "StudioProjectController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioProjectController_ProjectView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects/{id}": {
      "get": {
        "tags": [
          "StudioProject"
        ],
        "summary": "Detail",
        "operationId": "StudioProjectController_detail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioProjectController_ProjectView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "StudioProject"
        ],
        "summary": "Upsert",
        "operationId": "StudioProjectController_upsert",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioProjectController_UpsertBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioProjectController_ProjectView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "StudioProject"
        ],
        "summary": "Delete",
        "operationId": "StudioProjectController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects/{id}/comments": {
      "get": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Comments",
        "operationId": "StudioCollabController_comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioCollabController_CommentView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Comment",
        "operationId": "StudioCollabController_comment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCollabController_CommentBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioCollabController_CommentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects/{id}/comments/{commentId}": {
      "delete": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Delete comment",
        "operationId": "StudioCollabController_deleteComment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Resolve",
        "operationId": "StudioCollabController_resolve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCollabController_ResolveBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioCollabController_CommentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects/{id}/members": {
      "get": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Members",
        "operationId": "StudioCollabController_members",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioCollabController_MemberView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Invite",
        "operationId": "StudioCollabController_invite",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCollabController_InviteBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioCollabController_MemberView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/studio-projects/{id}/members/{subject}": {
      "delete": {
        "tags": [
          "StudioCollab"
        ],
        "summary": "Remove",
        "operationId": "StudioCollabController_remove",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/system/status": {
      "get": {
        "tags": [
          "SystemStatus"
        ],
        "summary": "Get",
        "operationId": "SystemStatusController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/system/status/live": {
      "get": {
        "tags": [
          "SystemStatus"
        ],
        "summary": "Live",
        "operationId": "SystemStatusController_live",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/system/status/llm-telemetry": {
      "get": {
        "tags": [
          "SystemStatus"
        ],
        "summary": "Llm telemetry",
        "operationId": "SystemStatusController_llmTelemetry",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmDashboardMetrics"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/system/stdio-sandbox": {
      "get": {
        "tags": [
          "StdioSandboxStatus"
        ],
        "summary": "Get",
        "operationId": "StdioSandboxStatusController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StdioSandboxStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates": {
      "get": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "List",
        "operationId": "CommunityTemplateController_list",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TemplateKind"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Create",
        "operationId": "CommunityTemplateController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TEMPLATES"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TEMPLATES (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/gallery": {
      "get": {
        "tags": [
          "TemplateGallery"
        ],
        "summary": "Gallery",
        "operationId": "TemplateGalleryController_gallery",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TemplateKind"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 24
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/templates/gallery/standard": {
      "get": {
        "tags": [
          "TemplateGallery"
        ],
        "summary": "Standard",
        "operationId": "TemplateGalleryController_standard",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateStandard_Guide"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/templates/gallery/{id}": {
      "get": {
        "tags": [
          "TemplateGallery"
        ],
        "summary": "Detail",
        "operationId": "TemplateGalleryController_detail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/templates/gallery/{id}/ratings": {
      "get": {
        "tags": [
          "TemplateGallery"
        ],
        "summary": "Ratings",
        "operationId": "TemplateGalleryController_ratings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateRatingView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/templates/mine": {
      "get": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Mine",
        "operationId": "CommunityTemplateController_mine",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}": {
      "put": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Update",
        "operationId": "CommunityTemplateController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}/import": {
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Import template",
        "operationId": "CommunityTemplateController_importTemplate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateImportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}/rating": {
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Rate",
        "operationId": "CommunityTemplateController_rate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRatingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Unrate",
        "operationId": "CommunityTemplateController_unrate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateSummary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}/submit": {
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Submit",
        "operationId": "CommunityTemplateController_submit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TEMPLATES"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TEMPLATES (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}/validate": {
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Validate",
        "operationId": "CommunityTemplateController_validate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ai",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateReview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/templates/{id}/withdraw": {
      "post": {
        "tags": [
          "CommunityTemplate"
        ],
        "summary": "Withdraw",
        "operationId": "CommunityTemplateController_withdraw",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/ai-model-preferences": {
      "get": {
        "tags": [
          "TenantAiModelPreference"
        ],
        "summary": "Get",
        "operationId": "TenantAiModelPreferenceController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AiModelPreferenceResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/ai-model-preferences/{featureKey}": {
      "put": {
        "tags": [
          "TenantAiModelPreference"
        ],
        "summary": "Update",
        "operationId": "TenantAiModelPreferenceController_update",
        "parameters": [
          {
            "name": "featureKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAiModelPreferenceRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AiModelPreferenceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TenantAiModelPreference"
        ],
        "summary": "Clear",
        "operationId": "TenantAiModelPreferenceController_clear",
        "parameters": [
          {
            "name": "featureKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AiModelPreferenceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/api-keys": {
      "get": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "List",
        "operationId": "TenantApiKeyController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantApiKeyResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Create",
        "operationId": "TenantApiKeyController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantApiKeyCreateRequest"
              }
            }
          }
        },
        "description": "Mint a tenant API key (vdak_...) for server-to-server calls. The secret is in this response only; store it. The key acts with the PERM_* scopes it is given. Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyCreatedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/api-keys/{id}": {
      "delete": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Revoke",
        "operationId": "TenantApiKeyController_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "Revoke the key; requests that present it are refused from now on. Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Toggle",
        "operationId": "TenantApiKeyController_toggle",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantApiKeyToggleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/api-keys/{id}/rotate": {
      "post": {
        "tags": [
          "TenantApiKey"
        ],
        "summary": "Rotate",
        "operationId": "TenantApiKeyController_rotate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_USERS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_USERS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantApiKeyCreatedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/billing-profile": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get profile",
        "operationId": "InvoiceController_getProfile",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceController_BillingProfileBody"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Invoice"
        ],
        "summary": "Update profile",
        "operationId": "InvoiceController_updateProfile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceController_BillingProfileBody"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceController_BillingProfileBody"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/branding/logo": {
      "post": {
        "tags": [
          "TenantBrandingLogo"
        ],
        "summary": "Upload",
        "operationId": "TenantBrandingLogoController_upload",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TenantBrandingLogo"
        ],
        "summary": "Remove",
        "operationId": "TenantBrandingLogoController_remove",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/checkout-sessions": {
      "get": {
        "tags": [
          "CheckoutSession"
        ],
        "summary": "List",
        "operationId": "CheckoutSessionController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CheckoutSessionController_CheckoutSessionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/checkout-sessions/{id}": {
      "get": {
        "tags": [
          "CheckoutSession"
        ],
        "summary": "Get",
        "operationId": "CheckoutSessionController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSessionController_CheckoutSessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/commerce/products": {
      "get": {
        "tags": [
          "ProductCatalog"
        ],
        "summary": "List",
        "operationId": "ProductCatalogController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductCatalogController_ProductResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "ProductCatalog"
        ],
        "summary": "Create",
        "operationId": "ProductCatalogController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCatalogController_ProductRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCatalogController_ProductResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/commerce/products/{id}": {
      "put": {
        "tags": [
          "ProductCatalog"
        ],
        "summary": "Update",
        "operationId": "ProductCatalogController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCatalogController_ProductRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCatalogController_ProductResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "ProductCatalog"
        ],
        "summary": "Delete",
        "operationId": "ProductCatalogController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/comp-grant": {
      "post": {
        "tags": [
          "CompGrant"
        ],
        "summary": "Comp grant",
        "operationId": "CompGrantController_compGrant",
        "parameters": [
          {
            "name": "X-Service-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompGrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/tenant/data-deletion": {
      "post": {
        "tags": [
          "TenantData"
        ],
        "summary": "Delete data",
        "operationId": "TenantDataController_deleteData",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantDataDeletionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/data-export": {
      "post": {
        "tags": [
          "TenantData"
        ],
        "summary": "Export data",
        "operationId": "TenantDataController_exportData",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/data-usage": {
      "get": {
        "tags": [
          "TenantDataUsage"
        ],
        "summary": "Data usage",
        "operationId": "TenantDataUsageController_dataUsage",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDataUsageResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/feature-flags/{key}/evaluate": {
      "get": {
        "tags": [
          "TenantFeatureFlag"
        ],
        "summary": "Evaluate",
        "operationId": "TenantFeatureFlagController_evaluate",
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantFeatureFlagController_FeatureFlagEvaluationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/invoices": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "List",
        "operationId": "InvoiceController_list",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvoiceController_InvoiceSummaryResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/invoices/{id}/html": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Html",
        "operationId": "InvoiceController_html",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/llm-gateway/content-policy": {
      "get": {
        "tags": [
          "LlmGatewayContentPolicy"
        ],
        "summary": "Get",
        "operationId": "LlmGatewayContentPolicyController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmGatewayContentPolicyController_ContentPolicyResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "LlmGatewayContentPolicy"
        ],
        "summary": "Update",
        "operationId": "LlmGatewayContentPolicyController_update",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LlmGatewayContentPolicyController_ContentPolicyRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_GUARDRAILS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_GUARDRAILS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LlmGatewayContentPolicyController_ContentPolicyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/audit-export": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Audit export",
        "operationId": "PrivacyController_auditExport",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "csv"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/consent-policies/{agentId}": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Get consent policy",
        "operationId": "PrivacyController_getConsentPolicy",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPolicyService_Policy"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Privacy"
        ],
        "summary": "Put consent policy",
        "operationId": "PrivacyController_putConsentPolicy",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentPolicyService_Request"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPolicyService_Policy"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/consent-records": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Consent records",
        "operationId": "PrivacyController_consentRecords",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsentLedger_Entry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/contacts/erase": {
      "post": {
        "tags": [
          "Privacy"
        ],
        "summary": "Erase contact",
        "operationId": "PrivacyController_eraseContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyController_ContactRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPrivacyService_ErasureReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/contacts/export": {
      "post": {
        "tags": [
          "Privacy"
        ],
        "summary": "Export contact",
        "operationId": "PrivacyController_exportContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyController_ContactRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPrivacyService_ExportReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/purposes/agents/{id}": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Agent purposes",
        "operationId": "PrivacyController_agentPurposes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Privacy"
        ],
        "summary": "Put agent purposes",
        "operationId": "PrivacyController_putAgentPurposes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyController_PurposesRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/purposes/knowledge-collections/{id}": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Collection purposes",
        "operationId": "PrivacyController_collectionPurposes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Privacy"
        ],
        "summary": "Put collection purposes",
        "operationId": "PrivacyController_putCollectionPurposes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyController_PurposesRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/privacy/retention-policies": {
      "get": {
        "tags": [
          "Privacy"
        ],
        "summary": "Retention policies",
        "operationId": "PrivacyController_retentionPolicies",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RetentionPolicyService_Rule"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Privacy"
        ],
        "summary": "Put retention",
        "operationId": "PrivacyController_putRetention",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivacyController_RetentionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_DATA_GOVERNANCE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_DATA_GOVERNANCE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPolicyService_Saved"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/referral": {
      "get": {
        "tags": [
          "Referral"
        ],
        "summary": "Status",
        "operationId": "ReferralController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/referral/redeem": {
      "post": {
        "tags": [
          "Referral"
        ],
        "summary": "Redeem",
        "operationId": "ReferralController_redeem",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralRedeemRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/resolutions": {
      "get": {
        "tags": [
          "Resolution"
        ],
        "summary": "List",
        "operationId": "ResolutionController_list",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionDtos_ResolutionListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Resolution"
        ],
        "summary": "Record",
        "operationId": "ResolutionController_record",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolutionDtos_RecordResolutionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionDtos_ResolutionActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/resolutions/summary": {
      "get": {
        "tags": [
          "Resolution"
        ],
        "summary": "Summary",
        "operationId": "ResolutionController_summary",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionDtos_ResolutionSummaryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/resolutions/{id}/dispute": {
      "post": {
        "tags": [
          "Resolution"
        ],
        "summary": "Dispute",
        "operationId": "ResolutionController_dispute",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolutionDtos_DisputeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionDtos_ResolutionActionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/agents": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Agents",
        "operationId": "RoiController_agents",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "includeAssumed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_AgentRoiResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/agents.csv": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Agents csv",
        "operationId": "RoiController_agentsCsv",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "includeAssumed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/agents/{agentId}/assumptions": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Assumption",
        "operationId": "RoiController_assumption",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_AssumptionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Roi"
        ],
        "summary": "Set assumption",
        "operationId": "RoiController_setAssumption",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoiDtos_AssumptionRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_AssumptionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/agents/{agentId}/baseline": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Baseline",
        "operationId": "RoiController_baseline",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PilotDtos_BaselineResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Roi"
        ],
        "summary": "Set baseline",
        "operationId": "RoiController_setBaseline",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PilotDtos_BaselineRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PilotDtos_BaselineResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/agents/{agentId}/pilot-report": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Pilot report",
        "operationId": "RoiController_pilotReport",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "includeAssumed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "html"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/budget": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Budget",
        "operationId": "RoiController_budget",
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_BudgetResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/costs": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Costs",
        "operationId": "RoiController_costs",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "agent"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_CostReportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/demo": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Demo",
        "operationId": "RoiController_demo",
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PilotDtos_DemoStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/outcomes": {
      "post": {
        "tags": [
          "Roi"
        ],
        "summary": "Mark outcome",
        "operationId": "RoiController_markOutcome",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoiDtos_OutcomeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_OutcomeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/prices": {
      "get": {
        "tags": [
          "Roi"
        ],
        "summary": "Prices",
        "operationId": "RoiController_prices",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_VIEW_USAGE"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_VIEW_USAGE (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_PriceListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Roi"
        ],
        "summary": "Set price",
        "operationId": "RoiController_setPrice",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoiDtos_PriceRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoiDtos_PriceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/roi/prices/{id}": {
      "delete": {
        "tags": [
          "Roi"
        ],
        "summary": "Delete price",
        "operationId": "RoiController_deletePrice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/settings": {
      "get": {
        "tags": [
          "TenantSettings"
        ],
        "summary": "Get",
        "operationId": "TenantSettingsController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSettingsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "TenantSettings"
        ],
        "summary": "Update experience mode",
        "operationId": "TenantSettingsController_updateExperienceMode",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExperienceModeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/spend-cap": {
      "get": {
        "tags": [
          "TenantSpendCap"
        ],
        "summary": "Get",
        "operationId": "TenantSpendCapController_get",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendCapService_CapStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/spend-protection": {
      "get": {
        "tags": [
          "TenantUsageQuota"
        ],
        "summary": "Spend protection",
        "operationId": "TenantUsageQuotaController_spendProtection",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendProtectionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/sso": {
      "get": {
        "tags": [
          "TenantSso"
        ],
        "summary": "Status",
        "operationId": "TenantSsoController_status",
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSsoService_TenantSsoStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "TenantSso"
        ],
        "summary": "Upsert",
        "operationId": "TenantSsoController_upsert",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantSsoUpsertRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSsoService_TenantSsoStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TenantSso"
        ],
        "summary": "Delete",
        "operationId": "TenantSsoController_delete",
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/sso/scim-tokens": {
      "get": {
        "tags": [
          "TenantSso"
        ],
        "summary": "List tokens",
        "operationId": "TenantSsoController_listTokens",
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantSsoController_ScimTokenView"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "TenantSso"
        ],
        "summary": "Mint token",
        "operationId": "TenantSsoController_mintToken",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/sso/scim-tokens/{id}": {
      "delete": {
        "tags": [
          "TenantSso"
        ],
        "summary": "Revoke token",
        "operationId": "TenantSsoController_revokeToken",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-feature-flag": "app.identity.provider=keycloak",
        "description": "Only available when the feature flag app.identity.provider=keycloak is on; otherwise this route answers 404. Requires PERM_MANAGE_TENANT_SETTINGS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TENANT_SETTINGS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/subscription": {
      "get": {
        "tags": [
          "TenantSubscription"
        ],
        "summary": "Status",
        "operationId": "TenantSubscriptionController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/subscription/cancel": {
      "post": {
        "tags": [
          "TenantSubscription"
        ],
        "summary": "Cancel",
        "operationId": "TenantSubscriptionController_cancel",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/trial/claim": {
      "post": {
        "tags": [
          "TrialGrant"
        ],
        "summary": "Claim",
        "operationId": "TrialGrantController_claim",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrialClaimRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/trial/status": {
      "get": {
        "tags": [
          "TrialGrant"
        ],
        "summary": "Status",
        "operationId": "TrialGrantController_status",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrialStatusResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/upgrade": {
      "post": {
        "tags": [
          "TenantUpgrade"
        ],
        "summary": "Upgrade",
        "operationId": "TenantUpgradeController_upgrade",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantUpgradeRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_BILLING"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_BILLING (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUpgradeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/upgrade/options": {
      "get": {
        "tags": [
          "TenantUpgrade"
        ],
        "summary": "Options",
        "operationId": "TenantUpgradeController_options",
        "parameters": [
          {
            "name": "gateway",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUpgradeOptionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tenant/usage-quota": {
      "get": {
        "tags": [
          "TenantUsageQuota"
        ],
        "summary": "Usage quota",
        "operationId": "TenantUsageQuotaController_usageQuota",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageQuotaResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/classifications": {
      "get": {
        "tags": [
          "ToolClassification"
        ],
        "summary": "List",
        "operationId": "ToolClassificationController_list",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolClassificationController_ToolClassificationListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code": {
      "get": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "List",
        "operationId": "CustomCodeToolController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomCodeToolResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Create",
        "operationId": "CustomCodeToolController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomCodeToolRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCodeToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/generate": {
      "post": {
        "tags": [
          "CodeToolGeneration"
        ],
        "summary": "Generate",
        "operationId": "CodeToolGenerationController_generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeToolGenerationRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeToolGenerationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/validate": {
      "post": {
        "tags": [
          "CodeToolGeneration"
        ],
        "summary": "Validate",
        "operationId": "CodeToolGenerationController_validate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeToolValidateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxValidateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/{id}": {
      "put": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Update",
        "operationId": "CustomCodeToolController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomCodeToolRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCodeToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Delete",
        "operationId": "CustomCodeToolController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/{id}/enabled": {
      "patch": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Set enabled",
        "operationId": "CustomCodeToolController_setEnabled",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCodeToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/{id}/revalidate": {
      "post": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Revalidate",
        "operationId": "CustomCodeToolController_revalidate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCodeToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/{id}/secrets": {
      "put": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Update secrets",
        "operationId": "CustomCodeToolController_updateSecrets",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomCodeToolSecretsRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomCodeToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/code/{id}/test": {
      "post": {
        "tags": [
          "CustomCodeTool"
        ],
        "summary": "Test",
        "operationId": "CustomCodeToolController_test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomCodeToolTestRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi": {
      "get": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "List",
        "operationId": "OpenApiToolSourceController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenApiToolSourceResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Create",
        "operationId": "OpenApiToolSourceController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenApiToolSourceRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiToolSourceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/preview": {
      "post": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Preview",
        "operationId": "OpenApiToolSourceController_preview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenApiPreviewRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiPreviewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}": {
      "put": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Update",
        "operationId": "OpenApiToolSourceController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenApiToolSourceRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiToolSourceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Delete",
        "operationId": "OpenApiToolSourceController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}/enabled": {
      "patch": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Set enabled",
        "operationId": "OpenApiToolSourceController_setEnabled",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiToolSourceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}/refresh": {
      "post": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Refresh",
        "operationId": "OpenApiToolSourceController_refresh",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiToolSourceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}/tools": {
      "get": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "List tools",
        "operationId": "OpenApiToolSourceController_listTools",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpenApiToolResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}/tools/{toolId}/enabled": {
      "patch": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Set tool enabled",
        "operationId": "OpenApiToolSourceController_setToolEnabled",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "toolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/openapi/{id}/tools/{toolId}/test": {
      "post": {
        "tags": [
          "OpenApiToolSource"
        ],
        "summary": "Test",
        "operationId": "OpenApiToolSourceController_test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "toolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenApiToolTestRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/scripts": {
      "get": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "List",
        "operationId": "UserToolScriptController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserToolScriptResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "Create",
        "operationId": "UserToolScriptController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserToolScriptRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserToolScriptResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/scripts/test": {
      "post": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "Test",
        "operationId": "UserToolScriptController_test",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserToolScriptTestRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/scripts/{id}": {
      "put": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "Update",
        "operationId": "UserToolScriptController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserToolScriptRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserToolScriptResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "Delete",
        "operationId": "UserToolScriptController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tools/scripts/{id}/enabled": {
      "patch": {
        "tags": [
          "UserToolScript"
        ],
        "summary": "Set enabled",
        "operationId": "UserToolScriptController_setEnabled",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_TOOLS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_TOOLS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserToolScriptResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/agent": {
      "post": {
        "tags": [
          "TutorAgent"
        ],
        "summary": "Ensure",
        "operationId": "TutorAgentController_ensure",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TutorDtos_TutorAgentRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_TutorAgentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans": {
      "get": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "List",
        "operationId": "StudyPlanController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TutorDtos_PlanSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Create",
        "operationId": "StudyPlanController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TutorDtos_CreatePlanRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_PlanView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans/generate": {
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Generate",
        "operationId": "StudyPlanController_generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TutorDtos_GeneratePlanRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_PlanView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans/{id}": {
      "get": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Get",
        "operationId": "StudyPlanController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_PlanView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Delete",
        "operationId": "StudyPlanController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans/{id}/lessons/{lessonId}/answers": {
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Answer",
        "operationId": "StudyPlanController_answer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lessonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TutorDtos_QuizAnswerRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_QuizAnswerResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans/{id}/lessons/{lessonId}/complete": {
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Complete",
        "operationId": "StudyPlanController_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lessonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_PlanView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/plans/{id}/lessons/{lessonId}/generate": {
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Generate lesson",
        "operationId": "StudyPlanController_generateLesson",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lessonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_LessonView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/reviews/due": {
      "get": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Due reviews",
        "operationId": "StudyPlanController_dueReviews",
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_DueReviews"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/reviews/{planId}/{cardId}/answer": {
      "post": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Answer review",
        "operationId": "StudyPlanController_answerReview",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TutorDtos_ReviewAnswerRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_ReviewAnswerResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/tutor/status": {
      "get": {
        "tags": [
          "StudyPlan"
        ],
        "summary": "Status",
        "operationId": "StudyPlanController_status",
        "x-feature-flag": "app.tutor.enabled=true",
        "description": "Only available when the feature flag app.tutor.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TutorDtos_TutorStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/videogen/generate": {
      "post": {
        "tags": [
          "VideoGeneration"
        ],
        "summary": "Generate",
        "operationId": "VideoGenerationController_generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoGenerationController_VideoGenerationRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/videogen/jobs": {
      "get": {
        "tags": [
          "VideoGeneration"
        ],
        "summary": "List jobs",
        "operationId": "VideoGenerationController_listJobs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VideoGenerationJobResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/videogen/jobs/{id}": {
      "get": {
        "tags": [
          "VideoGeneration"
        ],
        "summary": "Get job",
        "operationId": "VideoGenerationController_getJob",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoGenerationJobResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/videogen/videos/{id}": {
      "get": {
        "tags": [
          "VideoGeneration"
        ],
        "summary": "Get video",
        "operationId": "VideoGenerationController_getVideo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Range",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/view-as/session": {
      "get": {
        "tags": [
          "ViewAsSession"
        ],
        "summary": "Session",
        "operationId": "ViewAsSessionController_session",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImpersonationService_ViewAsSessionInfo"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/vision/sessions": {
      "post": {
        "tags": [
          "VisionSession"
        ],
        "summary": "Start",
        "operationId": "VisionSessionController_start",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VisionSessionController_VisionSessionStartRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisionSessionController_VisionSessionStartResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/vision/sessions/{sessionId}/end": {
      "post": {
        "tags": [
          "VisionSession"
        ],
        "summary": "End",
        "operationId": "VisionSessionController_end",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisionSessionController_VisionSessionEndResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/agents/{agentId}/calls/{roomName}/recording/start": {
      "post": {
        "tags": [
          "VoiceCallRecording"
        ],
        "summary": "Start recording",
        "operationId": "VoiceCallRecordingController_startRecording",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roomName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/agents/{agentId}/calls/{roomName}/recording/stop": {
      "post": {
        "tags": [
          "VoiceCallRecording"
        ],
        "summary": "Stop recording",
        "operationId": "VoiceCallRecordingController_stopRecording",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roomName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/agents/{agentId}/speak": {
      "post": {
        "tags": [
          "VoiceCall"
        ],
        "summary": "Speak",
        "operationId": "VoiceCallController_speak",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeakRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpeakResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/agents/{agentId}/token": {
      "post": {
        "tags": [
          "VoiceCall"
        ],
        "summary": "Issue token",
        "operationId": "VoiceCallController_issueToken",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/agents/{agentId}/turn": {
      "post": {
        "tags": [
          "VoiceCall"
        ],
        "summary": "Turn",
        "operationId": "VoiceCallController_turn",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "audio": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "audio"
                ]
              }
            }
          }
        },
        "x-sse": true,
        "description": "Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/voice/realtime/sessions": {
      "post": {
        "tags": [
          "RealtimeVoiceSession"
        ],
        "summary": "Create session",
        "operationId": "RealtimeVoiceSessionController_createSession",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RealtimeSessionRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RealtimeSessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/wallets": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "summary": "List",
        "operationId": "WalletController_list",
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WalletDtos_WalletResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Wallet"
        ],
        "summary": "Open",
        "operationId": "WalletController_open",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletDtos_OpenWalletRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletDtos_WalletResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/wallets/{walletId}": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "summary": "Get",
        "operationId": "WalletController_get",
        "parameters": [
          {
            "name": "walletId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletDtos_WalletResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/wallets/{walletId}/credit": {
      "post": {
        "tags": [
          "Wallet"
        ],
        "summary": "Credit",
        "operationId": "WalletController_credit",
        "parameters": [
          {
            "name": "walletId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletDtos_CreditRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletDtos_LedgerEntryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/wallets/{walletId}/ledger": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "summary": "Ledger",
        "operationId": "WalletController_ledger",
        "parameters": [
          {
            "name": "walletId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WalletDtos_LedgerEntryResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks": {
      "get": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "List",
        "operationId": "WebhookSubscriptionController_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookSubscriptionService_SubscriptionView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Create",
        "operationId": "WebhookSubscriptionController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionController_CreateRequest"
              }
            }
          }
        },
        "description": "Subscribe a URL to platform events. The response carries the signing secret (whsec_...) once; verify X-VegaDuta-Signature with it. Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionService_SubscriptionView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks/event-types": {
      "get": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Event types",
        "operationId": "WebhookSubscriptionController_eventTypes",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "description": "The documented event types a subscription can name; \"*\" and \"prefix.*\" also work. Delivery format: the webhooks section of this document.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEventCatalog_Entry"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks/{id}": {
      "get": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Get",
        "operationId": "WebhookSubscriptionController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionService_SubscriptionView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Delete",
        "operationId": "WebhookSubscriptionController_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Update",
        "operationId": "WebhookSubscriptionController_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionController_UpdateRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionService_SubscriptionView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Deliveries",
        "operationId": "WebhookSubscriptionController_deliveries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "description": "Recent delivery attempts with status, so a receiver can see what failed and why.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookSubscriptionController_DeliveryView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks/{id}/rotate-secret": {
      "post": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Rotate secret",
        "operationId": "WebhookSubscriptionController_rotateSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Issue a new signing secret; deliveries are signed with it from now on. Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionService_SubscriptionView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/webhooks/{id}/test": {
      "post": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Test",
        "operationId": "WebhookSubscriptionController_test",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Queue a webhook.test delivery to the subscription's URL. Requires PERM_MANAGE_INTEGRATIONS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_INTEGRATIONS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflow-expression-functions": {
      "get": {
        "tags": [
          "WorkflowExpression"
        ],
        "summary": "Functions",
        "operationId": "WorkflowExpressionController_functions",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowExpressionApi_FunctionDoc"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "List",
        "operationId": "WorkflowController_list",
        "description": "The tenant's workflows the caller can see. Pass limit (and offset) for a page.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Create",
        "operationId": "WorkflowController_create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCreateRequest"
              }
            }
          }
        },
        "description": "Create a workflow from a name, description and graph. Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/import": {
      "post": {
        "tags": [
          "WorkflowImport"
        ],
        "summary": "Import workflow",
        "operationId": "WorkflowImportController_importWorkflow",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortabilityDtos_ImportResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/import/preview": {
      "post": {
        "tags": [
          "WorkflowImport"
        ],
        "summary": "Preview",
        "operationId": "WorkflowImportController_preview",
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortabilityDtos_PreviewResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/input-requests": {
      "get": {
        "tags": [
          "WorkflowInputRequest"
        ],
        "summary": "List",
        "operationId": "WorkflowInputRequestController_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/WorkflowInputRequestStatus"
            }
          },
          {
            "name": "runId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowInputRequestController_InputRequestView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/input-requests/{id}": {
      "get": {
        "tags": [
          "WorkflowInputRequest"
        ],
        "summary": "Get",
        "operationId": "WorkflowInputRequestController_get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowInputRequestController_InputRequestView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/input-requests/{id}/submit": {
      "post": {
        "tags": [
          "WorkflowInputRequest"
        ],
        "summary": "Submit",
        "operationId": "WorkflowInputRequestController_submit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowInputRequestController_SubmitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get",
        "operationId": "WorkflowController_get",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "description": "One workflow definition with its graph. The ETag header is its current version for If-Match on PUT.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Update",
        "operationId": "WorkflowController_update",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowUpdateRequest"
              }
            }
          }
        },
        "description": "Replace the workflow's name, description, graph and status. Send If-Match with the ETag from GET to refuse the write (412) when someone else changed it first.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Delete",
        "operationId": "WorkflowController_delete",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/comments": {
      "get": {
        "tags": [
          "WorkflowComment"
        ],
        "summary": "List",
        "operationId": "WorkflowCommentController_list",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowCommentService_CommentView"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WorkflowComment"
        ],
        "summary": "Create",
        "operationId": "WorkflowCommentController_create",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCommentService_CreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowCommentService_CommentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/comments/{commentId}": {
      "delete": {
        "tags": [
          "WorkflowComment"
        ],
        "summary": "Delete",
        "operationId": "WorkflowCommentController_delete",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "WorkflowComment"
        ],
        "summary": "Update",
        "operationId": "WorkflowCommentController_update",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCommentService_UpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowCommentService_CommentView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/cost-routing": {
      "patch": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set cost routing",
        "operationId": "WorkflowController_setCostRouting",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowCostRoutingUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/diagram": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Diagram",
        "operationId": "WorkflowController_diagram",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "mermaid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDiagramResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/diagram/pdf": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Diagram pdf",
        "operationId": "WorkflowController_diagramPdf",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/duplicate": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Duplicate",
        "operationId": "WorkflowController_duplicate",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/eval-summary": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Eval summary",
        "operationId": "WorkflowController_evalSummary",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/execution-limits": {
      "patch": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set execution limits",
        "operationId": "WorkflowController_setExecutionLimits",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowExecutionLimitsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/export": {
      "get": {
        "tags": [
          "WorkflowExport"
        ],
        "summary": "Export",
        "operationId": "WorkflowExportController_export",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/expressions/evaluate": {
      "post": {
        "tags": [
          "WorkflowExpression"
        ],
        "summary": "Evaluate",
        "operationId": "WorkflowExpressionController_evaluate",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowExpressionApi_EvaluateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowExpressionApi_EvaluateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/expressions/lint": {
      "post": {
        "tags": [
          "WorkflowExpression"
        ],
        "summary": "Lint",
        "operationId": "WorkflowExpressionController_lint",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowExpressionApi_LintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowExpressionApi_LintResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/generate-graph": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Generate graph",
        "operationId": "WorkflowController_generateGraph",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateGraphRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_AGENTS"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_AGENTS (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateGraphResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/lint": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Lint",
        "operationId": "WorkflowController_lint",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowController_LintRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowLintService_LintResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/pin": {
      "put": {
        "tags": [
          "WorkflowPin"
        ],
        "summary": "Put",
        "operationId": "WorkflowPinController_put",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowPinRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPinResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "WorkflowPin"
        ],
        "summary": "Delete",
        "operationId": "WorkflowPinController_delete",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/poll-trigger": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get poll trigger",
        "operationId": "WorkflowController_getPollTrigger",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPollTriggerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Configure poll trigger",
        "operationId": "WorkflowController_configurePollTrigger",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowPollTriggerRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPollTriggerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Disable poll trigger",
        "operationId": "WorkflowController_disablePollTrigger",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPollTriggerResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/test": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Test node",
        "operationId": "WorkflowController_testNode",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowNodeTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeTraceEntry"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/trigger-channel": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get trigger channel",
        "operationId": "WorkflowController_getTriggerChannel",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTriggerChannelResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set trigger channel",
        "operationId": "WorkflowController_setTriggerChannel",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowTriggerChannelRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTriggerChannelResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/upstream-schema": {
      "get": {
        "tags": [
          "WorkflowExpression"
        ],
        "summary": "Upstream schema",
        "operationId": "WorkflowExpressionController_upstreamSchema",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowExpressionApi_UpstreamSchemaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/webhook": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get webhook",
        "operationId": "WorkflowController_getWebhook",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowWebhookResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Enable webhook",
        "operationId": "WorkflowController_enableWebhook",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowWebhookResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Disable webhook",
        "operationId": "WorkflowController_disableWebhook",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowWebhookResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/nodes/{nodeId}/webhook/signature": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get webhook signature",
        "operationId": "WorkflowController_getWebhookSignature",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSignatureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set webhook signature",
        "operationId": "WorkflowController_setWebhookSignature",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSignatureRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSignatureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Clear webhook signature",
        "operationId": "WorkflowController_clearWebhookSignature",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSignatureResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/pins": {
      "get": {
        "tags": [
          "WorkflowPin"
        ],
        "summary": "List",
        "operationId": "WorkflowPinController_list",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowPinResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/reasoning-depth": {
      "patch": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set reasoning depth",
        "operationId": "WorkflowController_setReasoningDepth",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowReasoningDepthUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/run": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Run",
        "operationId": "WorkflowController_run",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunRequest"
              }
            }
          }
        },
        "description": "Start a run. Idempotency-Key here keeps its original meaning: a repeated key answers 409 rather than replaying; use clientRunId to find the first run.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Runs",
        "operationId": "WorkflowController_runs",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Run history, newest first (startedAt, then id). Page with limit and offset, or follow X-Next-Cursor with cursor for deep history. Keyset paging: pass the X-Next-Cursor value of a page as cursor to get the next one; offset is ignored and X-Total-Count is not sent when cursor is given.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              },
              "X-Next-Cursor": {
                "$ref": "#/components/headers/X-Next-Cursor"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowRunResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get run",
        "operationId": "WorkflowController_getRun",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Cancel run",
        "operationId": "WorkflowController_cancelRun",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/diff/{otherRunId}": {
      "get": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Diff runs",
        "operationId": "WorkflowVersionController_diffRuns",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "otherRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/download": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Download run output",
        "operationId": "WorkflowController_downloadRunOutput",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/events": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Run events",
        "operationId": "WorkflowController_runEvents",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-sse": true,
        "description": "Live run progress as Server-Sent Events named snapshot, run.*, node.* and error; each data is {seq, type, nodeId, ts, data}. Reconnect with Last-Event-ID to resume after the last seq seen. Streams the response as Server-Sent Events (text/event-stream); each event's data field carries the next chunk.",
        "responses": {
          "200": {
            "description": "Server-Sent Events stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/llm-requests": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Run llm requests",
        "operationId": "WorkflowController_runLlmRequests",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LlmRequestSnapshot"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/pause": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Pause run",
        "operationId": "WorkflowController_pauseRun",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/resume": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Resume run",
        "operationId": "WorkflowController_resumeRun",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/runs/{runId}/wait": {
      "get": {
        "tags": [
          "WorkflowWait"
        ],
        "summary": "Get",
        "operationId": "WorkflowWaitController_get",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowWaitService_WaitView"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/schedule": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get schedule",
        "operationId": "WorkflowController_getSchedule",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workflow"
        ],
        "summary": "Enable schedule",
        "operationId": "WorkflowController_enableSchedule",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowScheduleRequest"
              }
            }
          }
        },
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Disable schedule",
        "operationId": "WorkflowController_disableSchedule",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-permissions": {
          "anyOf": [
            "PERM_MANAGE_WORKFLOWS_ADMIN"
          ]
        },
        "x-roles": [
          "tenant-admin"
        ],
        "description": "Requires PERM_MANAGE_WORKFLOWS_ADMIN (or the tenant-admin role).",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowScheduleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/share": {
      "get": {
        "tags": [
          "WorkflowShareOwner"
        ],
        "summary": "Status",
        "operationId": "WorkflowShareOwnerController_status",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowShareOwnerController_ShareStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WorkflowShareOwner"
        ],
        "summary": "Create",
        "operationId": "WorkflowShareOwnerController_create",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowShareOwnerController_ShareStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "WorkflowShareOwner"
        ],
        "summary": "Revoke",
        "operationId": "WorkflowShareOwnerController_revoke",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/step-caching": {
      "patch": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set step caching",
        "operationId": "WorkflowController_setStepCaching",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowStepCachingUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/tuning-mode": {
      "patch": {
        "tags": [
          "Workflow"
        ],
        "summary": "Set tuning mode",
        "operationId": "WorkflowController_setTuningMode",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowTuningModeUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/validate": {
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Validate",
        "operationId": "WorkflowController_validate",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions": {
      "get": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "List",
        "operationId": "WorkflowVersionController_list",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Has-More": {
                "$ref": "#/components/headers/X-Has-More"
              },
              "X-Total-Count": {
                "$ref": "#/components/headers/X-Total-Count"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowVersionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Publish",
        "operationId": "WorkflowVersionController_publish",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions/diff": {
      "get": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Diff versions",
        "operationId": "WorkflowVersionController_diffVersions",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions/rollback": {
      "post": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Rollback",
        "operationId": "WorkflowVersionController_rollback",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions/{versionNumber}": {
      "get": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Get",
        "operationId": "WorkflowVersionController_get",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions/{versionNumber}/promote": {
      "post": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Promote",
        "operationId": "WorkflowVersionController_promote",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/workflows/{workflowId}/versions/{versionNumber}/restore": {
      "post": {
        "tags": [
          "WorkflowVersion"
        ],
        "summary": "Restore",
        "operationId": "WorkflowVersionController_restore",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/{resourceKind}/{resourceId}/grants": {
      "get": {
        "tags": [
          "Share"
        ],
        "summary": "List",
        "operationId": "ShareController_list",
        "parameters": [
          {
            "name": "resourceKind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShareController_GrantResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Share"
        ],
        "summary": "Grant",
        "operationId": "ShareController_grant",
        "parameters": [
          {
            "name": "resourceKind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareController_GrantRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareController_GrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/api/{resourceKind}/{resourceId}/grants/{grantId}": {
      "delete": {
        "tags": [
          "Share"
        ],
        "summary": "Revoke",
        "operationId": "ShareController_revoke",
        "parameters": [
          {
            "name": "resourceKind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "tenantApiKey": []
          }
        ]
      }
    },
    "/oauth/atlassian/callback": {
      "get": {
        "tags": [
          "AtlassianOAuth"
        ],
        "summary": "Callback",
        "operationId": "AtlassianOAuthController_callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vd_oauth_atlassian",
            "in": "cookie",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/oauth/google/callback": {
      "get": {
        "tags": [
          "GoogleOAuth"
        ],
        "summary": "Callback",
        "operationId": "GoogleOAuthController_callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vd_oauth_google",
            "in": "cookie",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/oauth/mcp/remote/callback": {
      "get": {
        "tags": [
          "McpOAuth"
        ],
        "summary": "Callback",
        "operationId": "McpOAuthController_callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "iss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/oauth/mcp/{provider}/callback": {
      "get": {
        "tags": [
          "OAuthProvider"
        ],
        "summary": "Callback",
        "operationId": "OAuthProviderController_callback",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/oauth/x/callback": {
      "get": {
        "tags": [
          "XOAuth"
        ],
        "summary": "Callback",
        "operationId": "XOAuthController_callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vd_oauth_x",
            "in": "cookie",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/scim/v2/Users": {
      "get": {
        "tags": [
          "ScimProvisioning"
        ],
        "summary": "List users",
        "operationId": "ScimProvisioningController_listUsers",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "ScimProvisioning"
        ],
        "summary": "Create user",
        "operationId": "ScimProvisioningController_createUser",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/scim/v2/Users/{id}": {
      "get": {
        "tags": [
          "ScimProvisioning"
        ],
        "summary": "Get user",
        "operationId": "ScimProvisioningController_getUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "delete": {
        "tags": [
          "ScimProvisioning"
        ],
        "summary": "Delete user",
        "operationId": "ScimProvisioningController_deleteUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "patch": {
        "tags": [
          "ScimProvisioning"
        ],
        "summary": "Patch user",
        "operationId": "ScimProvisioningController_patchUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/t/boom": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Boom",
        "operationId": "ThrowingController_boom",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/budget": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Budget",
        "operationId": "ThrowingController_budget",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/conflict": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Conflict",
        "operationId": "ThrowingController_conflict",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/forbidden": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Forbidden",
        "operationId": "ThrowingController_forbidden",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/forbidden-code": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Forbidden with code",
        "operationId": "ThrowingController_forbiddenWithCode",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/not-found": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Not found",
        "operationId": "ThrowingController_notFound",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/rate": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Rate",
        "operationId": "ThrowingController_rate",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/validation": {
      "post": {
        "tags": [
          "Throwing"
        ],
        "summary": "Validation",
        "operationId": "ThrowingController_validation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ErrorResponseContractTest_ThrowingController_Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/t/workflow": {
      "get": {
        "tags": [
          "Throwing"
        ],
        "summary": "Workflow",
        "operationId": "ThrowingController_workflow",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "OpenAiCompat"
        ],
        "summary": "Chat completions",
        "operationId": "OpenAiCompatController_chatCompletions",
        "parameters": [
          {
            "name": "X-Session-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenAiChatRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.openai-compat.enabled=true",
        "description": "OpenAI-compatible surface: authenticate with a platform JWT or a vmcp_ grant key as the api_key. Only available when the feature flag app.openai-compat.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "OpenAiCompat"
        ],
        "summary": "Models",
        "operationId": "OpenAiCompatController_models",
        "x-feature-flag": "app.openai-compat.enabled=true",
        "description": "OpenAI-compatible surface: authenticate with a platform JWT or a vmcp_ grant key as the api_key. Only available when the feature flag app.openai-compat.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "tags": [
          "OpenResponses"
        ],
        "summary": "Create",
        "operationId": "OpenResponsesController_create",
        "parameters": [
          {
            "name": "X-Session-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenResponsesRequest"
              }
            }
          }
        },
        "x-feature-flag": "app.openai-compat.enabled=true",
        "description": "OpenAI-compatible surface: authenticate with a platform JWT or a vmcp_ grant key as the api_key. Only available when the feature flag app.openai-compat.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/v1/responses/{responseId}": {
      "get": {
        "tags": [
          "OpenResponses"
        ],
        "summary": "Retrieve",
        "operationId": "OpenResponsesController_retrieve",
        "parameters": [
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-feature-flag": "app.openai-compat.enabled=true",
        "description": "OpenAI-compatible surface: authenticate with a platform JWT or a vmcp_ grant key as the api_key. Only available when the feature flag app.openai-compat.enabled=true is on; otherwise this route answers 404.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ]
      }
    },
    "/webhook/alerts/alertmanager": {
      "post": {
        "tags": [
          "PlatformAlertWebhook"
        ],
        "summary": "Receive",
        "operationId": "PlatformAlertWebhookController_receive",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/demo/telegram": {
      "post": {
        "tags": [
          "DemoTelegramWebhook"
        ],
        "summary": "Inbound",
        "operationId": "DemoTelegramWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Telegram-Bot-Api-Secret-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/demo/whatsapp": {
      "get": {
        "tags": [
          "DemoWhatsAppWebhook"
        ],
        "summary": "Verify",
        "operationId": "DemoWhatsAppWebhookController_verify",
        "parameters": [
          {
            "name": "hub.mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "DemoWhatsAppWebhook"
        ],
        "summary": "Inbound",
        "operationId": "DemoWhatsAppWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Hub-Signature-256",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "format": "byte"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/discord": {
      "post": {
        "tags": [
          "DiscordWebhook"
        ],
        "summary": "Inbound",
        "operationId": "DiscordWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Internal-Secret",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscordInboundMessage"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/imessage/{webhookId}": {
      "post": {
        "tags": [
          "ImessageWebhook"
        ],
        "summary": "Inbound",
        "operationId": "ImessageWebhookController_inbound",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Imessage-Webhook-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/meta/social": {
      "get": {
        "tags": [
          "MetaSocialWebhook"
        ],
        "summary": "Verify",
        "operationId": "MetaSocialWebhookController_verify",
        "parameters": [
          {
            "name": "hub.mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "MetaSocialWebhook"
        ],
        "summary": "Inbound",
        "operationId": "MetaSocialWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Hub-Signature-256",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/meta/whatsapp": {
      "get": {
        "tags": [
          "MetaWhatsAppWebhook"
        ],
        "summary": "Verify",
        "operationId": "MetaWhatsAppWebhookController_verify",
        "parameters": [
          {
            "name": "hub.mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.verify_token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hub.challenge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "MetaWhatsAppWebhook"
        ],
        "summary": "Inbound",
        "operationId": "MetaWhatsAppWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Hub-Signature-256",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/razorpay": {
      "post": {
        "tags": [
          "RazorpayWebhook"
        ],
        "summary": "Handle webhook",
        "operationId": "RazorpayWebhookController_handleWebhook",
        "parameters": [
          {
            "name": "X-Razorpay-Signature",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Razorpay-Event-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/slack": {
      "post": {
        "tags": [
          "SlackWebhook"
        ],
        "summary": "Inbound",
        "operationId": "SlackWebhookController_inbound",
        "parameters": [
          {
            "name": "X-Slack-Request-Timestamp",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Slack-Signature",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/teams/{appId}": {
      "post": {
        "tags": [
          "TeamsWebhook"
        ],
        "summary": "Inbound",
        "operationId": "TeamsWebhookController_inbound",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/telegram/{botUserId}": {
      "post": {
        "tags": [
          "TelegramWebhook"
        ],
        "summary": "Inbound",
        "operationId": "TelegramWebhookController_inbound",
        "parameters": [
          {
            "name": "botUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Telegram-Bot-Api-Secret-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/sms": {
      "post": {
        "tags": [
          "TwilioSmsWebhook"
        ],
        "summary": "Inbound sms",
        "operationId": "TwilioSmsWebhookController_inboundSms",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/status": {
      "post": {
        "tags": [
          "TwilioStatusCallback"
        ],
        "summary": "Status",
        "operationId": "TwilioStatusCallbackController_status",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/voice": {
      "post": {
        "tags": [
          "TwilioVoiceWebhook"
        ],
        "summary": "Inbound call",
        "operationId": "TwilioVoiceWebhookController_inboundCall",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/voice/collect": {
      "post": {
        "tags": [
          "TwilioVoiceWebhook"
        ],
        "summary": "Collect speech",
        "operationId": "TwilioVoiceWebhookController_collectSpeech",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/voice/menu-collect": {
      "post": {
        "tags": [
          "TwilioVoiceWebhook"
        ],
        "summary": "Collect menu digits",
        "operationId": "TwilioVoiceWebhookController_collectMenuDigits",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/twilio/whatsapp": {
      "post": {
        "tags": [
          "TwilioWebhook"
        ],
        "summary": "Inbound whats app",
        "operationId": "TwilioWebhookController_inboundWhatsApp",
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/workflow-waits/{token}": {
      "post": {
        "tags": [
          "WorkflowWaitWebhook"
        ],
        "summary": "Resume",
        "operationId": "WorkflowWaitWebhookController_resume",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/workflows/oidc/{workflowId}": {
      "post": {
        "tags": [
          "WorkflowWebhook"
        ],
        "summary": "Trigger oidc",
        "operationId": "WorkflowWebhookController_triggerOidc",
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/webhook/workflows/{token}": {
      "post": {
        "tags": [
          "WorkflowWebhook"
        ],
        "summary": "Trigger",
        "operationId": "WorkflowWebhookController_trigger",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "format": "byte"
              }
            }
          }
        },
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/x402/{slug}": {
      "get": {
        "tags": [
          "X402Resource"
        ],
        "summary": "Paid resource",
        "operationId": "X402ResourceController_paidResource",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "X402Resource"
        ],
        "summary": "Paid resource",
        "operationId": "X402ResourceController_paidResource_2",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public route: no bearer token is required at the gateway. Webhook, device and pairing endpoints verify their own credential (signature, device token or code) inside the handler.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    }
  },
  "webhooks": {
    "workflowEvent": {
      "post": {
        "tags": [
          "WebhookSubscription"
        ],
        "summary": "Platform event delivered to a webhook subscription",
        "operationId": "webhook_workflowEvent",
        "description": "POSTed to each enabled subscription whose event filter matches. The body is the WorkflowEvent envelope; payload is event-type specific. The test delivery (webhook.test) carries only eventType, tenantId, timestamp and payload. Documented event types: channel.whatsapp.message.received: Inbound WhatsApp message reached the platform. channel.sms.message.received: Inbound SMS reached the platform. channel.messenger.message.received: Inbound Facebook Messenger message. channel.instagram.message.received: Inbound Instagram DM. channel.slack.message.received: Inbound Slack message. channel.discord.message.received: Inbound Discord message. channel.x.message.received: Inbound X (Twitter) DM. channel.telegram.message.received: Inbound Telegram message. channel.email.message.received: Inbound email. channel.teams.message.received: Inbound Microsoft Teams message. workflow.run.started: A workflow run began executing. workflow.run.completed: A workflow run finished successfully. workflow.run.failed: A workflow run failed. workflow.run.cancelled: A workflow run was cancelled. workflow.run.resumed: A paused workflow run resumed. workflow.node.completed: A single workflow node finished (carries nodeId). workflow.output.emitted: A workflow's OUTPUT node produced a result. approval.requested: An action entered the human-approval queue. approval.resolved: An approval request was approved or rejected. approval.execution.recorded: An approved action's execution reached a terminal state. document.generation.completed: A document-generation job finished (COMPLETE or FAILED). agent.message.completed: An agent finished and persisted a reply (payload: agentId, sessionId, answerChars, answerExcerpt, source). webhook.test: Synthetic event sent by the Test button / POST .../test.",
        "parameters": [
          {
            "name": "X-VegaDuta-Event",
            "in": "header",
            "required": true,
            "description": "The event type of this delivery.",
            "schema": {
              "type": "string",
              "description": "Matches the body's eventType. The documented types are in examples; subscriptions may also name other exact types, \"*\" or \"prefix.*\".",
              "examples": [
                "channel.whatsapp.message.received",
                "channel.sms.message.received",
                "channel.messenger.message.received",
                "channel.instagram.message.received",
                "channel.slack.message.received",
                "channel.discord.message.received",
                "channel.x.message.received",
                "channel.telegram.message.received",
                "channel.email.message.received",
                "channel.teams.message.received",
                "workflow.run.started",
                "workflow.run.completed",
                "workflow.run.failed",
                "workflow.run.cancelled",
                "workflow.run.resumed",
                "workflow.node.completed",
                "workflow.output.emitted",
                "approval.requested",
                "approval.resolved",
                "approval.execution.recorded",
                "document.generation.completed",
                "agent.message.completed",
                "webhook.test"
              ]
            }
          },
          {
            "name": "X-VegaDuta-Delivery",
            "in": "header",
            "required": true,
            "description": "Delivery id, stable across retries of the same delivery. Deliveries are at-least-once: store it and ignore a repeat.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-VegaDuta-Signature",
            "in": "header",
            "required": true,
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" keyed with the subscription secret (whsec_...)>. Recompute it over the raw bytes, compare in constant time, and reject a t older than a few minutes to stop replays.",
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged. Any 2xx marks the delivery delivered; the body is ignored."
          },
          "default": {
            "description": "Any other status, a redirect, a timeout (5 s connect, 15 s total) or a connection error is retried with exponential backoff (30 s doubling, capped at 30 min) up to 10 attempts; then the delivery is dead. 25 dead deliveries in a row disable the subscription."
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "headers": {
      "Retry-After": {
        "description": "Seconds to wait before retrying (RFC 9110, section 10.2.3).",
        "schema": {
          "type": "integer"
        }
      },
      "X-Has-More": {
        "description": "Sent by paged list endpoints when limit is given: true when rows remain beyond this page. See docs/api/LIST-ENDPOINT-PAGING.md.",
        "schema": {
          "type": "boolean"
        }
      },
      "X-Total-Count": {
        "description": "Sent by paged list endpoints when limit is given: rows matching the filters before paging. See docs/api/LIST-ENDPOINT-PAGING.md.",
        "schema": {
          "type": "integer"
        }
      },
      "X-Next-Cursor": {
        "description": "Opaque cursor of the next page, sent when more rows exist. Pass it back unchanged as the cursor query parameter.",
        "schema": {
          "type": "string"
        }
      },
      "ETag": {
        "description": "Strong, opaque version of the resource (RFC 9110). Send it back in If-Match on a write to refuse it when the resource changed.",
        "schema": {
          "type": "string"
        }
      },
      "Deprecation": {
        "description": "RFC 9745: the route is deprecated, as of @<unix seconds>. See docs/api/DEPRECATION.md.",
        "schema": {
          "type": "string"
        }
      },
      "Sunset": {
        "description": "RFC 8594: HTTP-date after which the route may be removed.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "Sent when app.rate-limit.api.enabled is on: \"api\";r=<remaining>;t=<seconds to reset> (IETF RateLimit header fields).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "Sent when app.rate-limit.api.enabled is on: \"api\";q=<requests>;w=<window seconds>.",
        "schema": {
          "type": "string"
        }
      },
      "X-Request-Id": {
        "description": "Correlation id for this request: the caller's own X-Request-Id when it sent a valid one, otherwise generated. Quote it in support requests.",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes a retry safe (IETF Idempotency-Key header): a repeat with the same key and body replays the first response (Idempotent-Replayed: true) for 24 hours; while the first is running a repeat gets 409, and the same key with a different body gets 422. Use a fresh random value (a UUID) per logical operation.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": false,
        "description": "Optimistic concurrency (RFC 9110): the ETag from the resource's GET. The write is refused with 412 when the resource changed since; * always matches.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request was malformed or failed validation.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflicts with the current state, including a request whose Idempotency-Key is still being processed (type idempotency-key-in-use; retry after Retry-After).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller is authenticated but not allowed (permission, plan limit or locked resource).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist or is not visible to the caller.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PreconditionFailed": {
        "description": "If-Match named no current version: the resource changed since it was read. Fetch it again (new ETag) and reapply the change.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded for this caller. Wait for Retry-After seconds before retrying.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, expired or invalid credentials.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The Idempotency-Key was already used with a different request body (type idempotency-key-reused).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "AbuseActionTier": {
        "type": "string",
        "enum": [
          "NORMAL",
          "WATCH",
          "THROTTLE",
          "SUSPEND"
        ]
      },
      "AbuseAnomalyEntry": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "issueId": {
            "type": "string",
            "format": "uuid"
          },
          "principal": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/IssueSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/IssueStatus"
          },
          "title": {
            "type": "string"
          },
          "occurrenceCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "occurrenceCount"
        ]
      },
      "AbuseRiskScore": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "tier": {
            "$ref": "#/components/schemas/AbuseActionTier"
          },
          "signals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AbuseSignal"
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "score"
        ]
      },
      "AbuseSignal": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "available": {
            "type": "boolean",
            "default": false
          },
          "rawValue": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "normalizedScore": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "weight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "rawValue",
          "normalizedScore",
          "weight"
        ]
      },
      "AbuseThresholds": {
        "type": "object",
        "properties": {
          "recentWindowMinutes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "baselineWindowMinutes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "spendSpikeMultiplier": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "spendSpikeMinUsd": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "spendSpikeWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "tokenBurnPerMinThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "tokenBurnWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "messageFloodPerMinThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "messageFloodWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "signupVelocityPerHourThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "signupVelocityWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "toolErrorRatioThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "toolErrorMinSample": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolErrorWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "geoVelocityWeight": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "watchThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "throttleThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "suspendThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "throttleTtlMinutes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "autoSuspendEnabled": {
            "type": "boolean",
            "default": false
          },
          "scanEnabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "recentWindowMinutes",
          "baselineWindowMinutes",
          "spendSpikeMultiplier",
          "spendSpikeMinUsd",
          "spendSpikeWeight",
          "tokenBurnPerMinThreshold",
          "tokenBurnWeight",
          "messageFloodPerMinThreshold",
          "messageFloodWeight",
          "signupVelocityPerHourThreshold",
          "signupVelocityWeight",
          "toolErrorRatioThreshold",
          "toolErrorMinSample",
          "toolErrorWeight",
          "geoVelocityWeight",
          "watchThreshold",
          "throttleThreshold",
          "suspendThreshold",
          "throttleTtlMinutes",
          "autoSuspendEnabled",
          "scanEnabled"
        ]
      },
      "AbuseThrottleService_ThrottleEntry": {
        "type": "object",
        "properties": {
          "principal": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AccountResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          }
        }
      },
      "AccountSelfDeletionController_DeleteAccountRequest": {
        "type": "object",
        "properties": {
          "confirm": {
            "type": "string"
          }
        }
      },
      "AccountType": {
        "type": "string",
        "enum": [
          "B2B",
          "B2C",
          "FAMILY"
        ]
      },
      "AddonApi_Apply": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string"
          },
          "profiles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "envSet": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "envUnset": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pending": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AddonApi_ChangeResult": {
        "type": "object",
        "properties": {
          "addon": {
            "$ref": "#/components/schemas/AddonApi_View"
          },
          "changed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "needsHost": {
            "type": "boolean",
            "default": false
          },
          "apply": {
            "$ref": "#/components/schemas/AddonApi_Apply"
          }
        },
        "required": [
          "needsHost"
        ]
      },
      "AddonApi_DefinitionCompose": {
        "type": "object",
        "properties": {
          "profiles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "AddonApi_HostBridge": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "configured"
        ]
      },
      "AddonApi_HostItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "wanted": {
            "type": "boolean",
            "default": false
          },
          "rev": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "status": {
            "type": "string"
          },
          "compose": {
            "$ref": "#/components/schemas/AddonApi_DefinitionCompose"
          }
        },
        "required": [
          "wanted",
          "rev"
        ]
      },
      "AddonApi_HostWanted": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string"
          },
          "fingerprint": {
            "type": "string"
          },
          "apply": {
            "$ref": "#/components/schemas/AddonApi_Apply"
          },
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonApi_HostItem"
            }
          }
        }
      },
      "AddonApi_IgnoredReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "AddonApi_OllamaInfo": {
        "type": "object",
        "properties": {
          "reachable": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "reachable"
        ]
      },
      "AddonApi_Overview": {
        "type": "object",
        "properties": {
          "catalogSchema": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hardware": {
            "$ref": "#/components/schemas/HardwareProfile"
          },
          "hostBridge": {
            "$ref": "#/components/schemas/AddonApi_HostBridge"
          },
          "ollama": {
            "$ref": "#/components/schemas/AddonApi_OllamaInfo"
          },
          "apply": {
            "$ref": "#/components/schemas/AddonApi_Apply"
          },
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonApi_View"
            }
          },
          "mayChange": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "catalogSchema",
          "mayChange"
        ]
      },
      "AddonApi_ReportItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "rev": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "AddonApi_ReportRequest": {
        "type": "object",
        "properties": {
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonApi_ReportItem"
            }
          }
        }
      },
      "AddonApi_ReportResult": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ignored": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddonApi_IgnoredReport"
            }
          }
        },
        "required": [
          "accepted"
        ]
      },
      "AddonApi_View": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "availability": {
            "type": "string"
          },
          "sizeMb": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "minRamMb": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "needsGpu": {
            "type": "boolean",
            "default": false
          },
          "license": {
            "type": "string"
          },
          "free": {
            "type": "boolean",
            "default": false
          },
          "requires": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "defaultOn": {
            "type": "boolean",
            "default": false
          },
          "hostCommand": {
            "type": "string"
          },
          "learnMore": {
            "type": "string"
          },
          "unlocks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "model": {
            "type": "string"
          },
          "desired": {
            "type": "boolean",
            "default": false
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "progress": {
            "type": "integer",
            "format": "int32"
          },
          "installed": {
            "type": "boolean"
          },
          "desiredAt": {
            "type": "string"
          },
          "reportedAt": {
            "type": "string"
          },
          "fit": {
            "type": "string"
          },
          "canEnable": {
            "type": "boolean",
            "default": false
          },
          "blockedReason": {
            "type": "string"
          },
          "requiredBy": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "sizeMb",
          "minRamMb",
          "needsGpu",
          "free",
          "defaultOn",
          "desired",
          "canEnable"
        ]
      },
      "AdminUserResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "invitePending": {
            "type": "boolean",
            "default": false
          },
          "inviteLink": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "invitePending"
        ]
      },
      "AgUiRunController_AgUiTool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "AgentAutonomyTier": {
        "type": "string",
        "enum": [
          "SUPERVISED",
          "SEMI_AUTONOMOUS",
          "FULLY_AUTONOMOUS"
        ]
      },
      "AgentAutonomyTierUpdateRequest": {
        "type": "object",
        "properties": {
          "autonomyTier": {
            "$ref": "#/components/schemas/AgentAutonomyTier"
          }
        },
        "required": [
          "autonomyTier"
        ]
      },
      "AgentBiometricConsentToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentBundle": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "summary": {
            "type": "string",
            "maxLength": 4000
          },
          "category": {
            "type": "string",
            "maxLength": 64
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agent": {}
        },
        "required": [
          "format",
          "title",
          "agent"
        ]
      },
      "AgentBundlePreview": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "autonomyTier": {
            "type": "string"
          },
          "adjustments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "readiness": {
            "$ref": "#/components/schemas/TemplateReadinessReport"
          }
        }
      },
      "AgentCapabilityResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "availability": {
            "$ref": "#/components/schemas/CapabilityAvailability"
          },
          "availabilityHint": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentCapabilityUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentChatSessionController_ToolCallLogView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "toolName": {
            "type": "string"
          },
          "toolInput": {
            "type": "string"
          },
          "toolOutput": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "mcpGrantId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AgentCodeIntelRepoAccessUpdateRequest": {
        "type": "object",
        "properties": {
          "allowedCodeIntelRepoIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "AgentCollaboratorsUpdateRequest": {
        "type": "object",
        "properties": {
          "collaboratorAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          }
        }
      },
      "AgentConfigSnapshot": {
        "type": "object",
        "properties": {
          "formatVersion": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32"
          },
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "topP": {
            "type": "number",
            "format": "double"
          },
          "fallbackProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "fallbackModel": {
            "type": "string"
          },
          "autonomyTier": {
            "$ref": "#/components/schemas/AgentAutonomyTier"
          },
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          },
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          },
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "edgeRoutingPolicy": {
            "$ref": "#/components/schemas/EdgeRoutingPolicy"
          },
          "knowledgeBaseEnabled": {
            "type": "boolean"
          },
          "sarvamEnabled": {
            "type": "boolean"
          },
          "e2bEnabled": {
            "type": "boolean"
          },
          "codeWorkspaceEnabled": {
            "type": "boolean"
          },
          "knowledgeWriteEnabled": {
            "type": "boolean"
          },
          "shareMemoryWithTenant": {
            "type": "boolean"
          },
          "biometricConsentEnabled": {
            "type": "boolean"
          },
          "responseCachingEnabled": {
            "type": "boolean"
          },
          "semanticResponseCachingEnabled": {
            "type": "boolean"
          },
          "costRoutingEnabled": {
            "type": "boolean"
          },
          "economyProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "economyModel": {
            "type": "string"
          },
          "costRoutingJevThreshold": {
            "type": "number",
            "format": "double"
          },
          "voiceModelProvider": {
            "$ref": "#/components/schemas/VoiceModelProvider"
          },
          "voiceModel": {
            "type": "string"
          },
          "videoModelProvider": {
            "$ref": "#/components/schemas/VideoModelProvider"
          },
          "videoModel": {
            "type": "string"
          },
          "textModelProvider": {
            "$ref": "#/components/schemas/TextModelProvider"
          },
          "textModel": {
            "type": "string"
          },
          "ttsProvider": {
            "$ref": "#/components/schemas/TtsModelProvider"
          },
          "ttsModel": {
            "type": "string"
          },
          "resultSchemaJson": {
            "type": "string"
          },
          "allowedToolNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "allowedCodeIntelRepoIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedKnowledgeWriteCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "collaboratorAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "enabledGuardrails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "xaiServerToolsEnabled": {
            "type": "boolean"
          },
          "topK": {
            "type": "integer",
            "format": "int32"
          },
          "stopSequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "frequencyPenalty": {
            "type": "number",
            "format": "double"
          },
          "presencePenalty": {
            "type": "number",
            "format": "double"
          },
          "seed": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AgentCostRoutingUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "economyProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "economyModel": {
            "type": "string"
          },
          "jevThreshold": {
            "type": "number",
            "format": "double",
            "minimum": 0.5,
            "maximum": 0.99
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "systemPrompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32768
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "exclusiveMinimum": 0
          },
          "temperature": {
            "type": "number",
            "format": "double",
            "minimum": 0.0,
            "maximum": 1.0
          },
          "topP": {
            "type": "number",
            "format": "double",
            "minimum": 0.0,
            "maximum": 1.0
          },
          "knowledgeBaseEnabled": {
            "type": "boolean"
          },
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          },
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          },
          "edgeRoutingPolicy": {
            "$ref": "#/components/schemas/EdgeRoutingPolicy"
          },
          "voiceModelProvider": {
            "$ref": "#/components/schemas/VoiceModelProvider"
          },
          "voiceModel": {
            "type": "string"
          },
          "videoModelProvider": {
            "$ref": "#/components/schemas/VideoModelProvider"
          },
          "videoModel": {
            "type": "string"
          },
          "ttsProvider": {
            "$ref": "#/components/schemas/TtsModelProvider"
          },
          "ttsModel": {
            "type": "string"
          },
          "topK": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 1000
          },
          "stopSequences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 8
          },
          "frequencyPenalty": {
            "type": "number",
            "format": "double",
            "minimum": -2.0,
            "maximum": 2.0
          },
          "presencePenalty": {
            "type": "number",
            "format": "double",
            "minimum": -2.0,
            "maximum": 2.0
          },
          "seed": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "name",
          "systemPrompt",
          "providerName"
        ]
      },
      "AgentDirectoryController_PublishRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 50
          },
          "homepageUrl": {
            "type": "string",
            "maxLength": 1024
          }
        }
      },
      "AgentEdgeRoutingPolicyUpdateRequest": {
        "type": "object",
        "properties": {
          "edgeRoutingPolicy": {
            "$ref": "#/components/schemas/EdgeRoutingPolicy"
          }
        }
      },
      "AgentEventTriggerRequest": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "filterJson": {
            "type": "string",
            "maxLength": 4000
          },
          "goalTemplate": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "eventType",
          "goalTemplate"
        ]
      },
      "AgentEventTriggerResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "filterJson": {
            "type": "string"
          },
          "goalTemplate": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "disabledReason": {
            "type": "string"
          },
          "guardResetAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFiredAt": {
            "type": "string",
            "format": "date-time"
          },
          "fireCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "availablePlaceholders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "fireCount"
        ]
      },
      "AgentExperienceModeUpdateRequest": {
        "type": "object",
        "properties": {
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          }
        }
      },
      "AgentExperimentDtos_CreateExperimentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "treatmentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "trafficPercent": {
            "type": "integer",
            "format": "int32"
          },
          "autoStopErrorThresholdPct": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AgentExperimentDtos_ExperimentMetricsResponse": {
        "type": "object",
        "properties": {
          "experimentId": {
            "type": "string",
            "format": "uuid"
          },
          "control": {
            "$ref": "#/components/schemas/AgentExperimentDtos_VariantStatsResponse"
          },
          "treatment": {
            "$ref": "#/components/schemas/AgentExperimentDtos_VariantStatsResponse"
          }
        }
      },
      "AgentExperimentDtos_ExperimentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExperimentStatus"
          },
          "controlAgentId": {
            "type": "string",
            "format": "uuid"
          },
          "treatmentAgentId": {
            "type": "string",
            "format": "uuid"
          },
          "treatmentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "trafficPercent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "autoStopErrorThresholdPct": {
            "type": "integer",
            "format": "int32"
          },
          "stopReason": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "stoppedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "trafficPercent"
        ]
      },
      "AgentExperimentDtos_StopExperimentRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "AgentExperimentDtos_VariantStatsResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "callCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double"
          },
          "totalCostUsd": {
            "type": "number",
            "format": "double"
          },
          "errorRatePct": {
            "type": "number",
            "format": "double"
          },
          "feedbackCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "thumbsUpRatePct": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "callCount",
          "feedbackCount"
        ]
      },
      "AgentFallbackUpdateRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "AgentGenerationController_AgentGenerationRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "description"
        ]
      },
      "AgentGenerationParamsUpdateRequest": {
        "type": "object",
        "properties": {
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "exclusiveMinimum": 0
          },
          "temperature": {
            "type": "number",
            "format": "double",
            "minimum": 0.0,
            "maximum": 1.0
          },
          "topP": {
            "type": "number",
            "format": "double",
            "minimum": 0.0,
            "maximum": 1.0
          },
          "topK": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 1000
          },
          "stopSequences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 8
          },
          "frequencyPenalty": {
            "type": "number",
            "format": "double",
            "minimum": -2.0,
            "maximum": 2.0
          },
          "presencePenalty": {
            "type": "number",
            "format": "double",
            "minimum": -2.0,
            "maximum": 2.0
          },
          "seed": {
            "type": "integer",
            "format": "int32"
          },
          "clearSamplingParams": {
            "type": "boolean"
          }
        },
        "required": [
          "maxTokens",
          "temperature",
          "topP"
        ]
      },
      "AgentGuardrailsRequest": {
        "type": "object",
        "properties": {
          "guardrails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "AgentGuardrailsResponse": {
        "type": "object",
        "properties": {
          "availableGuardrails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "enabledGuardrails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "guardrailDescriptions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "lockedGuardrails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "AgentHealthStatus": {
        "type": "string",
        "enum": [
          "HEALTHY",
          "AT_RISK",
          "DEGRADED"
        ]
      },
      "AgentHookDtos_AgentHooksResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "hooks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "inherited": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "webhookHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "schema": {
            "$ref": "#/components/schemas/AgentHookDtos_Schema"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentHookDtos_Schema": {
        "type": "object",
        "properties": {
          "maxHooks": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "defaultTimeoutMs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "minTimeoutMs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTimeoutMs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "points": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actionsByPoint": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "builtinPatterns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trustTiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sensitivities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "maxHooks",
          "defaultTimeoutMs",
          "minTimeoutMs",
          "maxTimeoutMs"
        ]
      },
      "AgentHookDtos_TenantHooksResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "hooks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "webhookHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "platformWebhookHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "schema": {
            "$ref": "#/components/schemas/AgentHookDtos_Schema"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentImportDtos_ConversionReport": {
        "type": "object",
        "properties": {
          "converted": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentImportDtos_ConvertedItem"
            }
          },
          "needsManual": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentImportDtos_NeedsManualItem"
            }
          },
          "unsupported": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentImportDtos_UnsupportedItem"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentImportDtos_ConvertedItem": {
        "type": "object",
        "properties": {
          "what": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "AgentImportDtos_ImportResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "report": {
            "$ref": "#/components/schemas/AgentImportDtos_ConversionReport"
          }
        }
      },
      "AgentImportDtos_ImportedAgentView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "modelProvider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "topP": {
            "type": "number",
            "format": "double"
          },
          "suggestedCapabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentImportDtos_NeedsManualItem": {
        "type": "object",
        "properties": {
          "what": {
            "type": "string"
          },
          "why": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          }
        }
      },
      "AgentImportDtos_PreviewResponse": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "detectedSource": {
            "type": "string"
          },
          "agent": {
            "$ref": "#/components/schemas/AgentImportDtos_ImportedAgentView"
          },
          "report": {
            "$ref": "#/components/schemas/AgentImportDtos_ConversionReport"
          }
        }
      },
      "AgentImportDtos_UnsupportedItem": {
        "type": "object",
        "properties": {
          "what": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        }
      },
      "AgentJobCountsResponse": {
        "type": "object",
        "properties": {
          "queued": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "running": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "awaitingApproval": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "live": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "succeededInWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "failedInWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cancelledInWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "window": {
            "type": "string",
            "format": "duration"
          },
          "windowStart": {
            "type": "string",
            "format": "date-time"
          },
          "asOf": {
            "type": "string",
            "format": "date-time"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantWide": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "queued",
          "running",
          "awaitingApproval",
          "live",
          "succeededInWindow",
          "failedInWindow",
          "cancelledInWindow",
          "tenantWide"
        ]
      },
      "AgentJobObservabilityController_ResultSchemaResponse": {
        "type": "object",
        "properties": {
          "schemaJson": {
            "type": "string"
          }
        }
      },
      "AgentJobOrigin": {
        "type": "string",
        "enum": [
          "API",
          "SCHEDULE",
          "EVENT",
          "APPROVAL"
        ]
      },
      "AgentJobProgressNoteView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string"
          },
          "percent": {
            "type": "integer",
            "format": "int32"
          },
          "source": {
            "$ref": "#/components/schemas/ProgressSource"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "goal": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentJobStatus"
          },
          "terminal": {
            "type": "boolean",
            "default": false
          },
          "origin": {
            "$ref": "#/components/schemas/AgentJobOrigin"
          },
          "originRef": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "progressNote": {
            "type": "string"
          },
          "progressUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "resultText": {
            "type": "string"
          },
          "resultJson": {},
          "schemaAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "costUsd": {
            "type": "number"
          },
          "errorCode": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "timeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "deadlineAt": {
            "type": "string",
            "format": "date-time"
          },
          "turnsUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTurns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "scheduleId": {
            "type": "string",
            "format": "uuid"
          },
          "scheduleOccurrenceAt": {
            "type": "string",
            "format": "date-time"
          },
          "parkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvalDeadlineAt": {
            "type": "string",
            "format": "date-time"
          },
          "parkCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "terminal",
          "timeoutSeconds",
          "turnsUsed",
          "maxTurns",
          "cancelRequested",
          "parkCount"
        ]
      },
      "AgentJobStartRequest": {
        "type": "object",
        "properties": {
          "goal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "timeoutSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "resultSchemaJson": {
            "type": "string"
          },
          "maxToolCalls": {
            "type": "integer",
            "format": "int32"
          },
          "maxTurns": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "goal"
        ]
      },
      "AgentJobStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "RUNNING",
          "AWAITING_APPROVAL",
          "SUCCEEDED",
          "FAILED",
          "CANCELLED"
        ]
      },
      "AgentJobSummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AgentJobStatus"
          },
          "goalPreview": {
            "type": "string"
          },
          "progressNote": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "errorCode": {
            "type": "string"
          },
          "parkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvalDeadlineAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentKnowledgeAccessUpdateRequest": {
        "type": "object",
        "properties": {
          "allowedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          }
        }
      },
      "AgentKnowledgeBaseToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentLabDtos_LabCancelResponse": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string"
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "cancelRequested"
        ]
      },
      "AgentLabDtos_LabCapabilitiesResponse": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "maxCells": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxCallsPerRun": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxSystemPrompts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxSimilarityCells": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runTtlMinutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "withToolsAvailable": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "allowed",
          "maxCells",
          "maxCallsPerRun",
          "maxSystemPrompts",
          "maxSimilarityCells",
          "runTtlMinutes",
          "withToolsAvailable"
        ]
      },
      "AgentLabDtos_LabCellRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "promptIndex": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentLabDtos_LabMessage"
            }
          },
          "expected": {
            "type": "string"
          }
        }
      },
      "AgentLabDtos_LabCellResult": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "answerTruncated": {
            "type": "boolean",
            "default": false
          },
          "score": {
            "type": "number",
            "format": "double"
          },
          "scoreStatus": {
            "type": "string"
          },
          "scoreFeedback": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "ms": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "answerTruncated"
        ]
      },
      "AgentLabDtos_LabMessage": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "AgentLabDtos_LabRunRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "systemPrompts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentLabDtos_LabCellRequest"
            }
          },
          "scoring": {
            "type": "string"
          },
          "similarity": {
            "type": "string"
          },
          "withTools": {
            "type": "boolean"
          }
        }
      },
      "AgentLabDtos_LabRunResponse": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "plannedCalls": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "completedCalls": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          },
          "errorMessage": {
            "type": "string"
          },
          "createdAtMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "updatedAtMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "finishedAtMs": {
            "type": "integer",
            "format": "int64"
          },
          "cells": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentLabDtos_LabCellResult"
            }
          },
          "similarity": {
            "$ref": "#/components/schemas/AgentLabDtos_LabSimilarity"
          }
        },
        "required": [
          "plannedCalls",
          "completedCalls",
          "cancelRequested",
          "createdAtMs",
          "updatedAtMs"
        ]
      },
      "AgentLabDtos_LabSimilarity": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "matrix": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              }
            }
          }
        }
      },
      "AgentMemoryEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "subjectKey": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "distance": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "useCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "distance",
          "useCount"
        ]
      },
      "AgentModalitiesView": {
        "type": "object",
        "properties": {
          "image": {
            "type": "boolean",
            "default": false
          },
          "audio": {
            "type": "boolean",
            "default": false
          },
          "video": {
            "type": "boolean",
            "default": false
          },
          "document": {
            "type": "boolean",
            "default": false
          },
          "maxAttachmentBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxAttachments": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "sandboxData": {
            "type": "boolean",
            "default": false
          },
          "sandboxDataUnavailableReason": {
            "type": "string"
          }
        },
        "required": [
          "image",
          "audio",
          "video",
          "document",
          "maxAttachmentBytes",
          "maxAttachments",
          "sandboxData"
        ]
      },
      "AgentModelUpdateRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "providerName",
          "model"
        ]
      },
      "AgentPromptUpdateRequest": {
        "type": "object",
        "properties": {
          "systemPrompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32768
          }
        },
        "required": [
          "systemPrompt"
        ]
      },
      "AgentPublishResponse": {
        "type": "object",
        "properties": {
          "version": {
            "$ref": "#/components/schemas/AgentVersionResponse"
          },
          "createdNew": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "createdNew"
        ]
      },
      "AgentReasoningDepthUpdateRequest": {
        "type": "object",
        "properties": {
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          }
        },
        "required": [
          "reasoningDepth"
        ]
      },
      "AgentReliabilitySummary": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "failedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "successRatePercent": {
            "type": "number",
            "format": "double"
          },
          "avgResponseTimeMs": {
            "type": "integer",
            "format": "int64"
          },
          "firstCallAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastCallAt": {
            "type": "string",
            "format": "date-time"
          },
          "toolCallCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolCallFailureCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolSuccessRatePercent": {
            "type": "number",
            "format": "double"
          },
          "fallbackTriggeredCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "fallbackFailedCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "lastFallbackAt": {
            "type": "string",
            "format": "date-time"
          },
          "recentFailures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentReliabilitySummary_RecentFailure"
            }
          }
        },
        "required": [
          "totalCalls",
          "failedCalls",
          "toolCallCount",
          "toolCallFailureCount",
          "fallbackTriggeredCount",
          "fallbackFailedCount"
        ]
      },
      "AgentReliabilitySummary_RecentFailure": {
        "type": "object",
        "properties": {
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "errorMessage": {
            "type": "string"
          },
          "exceptionType": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "AgentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "fallbackProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "fallbackModel": {
            "type": "string"
          },
          "fallbackTriggeredCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "fallbackFailedCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "lastFallbackAt": {
            "type": "string",
            "format": "date-time"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "temperature": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "topP": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          },
          "knowledgeBaseEnabled": {
            "type": "boolean",
            "default": false
          },
          "sarvamEnabled": {
            "type": "boolean",
            "default": false
          },
          "e2bEnabled": {
            "type": "boolean",
            "default": false
          },
          "codeWorkspaceEnabled": {
            "type": "boolean",
            "default": false
          },
          "responseCachingEnabled": {
            "type": "boolean",
            "default": false
          },
          "semanticResponseCachingEnabled": {
            "type": "boolean",
            "default": false
          },
          "costRoutingEnabled": {
            "type": "boolean",
            "default": false
          },
          "economyProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "economyModel": {
            "type": "string"
          },
          "costRoutingJevThreshold": {
            "type": "number",
            "format": "double"
          },
          "shareMemoryWithTenant": {
            "type": "boolean",
            "default": false
          },
          "biometricConsentEnabled": {
            "type": "boolean",
            "default": false
          },
          "edgeRoutingPolicy": {
            "$ref": "#/components/schemas/EdgeRoutingPolicy"
          },
          "allowedToolNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "allowedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "allowedCodeIntelRepoIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          },
          "autonomyTier": {
            "$ref": "#/components/schemas/AgentAutonomyTier"
          },
          "collaboratorAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "voiceModelProvider": {
            "$ref": "#/components/schemas/VoiceModelProvider"
          },
          "voiceModel": {
            "type": "string"
          },
          "videoModelProvider": {
            "$ref": "#/components/schemas/VideoModelProvider"
          },
          "videoModel": {
            "type": "string"
          },
          "ttsProvider": {
            "$ref": "#/components/schemas/TtsModelProvider"
          },
          "ttsModel": {
            "type": "string"
          },
          "editable": {
            "type": "boolean",
            "default": false
          },
          "modalities": {
            "$ref": "#/components/schemas/AgentModalitiesView"
          },
          "inputSchemaJson": {
            "type": "string"
          },
          "outputSchemaJson": {
            "type": "string"
          },
          "xaiServerToolsEnabled": {
            "type": "boolean",
            "default": false
          },
          "topK": {
            "type": "integer",
            "format": "int32"
          },
          "stopSequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "frequencyPenalty": {
            "type": "number",
            "format": "double"
          },
          "presencePenalty": {
            "type": "number",
            "format": "double"
          },
          "seed": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "accessLevel": {
            "type": "string"
          },
          "runtimeLimits": {
            "$ref": "#/components/schemas/RuntimeLimits"
          }
        },
        "required": [
          "fallbackTriggeredCount",
          "fallbackFailedCount",
          "maxTokens",
          "temperature",
          "topP",
          "knowledgeBaseEnabled",
          "sarvamEnabled",
          "e2bEnabled",
          "codeWorkspaceEnabled",
          "responseCachingEnabled",
          "semanticResponseCachingEnabled",
          "costRoutingEnabled",
          "shareMemoryWithTenant",
          "biometricConsentEnabled",
          "editable",
          "xaiServerToolsEnabled"
        ]
      },
      "AgentResponseCachingToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentResultSchemaRequest": {
        "type": "object",
        "properties": {
          "schemaJson": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "schemaJson"
        ]
      },
      "AgentRunBudgetResponse": {
        "type": "object",
        "properties": {
          "overrideEnabled": {
            "type": "boolean",
            "default": false
          },
          "globalCapUsd": {
            "type": "number"
          },
          "agentCapUsd": {
            "type": "number"
          },
          "effectiveCapUsd": {
            "type": "number"
          },
          "maxAgentCapUsd": {
            "type": "number"
          },
          "perBranchEstimateUsd": {
            "type": "number"
          },
          "scope": {
            "type": "string"
          },
          "estimate": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "overrideEnabled",
          "estimate"
        ]
      },
      "AgentRuntimeProperties_Range": {
        "type": "object",
        "properties": {
          "max": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "min": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "max",
          "min"
        ]
      },
      "AgentScheduleRequest": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string",
            "maxLength": 64
          },
          "timezone": {
            "type": "string",
            "maxLength": 64
          },
          "goalTemplate": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "intervalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "targetType": {
            "type": "string",
            "maxLength": 16
          },
          "workflowId": {
            "type": "string",
            "format": "uuid"
          },
          "sentinel": {
            "type": "boolean"
          }
        },
        "required": [
          "goalTemplate"
        ]
      },
      "AgentScheduleResponse": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string"
          },
          "intervalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "targetType": {
            "type": "string"
          },
          "workflowId": {
            "type": "string",
            "format": "uuid"
          },
          "timezone": {
            "type": "string"
          },
          "goalTemplate": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "nextRunAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFiredAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastJobId": {
            "type": "string",
            "format": "uuid"
          },
          "lastJobStatus": {
            "type": "string"
          },
          "lastSkippedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSkipReason": {
            "type": "string"
          },
          "consecutiveSkipCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalFireCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalSkipCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sentinel": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "consecutiveSkipCount",
          "totalFireCount",
          "totalSkipCount",
          "sentinel"
        ]
      },
      "AgentScheduleRunResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "jobStatus": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "workflowRunId": {
            "type": "string",
            "format": "uuid"
          },
          "error": {
            "type": "string"
          },
          "sentinelOutcome": {
            "type": "string"
          },
          "sentinelOutcomeNote": {
            "type": "string"
          }
        }
      },
      "AgentSessionLlmUsageController_SessionLlmCallEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64"
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "success": {
            "type": "boolean",
            "default": false
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "success",
          "latencyMs"
        ]
      },
      "AgentShareController_ShareChatRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 2000
          },
          "sessionToken": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "AgentShareController_ShareChatStreamRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 2000
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatInlineAttachment"
            }
          },
          "visionSessionId": {
            "type": "string"
          },
          "sessionKey": {
            "type": "string"
          }
        }
      },
      "AgentShareController_ShareReportRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "AgentShareMemoryToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "AgentShareOwnerController_ShareStatusResponse": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "default": false
          },
          "shareId": {
            "type": "string"
          },
          "shareUrl": {
            "type": "string"
          },
          "viewerCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "reportCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedReason": {
            "type": "string"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "active",
          "viewerCount",
          "reportCount"
        ]
      },
      "AgentShareVisionController_ShareVisionSessionStartRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/VisionSessionMode"
          },
          "source": {
            "$ref": "#/components/schemas/VisionSource"
          }
        },
        "required": [
          "mode",
          "source"
        ]
      },
      "AgentSpecialtyController_SpecialtiesRequest": {
        "type": "object",
        "properties": {
          "specialties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentSpecialtyController_SpecialtyDto"
            }
          }
        }
      },
      "AgentSpecialtyController_SpecialtiesResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "specialties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentSpecialtyController_SpecialtyDto"
            }
          }
        }
      },
      "AgentSpecialtyController_SpecialtyDto": {
        "type": "object",
        "properties": {
          "capabilityTag": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "AgentTextModelUpdateRequest": {
        "type": "object",
        "properties": {
          "textModelProvider": {
            "$ref": "#/components/schemas/TextModelProvider"
          },
          "textModel": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "textModel"
        ]
      },
      "AgentTier": {
        "type": "string",
        "enum": [
          "CONSUMER",
          "PROFESSIONAL",
          "EXPERT"
        ]
      },
      "AgentTierUpdateRequest": {
        "type": "object",
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/AgentTier"
          }
        },
        "required": [
          "tier"
        ]
      },
      "AgentToolAccessUpdateRequest": {
        "type": "object",
        "properties": {
          "allowedToolNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "maxItems": 256
          }
        }
      },
      "AgentTtsModelUpdateRequest": {
        "type": "object",
        "properties": {
          "ttsProvider": {
            "$ref": "#/components/schemas/TtsModelProvider"
          },
          "ttsModel": {
            "type": "string"
          }
        }
      },
      "AgentTuningModeUpdateRequest": {
        "type": "object",
        "properties": {
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          }
        },
        "required": [
          "tuningMode"
        ]
      },
      "AgentTurn_Message": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTurn_ToolCall"
            }
          },
          "toolCallId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AgentTurn_Request": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTurn_Message"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTurn_Tool"
            }
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32"
          },
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "AgentTurn_Result": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentTurn_ToolCall"
            }
          },
          "model": {
            "type": "string"
          },
          "finishReason": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/AgentTurn_Usage"
          }
        }
      },
      "AgentTurn_Tool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "AgentTurn_ToolCall": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "args": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "AgentTurn_Usage": {
        "type": "object",
        "properties": {
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AgentVersionLabel": {
        "type": "string",
        "enum": [
          "STAGING",
          "PRODUCTION"
        ]
      },
      "AgentVersionLabelUpdateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "$ref": "#/components/schemas/AgentVersionLabel"
          },
          "force": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "AgentVersionPromoteRequest": {
        "type": "object",
        "properties": {
          "label": {
            "$ref": "#/components/schemas/AgentVersionLabel"
          },
          "force": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "label"
        ]
      },
      "AgentVersionPublishRequest": {
        "type": "object",
        "properties": {
          "changeNote": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "AgentVersionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "agentName": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "changeSummary": {
            "type": "string"
          },
          "label": {
            "$ref": "#/components/schemas/AgentVersionLabel"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "config": {
            "$ref": "#/components/schemas/AgentConfigSnapshot"
          }
        },
        "required": [
          "versionNumber"
        ]
      },
      "AgentVideoModelUpdateRequest": {
        "type": "object",
        "properties": {
          "videoModelProvider": {
            "$ref": "#/components/schemas/VideoModelProvider"
          },
          "videoModel": {
            "type": "string"
          }
        }
      },
      "AgentVoiceModelUpdateRequest": {
        "type": "object",
        "properties": {
          "voiceModelProvider": {
            "$ref": "#/components/schemas/VoiceModelProvider"
          },
          "voiceModel": {
            "type": "string"
          }
        }
      },
      "AiContentReportRequest": {
        "type": "object",
        "properties": {
          "surface": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "messageRef": {
            "type": "string"
          },
          "onDevice": {
            "type": "boolean"
          },
          "appPlatform": {
            "type": "string"
          },
          "appVersion": {
            "type": "string"
          }
        }
      },
      "AiContentReportReviewRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "reviewNote": {
            "type": "string"
          }
        }
      },
      "AiModelPreferenceResponse": {
        "type": "object",
        "properties": {
          "featureKey": {
            "type": "string"
          },
          "featureLabel": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "AmbientDigestController_AmbientDigestResponse": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "sentinelScheduleCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "pendingApprovals": {
            "$ref": "#/components/schemas/AmbientDigestController_PendingApprovals"
          },
          "sentinelOutcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AmbientDigestController_SentinelOutcomeItem"
            }
          },
          "jobs": {
            "$ref": "#/components/schemas/AmbientDigestController_JobsInWindow"
          },
          "agentNotifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationResponse"
            }
          }
        },
        "required": [
          "sentinelScheduleCount"
        ]
      },
      "AmbientDigestController_JobsInWindow": {
        "type": "object",
        "properties": {
          "observed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "byStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "required": [
          "observed",
          "truncated"
        ]
      },
      "AmbientDigestController_PendingApprovals": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalRequestResponse"
            }
          }
        },
        "required": [
          "total"
        ]
      },
      "AmbientDigestController_SentinelOutcomeItem": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "scheduleId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "outcomeNote": {
            "type": "string"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AppBuilderFileEdit": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "AppBuilderGenerateFilesResult": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppBuilderFileEdit"
            }
          },
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "ApplyDtos_ApplyRequest": {
        "type": "object",
        "properties": {
          "background": {
            "type": "boolean"
          },
          "brief": {
            "$ref": "#/components/schemas/Brief"
          },
          "baseVersion": {
            "type": "integer",
            "format": "int32"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "ApplyDtos_ApplyResult": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "error": {
            "type": "string"
          },
          "failedStep": {
            "$ref": "#/components/schemas/ApplyDtos_StepDto"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplyDtos_StepDto"
            }
          },
          "orphans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplyDtos_StepDto"
            }
          }
        },
        "required": [
          "version"
        ]
      },
      "ApplyDtos_RollbackRequest": {
        "type": "object",
        "properties": {
          "background": {
            "type": "boolean"
          }
        }
      },
      "ApplyDtos_StepDto": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "kind": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "seq"
        ]
      },
      "ApplyDtos_TuneRequest": {
        "type": "object",
        "properties": {
          "instruction": {
            "type": "string"
          }
        }
      },
      "ApplyDtos_TuneResult": {
        "type": "object",
        "properties": {
          "proposedBrief": {
            "$ref": "#/components/schemas/Brief"
          },
          "diff": {},
          "narrative": {
            "type": "string"
          },
          "baseVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "baseVersion"
        ]
      },
      "ApplyDtos_VersionDiff": {
        "type": "object",
        "properties": {
          "from": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "to": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "patch": {}
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ApprovalDecisionRequest": {
        "type": "object",
        "properties": {
          "decidedBy": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "formValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ApprovalPolicyUpdateRequest": {
        "type": "object",
        "properties": {
          "requiresApproval": {
            "type": "boolean"
          }
        },
        "required": [
          "requiresApproval"
        ]
      },
      "ApprovalRequestResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "actionType": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "requestedBy": {
            "type": "string"
          },
          "decidedBy": {
            "type": "string"
          },
          "rejectionReason": {
            "type": "string"
          },
          "executionError": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          },
          "retryCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "nextRetryAt": {
            "type": "string",
            "format": "date-time"
          },
          "payload": {
            "type": "string"
          },
          "executionResult": {
            "type": "string"
          }
        },
        "required": [
          "retryCount"
        ]
      },
      "ApprovalStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "APPROVED",
          "REJECTED",
          "EXECUTION_FAILED",
          "DEAD_LETTERED"
        ]
      },
      "AssistCodeEditRequest": {
        "type": "object",
        "properties": {
          "system": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12000
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300000
          }
        },
        "required": [
          "system",
          "prompt"
        ]
      },
      "AssistRequest": {
        "type": "object",
        "properties": {
          "fieldLabel": {
            "type": "string",
            "minLength": 1
          },
          "instruction": {
            "type": "string",
            "minLength": 1
          },
          "currentValue": {
            "type": "string"
          }
        },
        "required": [
          "fieldLabel",
          "instruction"
        ]
      },
      "AssistResponse": {
        "type": "object",
        "properties": {
          "suggestion": {
            "type": "string"
          }
        }
      },
      "AtlassianOAuthController_AuthorizeUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "AttachProcedureRequest": {
        "type": "object",
        "properties": {
          "procedureId": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        },
        "required": [
          "procedureId"
        ]
      },
      "AuditLogCountsResponse": {
        "type": "object",
        "properties": {
          "actionType": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "detailContains": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "byOutcome": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "required": [
          "total"
        ]
      },
      "AuditLogEntryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/AuditOutcome"
          },
          "detail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AuditOutcome": {
        "type": "string",
        "enum": [
          "SUCCESS",
          "FAILURE",
          "PENDING_APPROVAL",
          "AUTO_APPROVED",
          "APPROVED",
          "REJECTED",
          "DENIED",
          "EXPIRED",
          "REPLAYED",
          "BUDGET_EXCEEDED",
          "WARNING"
        ]
      },
      "AuditSealDtos_ExportBundle": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "algorithm": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "predecessor": {
            "$ref": "#/components/schemas/AuditSealDtos_ExportPredecessor"
          },
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditSealDtos_ExportKey"
            }
          },
          "seals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditSealDtos_ExportSeal"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditSealDtos_ExportRow"
            }
          }
        },
        "required": [
          "truncated"
        ]
      },
      "AuditSealDtos_ExportKey": {
        "type": "object",
        "properties": {
          "kid": {
            "type": "string"
          },
          "alg": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          }
        }
      },
      "AuditSealDtos_ExportPredecessor": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "sealHash": {
            "type": "string"
          }
        },
        "required": [
          "seq"
        ]
      },
      "AuditSealDtos_ExportRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "createdAtMicros": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAtMicros"
        ]
      },
      "AuditSealDtos_ExportSeal": {
        "type": "object",
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tenantScope": {
            "type": "string"
          },
          "firstRowId": {
            "type": "string"
          },
          "firstRowAt": {
            "type": "string",
            "format": "date-time"
          },
          "firstRowAtMicros": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "lastRowId": {
            "type": "string"
          },
          "lastRowAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastRowAtMicros": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "rowCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rangeHash": {
            "type": "string"
          },
          "prevSealHash": {
            "type": "string"
          },
          "sealHash": {
            "type": "string"
          },
          "algorithm": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "keyId": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "sealedAt": {
            "type": "string",
            "format": "date-time"
          },
          "purged": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "seq",
          "firstRowAtMicros",
          "lastRowAtMicros",
          "rowCount",
          "purged"
        ]
      },
      "AuditSealDtos_SealPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditSealDtos_SealView"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "page",
          "size",
          "total"
        ]
      },
      "AuditSealDtos_SealView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "seq": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tenantScope": {
            "type": "string"
          },
          "firstRowId": {
            "type": "string",
            "format": "uuid"
          },
          "firstRowAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastRowId": {
            "type": "string",
            "format": "uuid"
          },
          "lastRowAt": {
            "type": "string",
            "format": "date-time"
          },
          "rowCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rangeHash": {
            "type": "string"
          },
          "prevSealHash": {
            "type": "string"
          },
          "sealHash": {
            "type": "string"
          },
          "algorithm": {
            "type": "string"
          },
          "keyId": {
            "type": "string"
          },
          "signed": {
            "type": "boolean",
            "default": false
          },
          "sealedAt": {
            "type": "string",
            "format": "date-time"
          },
          "purgedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "seq",
          "rowCount",
          "signed"
        ]
      },
      "AuditSealVerifier_Result": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "default": false
          },
          "sealsChecked": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rowsChecked": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "purgedSeals": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "firstBrokenSealId": {
            "type": "string",
            "format": "uuid"
          },
          "firstBrokenSeq": {
            "type": "integer",
            "format": "int64"
          },
          "reason": {
            "type": "string"
          },
          "headSeq": {
            "type": "integer",
            "format": "int64"
          },
          "headSealHash": {
            "type": "string"
          },
          "keyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "ok",
          "sealsChecked",
          "rowsChecked",
          "purgedSeals",
          "truncated"
        ]
      },
      "BanditAlgorithm": {
        "type": "string",
        "enum": [
          "THOMPSON",
          "UCB1"
        ]
      },
      "Brief": {
        "type": "object",
        "properties": {
          "briefVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "title": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "clarifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_Clarification"
            }
          },
          "trust": {
            "$ref": "#/components/schemas/Brief_Trust"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_AgentSpec"
            }
          },
          "procedures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_ProcedureSpec"
            }
          },
          "workflows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_WorkflowSpec"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_ToolSpec"
            }
          },
          "mcpServers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_McpServerSpec"
            }
          },
          "knowledge": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_KnowledgeSpec"
            }
          },
          "secrets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_SecretSpec"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_ChannelSpec"
            }
          },
          "evalSet": {
            "$ref": "#/components/schemas/Brief_EvalSet"
          },
          "rehearsal": {
            "$ref": "#/components/schemas/Brief_Rehearsal"
          },
          "narrative": {
            "$ref": "#/components/schemas/Brief_Narrative"
          }
        },
        "required": [
          "briefVersion"
        ]
      },
      "BriefDtos_BindingView": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          }
        }
      },
      "BriefDtos_BriefRequest": {
        "type": "object",
        "properties": {
          "brief": {
            "$ref": "#/components/schemas/Brief"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "BriefDtos_CreateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ]
      },
      "BriefDtos_DeleteRequest": {
        "type": "object",
        "properties": {
          "purgeEntities": {
            "type": "boolean"
          }
        }
      },
      "BriefDtos_Detail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "brief": {
            "$ref": "#/components/schemas/Brief"
          },
          "readiness": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadinessRow"
            }
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefDtos_VersionSummary"
            }
          },
          "rung": {
            "type": "string"
          },
          "bindings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BriefDtos_BindingView"
            }
          },
          "ledgerSummary": {}
        }
      },
      "BriefDtos_ListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "rung": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "currentVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "baseline": {
            "type": "number",
            "format": "double"
          },
          "lastDelta": {
            "type": "number",
            "format": "double"
          },
          "readinessSummary": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "currentVersion"
        ]
      },
      "BriefDtos_PlanResponse": {
        "type": "object",
        "properties": {
          "brief": {
            "$ref": "#/components/schemas/Brief"
          },
          "readiness": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadinessRow"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BriefDtos_ReadinessResponse": {
        "type": "object",
        "properties": {
          "readiness": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadinessRow"
            }
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "BriefDtos_UpdateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ]
      },
      "BriefDtos_VersionSummary": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "parentVersion": {
            "type": "integer",
            "format": "int32"
          },
          "note": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version"
        ]
      },
      "Brief_AgentSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "reasoningDepth": {
            "type": "string"
          },
          "tuningMode": {
            "type": "string"
          },
          "generation": {
            "$ref": "#/components/schemas/Brief_Generation"
          },
          "toolAllowList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "knowledgeRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "procedureRefs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "guardrails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_Guardrail"
            }
          },
          "edgeRoutingPolicy": {
            "type": "string"
          },
          "shareMemoryWithTenant": {
            "type": "boolean"
          }
        }
      },
      "Brief_ChannelSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "bindTo": {
            "type": "string"
          },
          "optional": {
            "type": "boolean"
          }
        }
      },
      "Brief_Clarification": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Brief_EnvBinding": {
        "type": "object",
        "properties": {
          "secretRef": {
            "type": "string"
          }
        }
      },
      "Brief_EvalCase": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "expected": {
            "type": "string"
          },
          "rubric": {
            "type": "string"
          }
        }
      },
      "Brief_EvalSet": {
        "type": "object",
        "properties": {
          "targetAgent": {
            "type": "string"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_EvalCase"
            }
          },
          "gate": {
            "$ref": "#/components/schemas/Brief_Gate"
          }
        }
      },
      "Brief_Gate": {
        "type": "object",
        "properties": {
          "minScore": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "Brief_Generation": {
        "type": "object",
        "properties": {
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "topP": {
            "type": "number",
            "format": "double"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Brief_Guardrail": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Brief_KnowledgeSource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "connectorType": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          }
        }
      },
      "Brief_KnowledgeSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_KnowledgeSource"
            }
          }
        }
      },
      "Brief_McpServerSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "registryId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Brief_EnvBinding"
            }
          }
        }
      },
      "Brief_Narrative": {
        "type": "object",
        "properties": {
          "whyAgentic": {
            "type": "string"
          },
          "perNode": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Brief_NodeNarrative"
            }
          }
        }
      },
      "Brief_NodeNarrative": {
        "type": "object",
        "properties": {
          "why": {
            "type": "string"
          },
          "tune": {
            "type": "string"
          },
          "proof": {
            "type": "string"
          }
        }
      },
      "Brief_Persona": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "traits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "opening": {
            "type": "string"
          }
        }
      },
      "Brief_ProcedureSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string"
          }
        }
      },
      "Brief_Rehearsal": {
        "type": "object",
        "properties": {
          "personas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_Persona"
            }
          }
        }
      },
      "Brief_SecretSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "why": {
            "type": "string"
          },
          "obtainAt": {
            "type": "string"
          }
        }
      },
      "Brief_ToolAuth": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "secretRef": {
            "type": "string"
          }
        }
      },
      "Brief_ToolSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "specUrl": {
            "type": "string"
          },
          "auth": {
            "$ref": "#/components/schemas/Brief_ToolAuth"
          },
          "codeDescription": {
            "type": "string"
          }
        }
      },
      "Brief_Trigger": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "channelRef": {
            "type": "string"
          }
        }
      },
      "Brief_Trust": {
        "type": "object",
        "properties": {
          "rung": {
            "type": "string"
          },
          "irreversible": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "humanMustDecide": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Brief_WorkflowSpec": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Brief_Trigger"
            }
          },
          "sampleInput": {
            "type": "string"
          }
        }
      },
      "BrowserAutomationDtos_Capabilities": {
        "type": "object",
        "properties": {
          "profilesEnabled": {
            "type": "boolean",
            "default": false
          },
          "recipesEnabled": {
            "type": "boolean",
            "default": false
          },
          "totpEnabled": {
            "type": "boolean",
            "default": false
          },
          "browserAvailable": {
            "type": "boolean",
            "default": false
          },
          "browserUnavailableReason": {
            "type": "string"
          }
        },
        "required": [
          "profilesEnabled",
          "recipesEnabled",
          "totpEnabled",
          "browserAvailable"
        ]
      },
      "BrowserAutomationDtos_CreateProfileRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": "string"
          },
          "ttlDays": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BrowserAutomationDtos_CreateRecipeRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "spec": {
            "$ref": "#/components/schemas/BrowserRecipeSpec"
          }
        }
      },
      "BrowserAutomationDtos_ProfileView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "ownedByMe": {
            "type": "boolean",
            "default": false
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hasState": {
            "type": "boolean",
            "default": false
          },
          "stateBytes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "stateEntries": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ttlDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "expired": {
            "type": "boolean",
            "default": false
          },
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "attachedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "ownedByMe",
          "hasState",
          "stateBytes",
          "stateEntries",
          "ttlDays",
          "expired"
        ]
      },
      "BrowserAutomationDtos_RecipeDetail": {
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/BrowserAutomationDtos_RecipeSummary"
          },
          "spec": {
            "$ref": "#/components/schemas/BrowserRecipeSpec"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BrowserAutomationDtos_RecipeFromRunRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "allowLiteralText": {
            "type": "boolean"
          }
        }
      },
      "BrowserAutomationDtos_RecipeSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stepCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFailure": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "stepCount",
          "runCount",
          "failCount"
        ]
      },
      "BrowserAutomationDtos_UpdateProfileRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ttlDays": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BrowserAutomationDtos_UpdateRecipeRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "BrowserRecipeSpec": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "allowedDomains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "params": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrowserRecipeSpec_ParamSpec"
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrowserRecipeSpec_RecipeStep"
            }
          }
        },
        "required": [
          "version"
        ]
      },
      "BrowserRecipeSpec_Expect": {
        "type": "object",
        "properties": {
          "urlHost": {
            "type": "string"
          },
          "urlPathPrefix": {
            "type": "string"
          },
          "urlContains": {
            "type": "string"
          },
          "textContains": {
            "type": "string"
          },
          "selector": {
            "type": "string"
          }
        }
      },
      "BrowserRecipeSpec_ParamSpec": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "required"
        ]
      },
      "BrowserRecipeSpec_RecipeStep": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "selector": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "expect": {
            "$ref": "#/components/schemas/BrowserRecipeSpec_Expect"
          },
          "timeoutMs": {
            "type": "integer",
            "format": "int32"
          },
          "irreversible": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "irreversible"
        ]
      },
      "BrowserTakeoverDtos_Begin": {
        "type": "object",
        "properties": {
          "view": {
            "$ref": "#/components/schemas/BrowserTakeoverDtos_View"
          },
          "token": {
            "type": "string"
          },
          "tokenExpiresInSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "fps": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "maxDimension": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTypeChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "inputPerSecond": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "tokenExpiresInSeconds",
          "fps",
          "maxDimension",
          "maxTypeChars",
          "inputPerSecond"
        ]
      },
      "BrowserTakeoverDtos_InputEvent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "x": {
            "type": "integer",
            "format": "int32"
          },
          "y": {
            "type": "integer",
            "format": "int32"
          },
          "frameWidth": {
            "type": "integer",
            "format": "int32"
          },
          "frameHeight": {
            "type": "integer",
            "format": "int32"
          },
          "key": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "dx": {
            "type": "integer",
            "format": "int32"
          },
          "dy": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BrowserTakeoverDtos_SessionRef": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "BrowserTakeoverDtos_TokenRefresh": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "tokenExpiresInSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "tokenExpiresInSeconds"
        ]
      },
      "BrowserTakeoverDtos_View": {
        "type": "object",
        "properties": {
          "takeoverId": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "idleRemainingSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxRemainingSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "waitRemainingSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "idleRemainingSeconds",
          "maxRemainingSeconds",
          "waitRemainingSeconds"
        ]
      },
      "BudgetTopUpConfirmRequest": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string"
          },
          "paymentId": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        }
      },
      "BudgetTopUpConfirmResponse": {
        "type": "object",
        "properties": {
          "credited": {
            "type": "boolean",
            "default": false
          },
          "alreadyProcessed": {
            "type": "boolean",
            "default": false
          },
          "modality": {
            "type": "string"
          },
          "amountUsd": {
            "type": "number"
          },
          "budget": {
            "$ref": "#/components/schemas/PerUserBudgetService_BudgetStatus"
          }
        },
        "required": [
          "credited",
          "alreadyProcessed"
        ]
      },
      "BudgetTopUpOption": {
        "type": "object",
        "properties": {
          "usdAmount": {
            "type": "number"
          },
          "amountInSubunits": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "amountInSubunits"
        ]
      },
      "BudgetTopUpOptionsResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "currency": {
            "type": "string"
          },
          "minUsd": {
            "type": "number"
          },
          "maxUsd": {
            "type": "number"
          },
          "gatewayName": {
            "type": "string"
          },
          "publicKeyId": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BudgetTopUpOption"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "BudgetTopUpPurchaseRequest": {
        "type": "object",
        "properties": {
          "modality": {
            "type": "string"
          },
          "amountUsd": {
            "type": "number"
          }
        }
      },
      "BudgetTopUpPurchaseResponse": {
        "type": "object",
        "properties": {
          "gatewayName": {
            "type": "string"
          },
          "publicKeyId": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "amountInSubunits": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "modality": {
            "type": "string"
          },
          "amountUsd": {
            "type": "number"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "amountInSubunits"
        ]
      },
      "CapabilityAvailability": {
        "type": "string",
        "enum": [
          "AVAILABLE",
          "NEEDS_SETUP",
          "UNAVAILABLE"
        ]
      },
      "CapabilityController_CapabilityDescriptor": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapabilityController_ProviderDescriptor"
            }
          }
        }
      },
      "CapabilityController_ProviderDescriptor": {
        "type": "object",
        "properties": {
          "providerKey": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "credential": {
            "$ref": "#/components/schemas/ProviderCredentialResponse"
          }
        }
      },
      "CapabilityCredentialRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "provider": {
            "type": "string",
            "maxLength": 32
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "CapabilityPolicyResponse": {
        "type": "object",
        "properties": {
          "capability": {
            "type": "string"
          },
          "overrides": {
            "type": "object",
            "additionalProperties": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CatalogEntry": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "labelKey": {
            "type": "string"
          },
          "descriptionKey": {
            "type": "string"
          },
          "helpKey": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/SettingType"
          },
          "unit": {
            "$ref": "#/components/schemas/SettingUnit"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "step": {
            "type": "number"
          },
          "enumValues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "risk": {
            "$ref": "#/components/schemas/SettingRisk"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettingScope"
            }
          },
          "default": {},
          "minRole": {
            "$ref": "#/components/schemas/SettingRole"
          },
          "restartRequired": {
            "type": "boolean",
            "default": false
          },
          "docsAnchor": {
            "type": "string"
          },
          "strictness": {
            "type": "string"
          },
          "platformProperty": {
            "type": "string"
          }
        },
        "required": [
          "restartRequired"
        ]
      },
      "ChannelContactController_ContactRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "channel",
          "identifier"
        ]
      },
      "ChannelContactController_ContactResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "identifier": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "groupName": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "paired": {
            "type": "boolean",
            "default": false
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "paired"
        ]
      },
      "ChannelContactController_ContactUpdateRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelContactController_GroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name"
        ]
      },
      "ChannelContactController_GroupResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "memberCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "memberCount"
        ]
      },
      "ChannelContactController_ImportRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "channel"
        ]
      },
      "ChannelContactService_ImportResult": {
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "updated": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "created",
          "updated"
        ]
      },
      "ChannelHealthController_ChannelHealthResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "ok": {
            "type": "boolean",
            "default": false
          },
          "identity": {
            "type": "string"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "latencyMs"
        ]
      },
      "ChannelPairingController_EraseSubjectRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "externalId": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "externalId"
        ]
      },
      "ChannelPairingController_PendingPairingResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "externalIdMasked": {
            "type": "string"
          },
          "pairingCode": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChannelPairingController_RebindAgentRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "agentId"
        ]
      },
      "ChannelRoutingController_RoutingRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "autoApproveNewSenders": {
            "type": "boolean"
          },
          "inboundSafetyMode": {
            "type": "string"
          }
        },
        "required": [
          "autoApproveNewSenders"
        ]
      },
      "ChannelRoutingController_RoutingResponse": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "defaultAgentId": {
            "type": "string",
            "format": "uuid"
          },
          "defaultAgentName": {
            "type": "string"
          },
          "autoApproveNewSenders": {
            "type": "boolean",
            "default": false
          },
          "inboundSafetyMode": {
            "type": "string"
          },
          "declaredTask": {
            "type": "string"
          },
          "openEndedOverride": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "autoApproveNewSenders",
          "openEndedOverride"
        ]
      },
      "ChannelStatusService_ChannelStatusEntry": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "sessionCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "defaultAgentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "sessionCount"
        ]
      },
      "ChannelStatusService_ChannelStatusResponse": {
        "type": "object",
        "properties": {
          "liveCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelStatusService_ChannelStatusEntry"
            }
          },
          "recentInbound": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelStatusService_InboundLogEntry"
            }
          }
        },
        "required": [
          "liveCount",
          "totalCount"
        ]
      },
      "ChannelStatusService_InboundLogEntry": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "from": {
            "type": "string"
          },
          "agentName": {
            "type": "string"
          },
          "mapped": {
            "type": "boolean",
            "default": false
          },
          "sessionRef": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "pairingCode": {
            "type": "string"
          },
          "lastMessagePreview": {
            "type": "string"
          }
        },
        "required": [
          "mapped"
        ]
      },
      "ChannelType": {
        "type": "string",
        "enum": [
          "WHATSAPP",
          "MESSENGER",
          "INSTAGRAM",
          "SLACK",
          "DISCORD",
          "X",
          "TELEGRAM",
          "EMAIL",
          "TEAMS",
          "VOICE",
          "SMS",
          "SIGNAL",
          "MATRIX",
          "IMESSAGE",
          "WHATSAPP_QR"
        ]
      },
      "ChatAttachmentCategory": {
        "type": "string",
        "enum": [
          "IMAGE",
          "AUDIO",
          "VIDEO",
          "DOCUMENT",
          "SPREADSHEET"
        ]
      },
      "ChatAttachmentResponse": {
        "type": "object",
        "properties": {
          "attachmentKey": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/ChatAttachmentCategory"
          },
          "mimeType": {
            "type": "string"
          },
          "originalFilename": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "sizeBytes"
        ]
      },
      "ChatBranchDtos_ActivePathResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "activeLeafId": {
            "type": "string",
            "format": "uuid"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatBranchDtos_MessageView"
            }
          }
        }
      },
      "ChatBranchDtos_Capabilities": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ChatBranchDtos_EditRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "turnRef": {
            "type": "string"
          },
          "stepEvents": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "message",
          "stepEvents"
        ]
      },
      "ChatBranchDtos_MessageView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "siblingIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "siblingCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "siblingIndex",
          "siblingCount",
          "error"
        ]
      },
      "ChatBranchDtos_RegenerateRequest": {
        "type": "object",
        "properties": {
          "turnRef": {
            "type": "string"
          },
          "stepEvents": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "stepEvents"
        ]
      },
      "ChatBranchDtos_SiblingsResponse": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "index": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "count": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "index",
          "count"
        ]
      },
      "ChatBranchDtos_SwitchLeafRequest": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "messageId"
        ]
      },
      "ChatBranchDtos_ThreadView": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChatBranchDtos_ThreadsResponse": {
        "type": "object",
        "properties": {
          "threads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatBranchDtos_ThreadView"
            }
          },
          "nextBefore": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChatGenerationSettingsResponse": {
        "type": "object",
        "properties": {
          "geminiReasoningEffort": {
            "type": "string"
          },
          "historyMaxTurns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "historyMaxChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "historyMaxTurns",
          "historyMaxChars"
        ]
      },
      "ChatGenerationSettingsUpdateRequest": {
        "type": "object",
        "properties": {
          "geminiReasoningEffort": {
            "type": "string"
          },
          "historyMaxTurns": {
            "type": "integer",
            "format": "int32"
          },
          "historyMaxChars": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ChatInlineAttachment": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "dataBase64": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "ChatPortDtos_Capacity": {
        "type": "object",
        "properties": {
          "storedChats": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxStoredChats": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxPerImport": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "storedChats",
          "maxStoredChats",
          "maxPerImport"
        ]
      },
      "ChatPortDtos_Features": {
        "type": "object",
        "properties": {
          "importEnabled": {
            "type": "boolean",
            "default": false
          },
          "exportEnabled": {
            "type": "boolean",
            "default": false
          },
          "maxBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxImportConversations": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "importEnabled",
          "exportEnabled",
          "maxBytes",
          "maxImportConversations"
        ]
      },
      "ChatPortDtos_ImportResponse": {
        "type": "object",
        "properties": {
          "imported": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "chats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatPortDtos_ImportedRef"
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatPortDtos_SkippedChat"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "imported"
        ]
      },
      "ChatPortDtos_ImportedChatView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "importedAt": {
            "type": "string",
            "format": "date-time"
          },
          "messageCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatPortDtos_ImportedMessage"
            }
          }
        },
        "required": [
          "messageCount",
          "truncated"
        ]
      },
      "ChatPortDtos_ImportedMessage": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChatPortDtos_ImportedRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sourceKey": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "messageCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "messageCount"
        ]
      },
      "ChatPortDtos_ImportedSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "importedAt": {
            "type": "string",
            "format": "date-time"
          },
          "messageCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "messageCount",
          "truncated"
        ]
      },
      "ChatPortDtos_JsonUpload": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChatPortDtos_MemoryCandidatesRequest": {
        "type": "object",
        "properties": {
          "chatIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ChatPortDtos_PreviewConversation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "messageCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "snippet": {
            "type": "string"
          },
          "alreadyImported": {
            "type": "boolean",
            "default": false
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "messageCount",
          "alreadyImported",
          "truncated"
        ]
      },
      "ChatPortDtos_PreviewResponse": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "conversations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatPortDtos_PreviewConversation"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/ChatPortDtos_PreviewStats"
          },
          "capacity": {
            "$ref": "#/components/schemas/ChatPortDtos_Capacity"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChatPortDtos_PreviewStats": {
        "type": "object",
        "properties": {
          "found": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "listed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "scanCapReached": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "found",
          "listed",
          "skipped",
          "scanCapReached"
        ]
      },
      "ChatPortDtos_SkippedChat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ChatRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "attachmentKey": {
            "type": "string"
          },
          "attachmentMimeType": {
            "type": "string"
          },
          "turnRef": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatInlineAttachment"
            }
          },
          "visionSessionId": {
            "type": "string"
          },
          "forceFastDepth": {
            "type": "boolean",
            "default": false
          },
          "stepEvents": {
            "type": "boolean",
            "default": false
          },
          "toolNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 200
          }
        },
        "required": [
          "message",
          "forceFastDepth",
          "stepEvents"
        ]
      },
      "ChatTranscriptService_Transcript": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TranscriptView_Entry"
            }
          }
        }
      },
      "CheckoutMode": {
        "type": "string",
        "enum": [
          "WIDGET",
          "REDIRECT"
        ]
      },
      "CheckoutSessionController_CheckoutSessionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amountPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "paymentProvider": {
            "type": "string"
          },
          "gatewayRefId": {
            "type": "string"
          },
          "shortUrl": {
            "type": "string"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time"
          },
          "paymentId": {
            "type": "string"
          },
          "reviewNote": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amountPaise"
        ]
      },
      "ClaimRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "deviceName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "platform": {
            "$ref": "#/components/schemas/DevicePlatform"
          }
        },
        "required": [
          "code",
          "deviceName",
          "platform"
        ]
      },
      "ClaimResponse": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string",
            "format": "uuid"
          },
          "deviceToken": {
            "type": "string"
          }
        }
      },
      "CodeToolGenerationRequest": {
        "type": "object",
        "properties": {
          "requirement": {
            "type": "string",
            "minLength": 1
          },
          "template": {
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/CustomCodeToolLanguage"
          },
          "toolName": {
            "type": "string"
          }
        },
        "required": [
          "requirement",
          "language"
        ]
      },
      "CodeToolGenerationResponse": {
        "type": "object",
        "properties": {
          "sourceCode": {
            "type": "string"
          },
          "valid": {
            "type": "boolean",
            "default": false
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxValidateResponse_SandboxValidationError"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceSha256": {
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/CustomCodeToolLanguage"
          }
        },
        "required": [
          "valid"
        ]
      },
      "CodeToolValidateRequest": {
        "type": "object",
        "properties": {
          "language": {
            "$ref": "#/components/schemas/CustomCodeToolLanguage"
          },
          "toolName": {
            "type": "string"
          },
          "sourceCode": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "language",
          "sourceCode"
        ]
      },
      "CodingTaskDtos_ApproveRequest": {
        "type": "object",
        "properties": {
          "diffHash": {
            "type": "string"
          }
        }
      },
      "CodingTaskDtos_Budget": {
        "type": "object",
        "properties": {
          "maxSteps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxWallSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxFixIterations": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxSteps",
          "maxWallSeconds",
          "maxTokens",
          "maxFixIterations"
        ]
      },
      "CodingTaskDtos_CancelResponse": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "accepted": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "accepted"
        ]
      },
      "CodingTaskDtos_Capabilities": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "allowed": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "runner": {
            "type": "string"
          },
          "testRunners": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "defaults": {
            "$ref": "#/components/schemas/CodingTaskDtos_Budget"
          },
          "caps": {
            "$ref": "#/components/schemas/CodingTaskDtos_Budget"
          },
          "maxArchiveBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "approvalTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rollbackWindowSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "networkEnabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "allowed",
          "maxArchiveBytes",
          "approvalTimeoutSeconds",
          "rollbackWindowSeconds",
          "networkEnabled"
        ]
      },
      "CodingTaskDtos_DiffResponse": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "diff": {
            "type": "string"
          },
          "diffHash": {
            "type": "string"
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "truncated"
        ]
      },
      "CodingTaskDtos_Event": {
        "type": "object",
        "properties": {
          "atMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "type": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "atMs"
        ]
      },
      "CodingTaskDtos_Review": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "approved"
        ]
      },
      "CodingTaskDtos_TaskView": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "phase": {
            "type": "string"
          },
          "instruction": {
            "type": "string"
          },
          "testCommand": {
            "type": "string"
          },
          "sourceKind": {
            "type": "string"
          },
          "repoUrl": {
            "type": "string"
          },
          "runner": {
            "type": "string"
          },
          "budget": {
            "$ref": "#/components/schemas/CodingTaskDtos_Budget"
          },
          "usage": {
            "$ref": "#/components/schemas/CodingTaskDtos_Usage"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodingTaskDtos_Event"
            }
          },
          "tests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodingTaskDtos_TestRun"
            }
          },
          "review": {
            "$ref": "#/components/schemas/CodingTaskDtos_Review"
          },
          "diffAvailable": {
            "type": "boolean",
            "default": false
          },
          "diffHash": {
            "type": "string"
          },
          "diffFiles": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "testFilesTouched": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          },
          "createdAtMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "updatedAtMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "diffAvailable",
          "diffFiles",
          "testFilesTouched",
          "cancelRequested",
          "createdAtMs",
          "updatedAtMs"
        ]
      },
      "CodingTaskDtos_TestRun": {
        "type": "object",
        "properties": {
          "iteration": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "exitCode": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "outputTail": {
            "type": "string"
          }
        },
        "required": [
          "iteration",
          "exitCode"
        ]
      },
      "CodingTaskDtos_Usage": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "elapsedMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "steps",
          "tokens",
          "elapsedMs"
        ]
      },
      "CommandResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "commandType": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DeviceCommandStatus"
          },
          "result": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CommandResultRequest": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/DeviceCommandStatus"
          },
          "result": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "CommerceDtos_CreateCartRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "minItems": 1
          },
          "payee": {
            "type": "string",
            "maxLength": 256
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "items"
        ]
      },
      "CommerceDtos_CreateIntentRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "intentText": {
            "type": "string",
            "maxLength": 2000
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 50
          },
          "maxTotalMinor": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "agentId",
          "maxTotalMinor",
          "currency",
          "expiresAt"
        ]
      },
      "CommerceDtos_EventResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "eventType": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CommerceDtos_MandateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "intentMandateId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "buyerUserId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "maxTotalMinor": {
            "type": "integer",
            "format": "int64"
          },
          "cartTotalMinor": {
            "type": "integer",
            "format": "int64"
          },
          "items": {},
          "payee": {
            "type": "string"
          },
          "categories": {},
          "intentText": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "canonicalHashSha256": {
            "type": "string"
          },
          "keyId": {
            "type": "string"
          },
          "signatureValid": {
            "type": "boolean",
            "default": false
          },
          "buyerAuthJson": {
            "type": "string"
          },
          "authorizedAt": {
            "type": "string",
            "format": "date-time"
          },
          "walletDebitRef": {
            "type": "integer",
            "format": "int64"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokeReason": {
            "type": "string"
          }
        },
        "required": [
          "signatureValid"
        ]
      },
      "CommerceDtos_RevokeRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 512
          }
        }
      },
      "CommerceProduct_ProductAvailability": {
        "type": "string",
        "enum": [
          "IN_STOCK",
          "OUT_OF_STOCK",
          "PREORDER"
        ]
      },
      "CompGrantResponse": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "compGrantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "compExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ComparisonVerdict": {
        "type": "string",
        "enum": [
          "VARIANT_BETTER",
          "BASELINE_BETTER",
          "CANNOT_TELL",
          "INSIDE_NOISE_FLOOR",
          "INSUFFICIENT_DATA"
        ]
      },
      "ConnectorResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "lastSyncedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastError": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ConsentLedger_Decision": {
        "type": "string",
        "enum": [
          "PROMPTED",
          "GRANTED",
          "DECLINED",
          "WITHDRAWN"
        ]
      },
      "ConsentLedger_Entry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string"
          },
          "noticeVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "noticeLanguage": {
            "type": "string"
          },
          "noticeSha256": {
            "type": "string"
          },
          "decision": {
            "$ref": "#/components/schemas/ConsentLedger_Decision"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "noticeVersion"
        ]
      },
      "ConsentPolicyService_Policy": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "purpose": {
            "type": "string"
          },
          "noticeVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "defaultLanguage": {
            "type": "string"
          },
          "notices": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "instructions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "keywords": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "eraseOnWithdrawal": {
            "type": "boolean",
            "default": false
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "noticeVersion",
          "eraseOnWithdrawal"
        ]
      },
      "ConsentPolicyService_Request": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "purpose": {
            "type": "string"
          },
          "defaultLanguage": {
            "type": "string"
          },
          "notices": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "instructions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "keywords": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "eraseOnWithdrawal": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ContactPrivacyService_ErasureReport": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "subjectMasked": {
            "type": "string"
          },
          "erasedAt": {
            "type": "string",
            "format": "date-time"
          },
          "complete": {
            "type": "boolean",
            "default": false
          },
          "erased": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "failures": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "consentProofKept": {
            "type": "boolean",
            "default": false
          },
          "notReached": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "complete",
          "consentProofKept"
        ]
      },
      "ContactPrivacyService_ExportReport": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "subjectMasked": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "notIncluded": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateIssueTicketRequest": {
        "type": "object",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/IssueCategory"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "CreateSandboxRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "minLength": 1
          },
          "timeoutSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "envVars": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "templateId"
        ]
      },
      "CreateUserRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 3,
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "format": "email",
            "maxLength": 254
          },
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "temporaryPassword": {
            "type": "string",
            "minLength": 12,
            "maxLength": 128
          },
          "inviteByEmail": {
            "type": "boolean"
          },
          "initialRoles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "initialPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "username",
          "email",
          "firstName",
          "lastName"
        ]
      },
      "CustomCodeToolLanguage": {
        "type": "string",
        "enum": [
          "JAVA",
          "PYTHON",
          "JAVASCRIPT",
          "TYPESCRIPT"
        ]
      },
      "CustomCodeToolRequest": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/CustomCodeToolLanguage"
          },
          "sourceCode": {
            "type": "string",
            "minLength": 1
          },
          "inputSchemaJson": {
            "type": "string"
          },
          "outputDescription": {
            "type": "string"
          },
          "timeoutMs": {
            "type": "integer",
            "format": "int32",
            "exclusiveMinimum": 0
          },
          "memoryMb": {
            "type": "integer",
            "format": "int32",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "displayName",
          "language",
          "sourceCode"
        ]
      },
      "CustomCodeToolResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "toolName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/CustomCodeToolLanguage"
          },
          "sourceCode": {
            "type": "string"
          },
          "inputSchemaJson": {
            "type": "string"
          },
          "outputDescription": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "status": {
            "$ref": "#/components/schemas/CustomCodeToolStatus"
          },
          "validationError": {
            "type": "string"
          },
          "sourceSha256": {
            "type": "string"
          },
          "timeoutMs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "memoryMb": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "allowedSecretNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "timeoutMs",
          "memoryMb",
          "version"
        ]
      },
      "CustomCodeToolSecretsRequest": {
        "type": "object",
        "properties": {
          "allowedSecretNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "maxItems": 32
          }
        },
        "required": [
          "allowedSecretNames"
        ]
      },
      "CustomCodeToolStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "VALIDATED",
          "REJECTED"
        ]
      },
      "CustomCodeToolTestRequest": {
        "type": "object",
        "properties": {
          "input": {}
        }
      },
      "DataResidencyRegion": {
        "type": "string",
        "enum": [
          "UNSPECIFIED",
          "INDIA",
          "EU",
          "US",
          "OTHER"
        ]
      },
      "DataTableDtos_AddColumnRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "DataTableDtos_AlterColumnRequest": {
        "type": "object",
        "properties": {
          "newName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "DataTableDtos_BulkRowsRequest": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "DataTableDtos_ColumnSpec": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "DataTableDtos_ColumnView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "DataTableDtos_Config": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "planLocked": {
            "type": "boolean",
            "default": false
          },
          "maxTables": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxRowsPerTable": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxColumns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxCellBytes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxBulkInsert": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxImportBytes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxImportRows": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "enabled",
          "planLocked",
          "maxTables",
          "maxRowsPerTable",
          "maxColumns",
          "maxCellBytes",
          "maxBulkInsert",
          "maxImportBytes",
          "maxImportRows"
        ]
      },
      "DataTableDtos_CreateTableRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataTableDtos_ColumnSpec"
            }
          }
        }
      },
      "DataTableDtos_ImportResult": {
        "type": "object",
        "properties": {
          "inserted": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ignoredHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "table": {
            "$ref": "#/components/schemas/DataTableDtos_TableView"
          }
        },
        "required": [
          "inserted",
          "skipped"
        ]
      },
      "DataTableDtos_RowPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataTableDtos_RowView"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "total",
          "limit",
          "offset"
        ]
      },
      "DataTableDtos_RowRequest": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "DataTableDtos_RowView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DataTableDtos_TableView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataTableDtos_ColumnView"
            }
          },
          "rowCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "rowCount"
        ]
      },
      "DataTableDtos_UpdateTableRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "DecisionModel_KeySource": {
        "type": "string",
        "enum": [
          "TENANT",
          "PLATFORM",
          "ENV"
        ]
      },
      "DecisionPlaygroundRequest": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "questions": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "DecisionStatusResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "providerKey": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/DecisionModel_KeySource"
          },
          "tenantCredential": {
            "$ref": "#/components/schemas/ProviderCredentialResponse"
          }
        },
        "required": [
          "enabled",
          "configured"
        ]
      },
      "DelegationDtos_CreateGrantRequest": {
        "type": "object",
        "properties": {
          "audience": {
            "type": "string",
            "minLength": 1
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "maxTokenTtlSeconds": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "walletId": {
            "type": "string",
            "format": "uuid"
          },
          "spendCapMinor": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "audience",
          "scopes",
          "expiresAt"
        ]
      },
      "DelegationDtos_GrantResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "grantedBy": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxTokenTtlSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "walletId": {
            "type": "string",
            "format": "uuid"
          },
          "spendCapMinor": {
            "type": "integer",
            "format": "int64"
          },
          "spentMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokeReason": {
            "type": "string"
          }
        },
        "required": [
          "maxTokenTtlSeconds",
          "spentMinor"
        ]
      },
      "DelegationDtos_IntrospectRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "token"
        ]
      },
      "DelegationDtos_MintTokenRequest": {
        "type": "object",
        "properties": {
          "ttlSeconds": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0
          }
        }
      },
      "DelegationDtos_MintedTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "jti": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "grantId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DelegationDtos_RevokeRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "DemoChatController_DemoChatRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "sessionId": {
            "type": "string"
          },
          "businessName": {
            "type": "string",
            "maxLength": 60
          }
        },
        "required": [
          "message"
        ]
      },
      "DemoChatController_DemoChatResponse": {
        "type": "object",
        "properties": {
          "reply": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "simulated": {
            "type": "boolean",
            "default": false
          },
          "messagesUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "messageLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "daysRemaining": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "expired": {
            "type": "boolean",
            "default": false
          },
          "readOnly": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "simulated",
          "messagesUsed",
          "messageLimit",
          "daysRemaining",
          "expired",
          "readOnly"
        ]
      },
      "DemoDailyPoint": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "format": "date"
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "converted": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "created",
          "converted"
        ]
      },
      "DemoEngagementMetrics": {
        "type": "object",
        "properties": {
          "totalMessages": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "averageMessagesPerSandbox": {
            "type": "number",
            "format": "double"
          },
          "engagedSandboxes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "bouncedSandboxes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "engagementRate": {
            "type": "number",
            "format": "double"
          },
          "imagesGenerated": {
            "type": "integer",
            "format": "int64"
          },
          "sandboxesWithImages": {
            "type": "integer",
            "format": "int64"
          },
          "imageMetricsUnavailableReason": {
            "type": "string"
          },
          "channelLinks": {
            "type": "integer",
            "format": "int64"
          },
          "linkedChannelLinks": {
            "type": "integer",
            "format": "int64"
          },
          "sandboxesWithChannelLink": {
            "type": "integer",
            "format": "int64"
          },
          "channelMetricsUnavailableReason": {
            "type": "string"
          }
        },
        "required": [
          "totalMessages",
          "engagedSandboxes",
          "bouncedSandboxes"
        ]
      },
      "DemoImageController_DemoImageRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "DemoImageController_DemoImageResponse": {
        "type": "object",
        "properties": {
          "imageUrl": {
            "type": "string"
          },
          "imagesUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "imageLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "simulated": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "imagesUsed",
          "imageLimit",
          "simulated"
        ]
      },
      "DemoMagicController_MagicPlanRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 2000
          },
          "link": {
            "type": "string",
            "maxLength": 2048
          }
        }
      },
      "DemoMagicController_MagicRunRequest": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "DemoMetricsResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "today": {
            "$ref": "#/components/schemas/DemoMetricsWindow"
          },
          "last7Days": {
            "$ref": "#/components/schemas/DemoMetricsWindow"
          },
          "last30Days": {
            "$ref": "#/components/schemas/DemoMetricsWindow"
          },
          "allTime": {
            "$ref": "#/components/schemas/DemoMetricsWindow"
          },
          "liveCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "expiredCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "engagement": {
            "$ref": "#/components/schemas/DemoEngagementMetrics"
          },
          "dailySeries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoDailyPoint"
            }
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoRecentSandbox"
            }
          },
          "sharesCreated": {
            "type": "integer",
            "format": "int64"
          },
          "shareViews": {
            "type": "integer",
            "format": "int64"
          },
          "shareViewers": {
            "type": "integer",
            "format": "int64"
          },
          "labStarted": {
            "type": "integer",
            "format": "int64"
          },
          "labCompleted": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "available",
          "liveCount",
          "expiredCount"
        ]
      },
      "DemoMetricsWindow": {
        "type": "object",
        "properties": {
          "window": {
            "type": "string"
          },
          "created": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "converted": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "conversionRate": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "created",
          "converted"
        ]
      },
      "DemoMusicController_DemoMusicRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "DemoMusicController_DemoMusicResponse": {
        "type": "object",
        "properties": {
          "musicUrl": {
            "type": "string"
          },
          "musicUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "musicLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "simulated": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "lowCostModel": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "musicUsed",
          "musicLimit",
          "durationSeconds",
          "simulated",
          "lowCostModel"
        ]
      },
      "DemoMusicController_DemoMusicStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "musicUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "musicLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "clipSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "enabled",
          "musicUsed",
          "musicLimit",
          "clipSeconds"
        ]
      },
      "DemoRecentSandbox": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "tenantSchema": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time"
          },
          "convertedTenantId": {
            "type": "string",
            "format": "uuid"
          },
          "convertedAt": {
            "type": "string",
            "format": "date-time"
          },
          "messageCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "messageCount"
        ]
      },
      "DemoSandboxReclaimController_ReclaimRequest": {
        "type": "object",
        "properties": {
          "tenantIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "confirm": {
            "type": "string"
          }
        }
      },
      "DemoSandboxReclaimService_ReclaimFailure": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "DemoSandboxReclaimService_ReclaimResult": {
        "type": "object",
        "properties": {
          "erased": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoSandboxReclaimService_ReclaimFailure"
            }
          },
          "remaining": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "remaining"
        ]
      },
      "DemoSandboxReclaimService_ReclaimableSandbox": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "schemaName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSessionAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DemoSandboxReclaimService_SandboxListing": {
        "type": "object",
        "properties": {
          "shared": {
            "$ref": "#/components/schemas/DemoSandboxReclaimService_SharedSandbox"
          },
          "reclaimable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoSandboxReclaimService_ReclaimableSandbox"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "total"
        ]
      },
      "DemoSandboxReclaimService_SharedSandbox": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "schemaName": {
            "type": "string"
          }
        }
      },
      "DemoSessionCreateRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          },
          "businessName": {
            "type": "string",
            "maxLength": 60
          },
          "persona": {
            "type": "string",
            "maxLength": 32
          },
          "blank": {
            "type": "boolean"
          }
        }
      },
      "DemoSettingsResponse": {
        "type": "object",
        "properties": {
          "effective": {
            "$ref": "#/components/schemas/DemoSettingsValues"
          },
          "defaults": {
            "$ref": "#/components/schemas/DemoSettingsValues"
          },
          "settingKeys": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DemoSettingsUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "maxLiveSessionsPerIp": {
            "type": "integer",
            "format": "int32"
          },
          "cooldownMinutes": {
            "type": "integer",
            "format": "int32"
          },
          "maxSessionsPerCooldown": {
            "type": "integer",
            "format": "int32"
          },
          "ttlDays": {
            "type": "integer",
            "format": "int32"
          },
          "messageLimit": {
            "type": "integer",
            "format": "int32"
          },
          "reminderHoursBeforeExpiry": {
            "type": "integer",
            "format": "int32"
          },
          "imageEnabled": {
            "type": "boolean"
          },
          "imagePerSessionLimit": {
            "type": "integer",
            "format": "int32"
          },
          "telegramEnabled": {
            "type": "boolean"
          },
          "magicEnabled": {
            "type": "boolean"
          },
          "magicRunCap": {
            "type": "integer",
            "format": "int32"
          },
          "magicPerIpRuns": {
            "type": "integer",
            "format": "int32"
          },
          "magicPerSessionLimit": {
            "type": "integer",
            "format": "int32"
          },
          "inactivityTimeoutHours": {
            "type": "integer",
            "format": "int32"
          },
          "editableHours": {
            "type": "integer",
            "format": "int32"
          },
          "exemptIps": {
            "type": "string"
          }
        }
      },
      "DemoSettingsValues": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "maxLiveSessionsPerIp": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cooldownMinutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxSessionsPerCooldown": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ttlDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "messageLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "reminderHoursBeforeExpiry": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "imageEnabled": {
            "type": "boolean",
            "default": false
          },
          "imagePerSessionLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "telegramEnabled": {
            "type": "boolean",
            "default": false
          },
          "magicEnabled": {
            "type": "boolean",
            "default": false
          },
          "magicRunCap": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "magicPerIpRuns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "magicPerSessionLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "inactivityTimeoutHours": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "editableHours": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "exemptIps": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "maxLiveSessionsPerIp",
          "cooldownMinutes",
          "maxSessionsPerCooldown",
          "ttlDays",
          "messageLimit",
          "reminderHoursBeforeExpiry",
          "imageEnabled",
          "imagePerSessionLimit",
          "telegramEnabled",
          "magicEnabled",
          "magicRunCap",
          "magicPerIpRuns",
          "magicPerSessionLimit",
          "inactivityTimeoutHours",
          "editableHours"
        ]
      },
      "DemoShareController_ShareChatRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "DemoShareController_ShareReportRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "DemoShareOwnerController_DemoEventRequest": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "maxLength": 40
          }
        }
      },
      "DemoStudioConnectorService_ConnectorView": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DemoStudioConnectorService_RegistryHit": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "host": {
            "type": "string"
          }
        }
      },
      "DemoStudioConnectorService_RegistryPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoStudioConnectorService_RegistryHit"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "unavailable": {
            "type": "boolean",
            "default": false
          },
          "canConnect": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "unavailable",
          "canConnect"
        ]
      },
      "DemoStudioController_AgentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "mission": {
            "type": "string",
            "maxLength": 6000
          },
          "reasoningDepth": {
            "type": "string"
          },
          "autonomy": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "guardrails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DemoStudioController_ConnectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "name"
        ]
      },
      "DemoStudioController_DecisionRequest": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "approved"
        ]
      },
      "DemoStudioController_MissionRequest": {
        "type": "object",
        "properties": {
          "mission": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "sessionId": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "mission"
        ]
      },
      "DemoStudioController_RunRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "DemoStudioController_RunView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "trace": {},
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DemoStudioController_StudioStatus": {
        "type": "object",
        "properties": {
          "messagesUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "messageLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "readOnly": {
            "type": "boolean",
            "default": false
          },
          "expired": {
            "type": "boolean",
            "default": false
          },
          "agentsMax": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "workflowsMax": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "unlimited": {
            "type": "boolean",
            "default": false
          },
          "clientIp": {
            "type": "string"
          },
          "missionTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "workflowTimeoutMinutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "fairUse": {
            "$ref": "#/components/schemas/DemoStudioFairUse_FairUseView"
          }
        },
        "required": [
          "messagesUsed",
          "messageLimit",
          "readOnly",
          "expired",
          "agentsMax",
          "workflowsMax",
          "unlimited",
          "missionTimeoutSeconds",
          "workflowTimeoutMinutes"
        ]
      },
      "DemoStudioController_TextDocumentRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 120
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200000
          }
        },
        "required": [
          "text"
        ]
      },
      "DemoStudioController_WorkflowRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "definition": {
            "$ref": "#/components/schemas/DemoStudioWorkflowRunner_Definition"
          }
        },
        "required": [
          "name"
        ]
      },
      "DemoStudioController_WorkflowView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/DemoStudioWorkflowRunner_Definition"
          },
          "mine": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "mine"
        ]
      },
      "DemoStudioDocumentService_DocumentLimits": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "maxDocs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "extensions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "available",
          "maxDocs",
          "maxBytes"
        ]
      },
      "DemoStudioDocumentService_DocumentView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "status": {
            "type": "string"
          },
          "chunks": {
            "type": "integer",
            "format": "int32"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "sizeBytes"
        ]
      },
      "DemoStudioFairUse_FairUseView": {
        "type": "object",
        "properties": {
          "missionsPerMinute": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxConcurrentRuns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ipDailyCeiling": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "usedToday": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "usedLastMinute": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "coolingSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "strikesLeft": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "missionsPerMinute",
          "maxConcurrentRuns",
          "ipDailyCeiling",
          "usedToday",
          "usedLastMinute",
          "coolingSeconds",
          "strikesLeft"
        ]
      },
      "DemoStudioService_AgentView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "mission": {
            "type": "string"
          },
          "reasoningDepth": {
            "type": "string"
          },
          "autonomy": {
            "type": "string"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "toolsOff": {
            "type": "boolean",
            "default": false
          },
          "guardrails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "temperature": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "mine": {
            "type": "boolean",
            "default": false
          },
          "live": {
            "type": "boolean",
            "default": false
          },
          "createdBySession": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "toolsOff",
          "temperature",
          "maxTokens",
          "mine",
          "live"
        ]
      },
      "DemoStudioService_GuardrailOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "available": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "available"
        ]
      },
      "DemoStudioService_Palette": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoStudioService_ToolAvailability"
            }
          },
          "guardrails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoStudioService_GuardrailOption"
            }
          },
          "reasoningDepths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "autonomyTiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lockedAutonomyTiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxAgentsPerSession": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "documents": {
            "$ref": "#/components/schemas/DemoStudioDocumentService_DocumentLimits"
          },
          "connectorsEnabled": {
            "type": "boolean",
            "default": false
          },
          "enforcedGuardrails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "missionTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxAgentsPerSession",
          "connectorsEnabled",
          "missionTimeoutSeconds"
        ]
      },
      "DemoStudioService_ToolAvailability": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "available": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "available"
        ]
      },
      "DemoStudioWorkflowRunner_Definition": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DemoStudioWorkflowRunner_Step"
            }
          }
        }
      },
      "DemoStudioWorkflowRunner_Step": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "DemoTranscriptEmailRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 1,
            "format": "email",
            "maxLength": 320
          },
          "sessionId": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "email"
        ]
      },
      "DemoVideoController_DemoVideoRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "DemoVideoController_DemoVideoResponse": {
        "type": "object",
        "properties": {
          "videoUrl": {
            "type": "string"
          },
          "videosUsed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "videoLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "simulated": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "videosUsed",
          "videoLimit",
          "durationSeconds",
          "simulated"
        ]
      },
      "DependencyStatus": {
        "type": "string",
        "enum": [
          "UP",
          "DEGRADED",
          "DOWN",
          "UNKNOWN"
        ]
      },
      "DeveloperApiController_AgentSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DeveloperApiController_ChatRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "sessionId": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "message"
        ]
      },
      "DeveloperApiController_RunRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          }
        }
      },
      "DeveloperApiController_WorkflowSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DeviceAppUsageEventType": {
        "type": "string",
        "enum": [
          "FOREGROUND",
          "BACKGROUND"
        ]
      },
      "DeviceCommandStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "DELIVERED",
          "COMPLETED",
          "FAILED"
        ]
      },
      "DevicePlatform": {
        "type": "string",
        "enum": [
          "ANDROID",
          "IOS",
          "DESKTOP",
          "WEB"
        ]
      },
      "DeviceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deviceName": {
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/DevicePlatform"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "revoked": {
            "type": "boolean",
            "default": false
          },
          "capabilities": {
            "type": "string"
          }
        },
        "required": [
          "revoked"
        ]
      },
      "DeviceSmsDirection": {
        "type": "string",
        "enum": [
          "INBOUND",
          "OUTBOUND"
        ]
      },
      "DiagramFormat": {
        "type": "string",
        "enum": [
          "MERMAID",
          "PLANTUML"
        ]
      },
      "DiscordActivationRequest": {
        "type": "object",
        "properties": {
          "botToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "botToken"
        ]
      },
      "DiscordCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "applicationId": {
            "type": "string"
          },
          "botUsername": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DiscordCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DiscordCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "DiscordInboundMessage": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "messageId": {
            "type": "string"
          }
        }
      },
      "DiscordSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "DiscordSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "DocumentContent": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentContent_Section"
            }
          },
          "table": {
            "$ref": "#/components/schemas/DocumentContent_Table"
          },
          "rawText": {
            "type": "string"
          },
          "json": {}
        }
      },
      "DocumentContent_Section": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string"
          },
          "paragraphs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bulletPoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "imageUrl": {
            "type": "string"
          }
        }
      },
      "DocumentContent_Table": {
        "type": "object",
        "properties": {
          "headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "DocumentGenerationJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DocumentGenerationStatus"
          },
          "type": {
            "$ref": "#/components/schemas/DocumentType"
          },
          "filename": {
            "type": "string"
          },
          "downloadUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      },
      "DocumentGenerationRequest": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DocumentType"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content": {
            "$ref": "#/components/schemas/DocumentContent"
          }
        },
        "required": [
          "type",
          "filename",
          "content"
        ]
      },
      "DocumentGenerationStatus": {
        "type": "string",
        "enum": [
          "REQUESTED",
          "PROCESSING",
          "COMPLETE",
          "FAILED"
        ]
      },
      "DocumentType": {
        "type": "string",
        "enum": [
          "DOCX",
          "PDF",
          "XLSX",
          "PPTX",
          "CSV",
          "TXT",
          "MD",
          "JSON"
        ]
      },
      "E2bCodeExecutionTemplateRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          }
        }
      },
      "E2bCredentialActivationRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "E2bCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/E2bCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "codeExecutionTemplateId": {
            "type": "string"
          }
        }
      },
      "E2bCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ]
      },
      "EdgeAgentPolicyLookup_EdgeAgentPolicyView": {
        "type": "object",
        "properties": {
          "edgeRoutingPolicy": {
            "type": "string"
          },
          "guardrailsEnabled": {
            "type": "boolean",
            "default": false
          },
          "guardrailsPatternRepresentable": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "guardrailsEnabled",
          "guardrailsPatternRepresentable"
        ]
      },
      "EdgeAgentsConfigController_EdgeConfigResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "agent": {
            "$ref": "#/components/schemas/EdgeAgentPolicyLookup_EdgeAgentPolicyView"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "EdgeAgentsConfigController_EdgeManifestEditorResponse": {
        "type": "object",
        "properties": {
          "effective": {
            "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelManifest"
          },
          "defaults": {
            "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelManifest"
          },
          "storedOverridePresent": {
            "type": "boolean",
            "default": false
          },
          "fixedUtilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelEntry"
            }
          }
        },
        "required": [
          "storedOverridePresent"
        ]
      },
      "EdgeAgentsConfigController_EdgeModelEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tier": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "displayName": {
            "type": "string"
          },
          "detailName": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "url": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "minDeviceMemoryGB": {
            "type": "number",
            "format": "double"
          },
          "requiresWebGpu": {
            "type": "boolean",
            "default": false
          },
          "kind": {
            "type": "string"
          },
          "speedTier": {
            "type": "string"
          },
          "contextWindowSize": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "tier",
          "sizeBytes",
          "requiresWebGpu"
        ]
      },
      "EdgeAgentsConfigController_EdgeModelManifest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdgeAgentsConfigController_EdgeModelEntry"
            }
          }
        }
      },
      "EdgePromptBundleController_EdgePrompt": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "switchable": {
            "type": "boolean",
            "default": false
          },
          "source": {
            "$ref": "#/components/schemas/PromptSource"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hash": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "switchable",
          "version"
        ]
      },
      "EdgePromptBundleController_EdgePromptBundle": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "prompts": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EdgePromptBundleController_EdgePrompt"
            }
          }
        }
      },
      "EdgeRelayController_FailRequest": {
        "type": "object",
        "properties": {
          "relayId": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "relayId"
        ]
      },
      "EdgeRelayController_RegisterRequest": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelType"
            },
            "uniqueItems": true,
            "minItems": 1
          },
          "modelLabel": {
            "type": "string",
            "maxLength": 120
          },
          "deviceLabel": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "channels"
        ]
      },
      "EdgeRelayController_RegisterResponse": {
        "type": "object",
        "properties": {
          "relayId": {
            "type": "string"
          },
          "heartbeatSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "claimWaitSecondsMax": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "replyWaitSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "heartbeatSeconds",
          "claimWaitSecondsMax",
          "replyWaitSeconds"
        ]
      },
      "EdgeRelayController_RelayStatus": {
        "type": "object",
        "properties": {
          "relayId": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelType"
            },
            "uniqueItems": true
          },
          "modelLabel": {
            "type": "string"
          },
          "deviceLabel": {
            "type": "string"
          },
          "registeredAtEpochMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "answered": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "registeredAtEpochMs",
          "answered"
        ]
      },
      "EdgeRelayController_ReplyRequest": {
        "type": "object",
        "properties": {
          "relayId": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "relayId",
          "text"
        ]
      },
      "EdgeRelayController_StatusResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "relays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdgeRelayController_RelayStatus"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "EdgeRoutingPolicy": {
        "type": "string",
        "enum": [
          "EDGE_ONLY",
          "EDGE_FIRST",
          "HOSTED_ONLY"
        ]
      },
      "EdgeToolExecutionController_EdgeMemoryResponse": {
        "type": "object",
        "properties": {
          "facts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EdgeToolExecutionController_EdgeToolDescriptor": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {}
        }
      },
      "EdgeToolExecutionController_EdgeToolExecuteRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "toolName": {
            "type": "string"
          },
          "argumentsJson": {
            "type": "string"
          }
        }
      },
      "EdgeToolExecutionController_EdgeToolExecuteResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "default": false
          },
          "resultJson": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "ok"
        ]
      },
      "EdgeToolExecutionController_EdgeToolListResponse": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdgeToolExecutionController_EdgeToolDescriptor"
            }
          }
        }
      },
      "EdgeTurnTelemetryController_EdgeTurnReportRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionKey": {
            "type": "string"
          },
          "tier": {
            "type": "integer",
            "format": "int32"
          },
          "modelId": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EditionInfo": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "billingEnabled": {
            "type": "boolean",
            "default": false
          },
          "authMode": {
            "type": "string"
          },
          "features": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        },
        "required": [
          "billingEnabled"
        ]
      },
      "ElevenLabsCredentialActivationRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "ElevenLabsCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/ElevenLabsCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ElevenLabsCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ]
      },
      "ElevenLabsGeneratedAudioResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "voiceId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "downloadUrl": {
            "type": "string"
          }
        }
      },
      "ElevenLabsVoiceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "elevenLabsVoiceId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmailActivationRequest": {
        "type": "object",
        "properties": {
          "imapHost": {
            "type": "string",
            "minLength": 1
          },
          "imapPort": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 65535
          },
          "imapUsername": {
            "type": "string",
            "minLength": 1
          },
          "imapPassword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "useSsl": {
            "type": "boolean"
          }
        },
        "required": [
          "imapHost",
          "imapPort",
          "imapUsername",
          "imapPassword"
        ]
      },
      "EmailCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "imapHost": {
            "type": "string"
          },
          "imapPort": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "imapUsername": {
            "type": "string"
          },
          "useSsl": {
            "type": "boolean",
            "default": false
          },
          "status": {
            "$ref": "#/components/schemas/EmailCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastPolledAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "imapPort",
          "useSsl"
        ]
      },
      "EmailCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "EmailMessageController_EmailMessageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "runId": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "recipient": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "messageId": {
            "type": "string"
          },
          "threadKey": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "repliedAt": {
            "type": "string",
            "format": "date-time"
          },
          "replyKind": {
            "type": "string"
          },
          "replied": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "replied"
        ]
      },
      "EmailSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "subject",
          "body"
        ]
      },
      "EmailSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "EmbeddedSignupConfigResponse": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string"
          },
          "configId": {
            "type": "string"
          }
        }
      },
      "EmbeddedSignupExchangeRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "phoneNumberId": {
            "type": "string",
            "minLength": 1
          },
          "wabaId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code",
          "phoneNumberId",
          "wabaId"
        ]
      },
      "EmbeddingModelCatalog_ModelOption": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "nativeDimensions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "description": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "nativeDimensions",
          "isDefault"
        ]
      },
      "EmergencyStopRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "EnqueueCommandRequest": {
        "type": "object",
        "properties": {
          "commandType": {
            "type": "string",
            "minLength": 1
          },
          "payload": {
            "type": "string"
          }
        },
        "required": [
          "commandType"
        ]
      },
      "Error": {
        "type": "object",
        "description": "Error body produced by ErrorResponseFactory: an RFC 9457 Problem Details object served as application/problem+json, which also keeps the legacy members (timestamp, error, code). With app.errors.problem-details.enabled=false only the legacy members are sent, as application/json. Some handlers add extension members (errors, budget, upstreamStatus, lockedReason ...); the gateway's own 401 may carry an empty body.",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "Stable, machine-readable problem type, e.g. urn:vegaduta:problem:agent-not-found. Branch on this, not on the message. Absent when problem details are switched off."
          },
          "title": {
            "type": "string",
            "description": "HTTP reason phrase of the status."
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code, repeated from the status line."
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation; same text as error."
          },
          "instance": {
            "type": "string",
            "description": "Request path the problem occurred on (never the query string)."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string",
            "description": "Human-readable message (legacy member)."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable code, present only on handlers that disambiguate with one."
          },
          "requestId": {
            "type": "string",
            "description": "Correlation id, equal to the X-Request-Id response header."
          },
          "traceId": {
            "type": "string",
            "description": "OpenTelemetry trace id, when tracing is on."
          }
        },
        "required": [
          "status",
          "error"
        ],
        "additionalProperties": true
      },
      "ErrorResponseContractTest_ThrowingController_Body": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "name"
        ]
      },
      "EvalCredibilityController_CalibrationRequest": {
        "type": "object",
        "properties": {
          "examples": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JudgeCalibration_LabeledPair"
            }
          },
          "calibrationSetId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "EvalCredibilityController_GraderResponse": {
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "grader": {},
          "datasetContentHash": {
            "type": "string"
          }
        }
      },
      "EvalCredibilityController_SeedResponse": {
        "type": "object",
        "properties": {
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "caseCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "contentHash": {
            "type": "string"
          }
        },
        "required": [
          "caseCount"
        ]
      },
      "EvalCredibilityController_SetGraderRequest": {
        "type": "object",
        "properties": {
          "grader": {}
        }
      },
      "EvalDatasetDtos_CaseResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userMessage": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "expectedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "position"
        ]
      },
      "EvalDatasetDtos_CaseResultResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "userMessage": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "expectedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agentResponse": {
            "type": "string"
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalDatasetDtos_ReplayedToolCallResponse"
            }
          },
          "scores": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EvalDatasetDtos_DimensionScore"
            }
          },
          "overallScore": {
            "type": "number",
            "format": "double"
          },
          "expectedToolsSatisfied": {
            "type": "boolean"
          },
          "passed": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "traceId": {
            "type": "string"
          },
          "langfuseTraceUrl": {
            "type": "string"
          }
        },
        "required": [
          "position"
        ]
      },
      "EvalDatasetDtos_DatasetDetailResponse": {
        "type": "object",
        "properties": {
          "dataset": {
            "$ref": "#/components/schemas/EvalDatasetDtos_DatasetResponse"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalDatasetDtos_CaseResponse"
            }
          }
        }
      },
      "EvalDatasetDtos_DatasetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "passThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "toolExecutionEnabled": {
            "type": "boolean"
          },
          "autoApproveTools": {
            "type": "boolean",
            "default": false
          },
          "mode": {
            "type": "string"
          },
          "effectiveMode": {
            "type": "string"
          },
          "caseCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "contentHash": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "passThreshold",
          "autoApproveTools",
          "caseCount"
        ]
      },
      "EvalDatasetDtos_DimensionScore": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "format": "double"
          },
          "status": {
            "type": "string"
          },
          "feedback": {
            "type": "string"
          }
        }
      },
      "EvalDatasetDtos_ImportTurnCaseRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "turnRef": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "agentResponse": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "expectedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EvalDatasetDtos_JudgeCalibrationInfo": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "kappa": {
            "type": "number",
            "format": "double"
          },
          "n": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EvalDatasetDtos_ReplayedToolCallResponse": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "EvalDatasetDtos_RunDetailResponse": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/EvalDatasetDtos_RunResponse"
          },
          "caseResults": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalDatasetDtos_CaseResultResponse"
            }
          },
          "simulatedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EvalDatasetDtos_RunResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "passThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "overallScore": {
            "type": "number",
            "format": "double"
          },
          "caseCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "scoredCaseCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failedAssertionCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "erroredCaseCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "judgeModel": {
            "type": "string"
          },
          "datasetHash": {
            "type": "string"
          },
          "requestedJudgeModel": {
            "type": "string"
          },
          "strictJudge": {
            "type": "boolean",
            "default": false
          },
          "mode": {
            "type": "string"
          },
          "autoApproved": {
            "type": "boolean",
            "default": false
          },
          "repeats": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "budgetUsd": {
            "type": "number"
          },
          "costUsd": {
            "type": "number"
          },
          "errorMessage": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "baselineRunId": {
            "type": "string",
            "format": "uuid"
          },
          "baselineScore": {
            "type": "number",
            "format": "double"
          },
          "scoreDelta": {
            "type": "number",
            "format": "double"
          },
          "judgeCalibration": {
            "$ref": "#/components/schemas/EvalDatasetDtos_JudgeCalibrationInfo"
          }
        },
        "required": [
          "passThreshold",
          "caseCount",
          "scoredCaseCount",
          "failedAssertionCount",
          "erroredCaseCount",
          "strictJudge",
          "autoApproved",
          "repeats",
          "cancelRequested"
        ]
      },
      "EvalDatasetDtos_TriggerRunRequest": {
        "type": "object",
        "properties": {
          "judgeModel": {
            "type": "string"
          },
          "strictJudge": {
            "type": "boolean"
          },
          "repeats": {
            "type": "integer",
            "format": "int32"
          },
          "budgetUsd": {
            "type": "number"
          },
          "mode": {
            "type": "string"
          }
        }
      },
      "EvalDatasetDtos_UpsertCaseRequest": {
        "type": "object",
        "properties": {
          "userMessage": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "expectedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "position": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EvalDatasetDtos_UpsertDatasetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "passThreshold": {
            "type": "number",
            "format": "double"
          },
          "toolExecutionEnabled": {
            "type": "boolean"
          },
          "autoApproveTools": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          }
        }
      },
      "EvalGateDtos_GateEvaluationResponse": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "default": false
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "versionId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetName": {
            "type": "string"
          },
          "maxRunAgeHours": {
            "type": "integer",
            "format": "int32"
          },
          "allowed": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "qualifyingRunId": {
            "type": "string",
            "format": "uuid"
          },
          "verdict": {
            "type": "string"
          },
          "overallScore": {
            "type": "number",
            "format": "double"
          },
          "runFinishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "simulationRequired": {
            "type": "boolean",
            "default": false
          },
          "simulationSessionId": {
            "type": "string",
            "format": "uuid"
          },
          "simulationVerdict": {
            "type": "string"
          },
          "simulationFinishedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "configured",
          "enabled",
          "allowed",
          "simulationRequired"
        ]
      },
      "EvalGateDtos_GateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetName": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "maxRunAgeHours": {
            "type": "integer",
            "format": "int32"
          },
          "requireSimulation": {
            "type": "boolean",
            "default": false
          },
          "maxSimulationAgeHours": {
            "type": "integer",
            "format": "int32"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "requireSimulation"
        ]
      },
      "EvalGateDtos_GateStatusResponse": {
        "type": "object",
        "properties": {
          "gate": {
            "$ref": "#/components/schemas/EvalGateDtos_GateResponse"
          },
          "headVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "headEvaluation": {
            "$ref": "#/components/schemas/EvalGateDtos_GateEvaluationResponse"
          }
        }
      },
      "EvalGateDtos_UpsertGateRequest": {
        "type": "object",
        "properties": {
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "maxRunAgeHours": {
            "type": "integer",
            "format": "int32"
          },
          "requireSimulation": {
            "type": "boolean"
          },
          "maxSimulationAgeHours": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EvalRunBundle_Bundle": {
        "type": "object",
        "properties": {
          "schema": {
            "type": "string"
          },
          "hashAlgorithm": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "content": {
            "type": "object",
            "additionalProperties": true
          },
          "live": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "EvaluationType": {
        "type": "string",
        "enum": [
          "HELPFULNESS",
          "ACCURACY",
          "TONE",
          "LENGTH",
          "RELEVANCE",
          "SAFETY",
          "FAITHFULNESS"
        ]
      },
      "ExperienceMode": {
        "type": "string",
        "enum": [
          "SIMPLE",
          "ADVANCED"
        ]
      },
      "ExperimentAssignmentResponse": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "variant": {
            "type": "string"
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExperimentStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "RUNNING",
          "STOPPED",
          "COMPLETED"
        ]
      },
      "FaceEnrollmentController_FaceEnrollmentRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "personName": {
            "type": "string",
            "minLength": 1
          },
          "embedding": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            }
          },
          "consented": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "agentId",
          "collectionId",
          "personName",
          "embedding",
          "consented"
        ]
      },
      "FaceEnrollmentController_FaceEnrollmentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "personName": {
            "type": "string"
          },
          "embedding": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FeatureFlagResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "rolloutPercentage"
        ]
      },
      "FeatureFlagUpsertRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "rolloutPercentage": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "enabled",
          "rolloutPercentage"
        ]
      },
      "FeedbackSignal": {
        "type": "string",
        "enum": [
          "THUMBS_UP",
          "THUMBS_DOWN",
          "RATING",
          "EDIT",
          "RESOLVED",
          "UNRESOLVED"
        ]
      },
      "FimCompletionController_FimCompletionRequest": {
        "type": "object",
        "properties": {
          "prefix": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "maxTokens": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "FimCompletionController_FimCompletionResponse": {
        "type": "object",
        "properties": {
          "completion": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "FleetHealthService_AgentHealth": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "tenantEmergencyStopped": {
            "type": "boolean",
            "default": false
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "failedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorRate": {
            "type": "number",
            "format": "double"
          },
          "costUsd": {
            "type": "number"
          },
          "tokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "baselineDailyCostUsd": {
            "type": "number"
          },
          "spendRatio": {
            "type": "number",
            "format": "double"
          },
          "jobsFinished": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "jobsSucceeded": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "jobSuccessRate": {
            "type": "number",
            "format": "double"
          },
          "latestEvalScore": {
            "type": "number",
            "format": "double"
          },
          "previousEvalScore": {
            "type": "number",
            "format": "double"
          },
          "latestEvalVerdict": {
            "type": "string"
          },
          "latestEvalFinishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastCallAt": {
            "type": "string",
            "format": "date-time"
          },
          "alerts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "health": {
            "type": "string"
          }
        },
        "required": [
          "tenantEmergencyStopped",
          "calls",
          "failedCalls",
          "tokens",
          "jobsFinished",
          "jobsSucceeded"
        ]
      },
      "FleetHealthService_FleetHealthResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "slo": {
            "$ref": "#/components/schemas/FleetHealthService_FleetSlo"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetHealthService_AgentHealth"
            }
          },
          "unavailableTenants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "FleetHealthService_FleetSlo": {
        "type": "object",
        "properties": {
          "windowHours": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxErrorRate": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "minJobSuccessRate": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "evalDriftDrop": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "spendSpikeRatio": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "minCallsForSlo": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "minSpendUsd": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "windowHours",
          "maxErrorRate",
          "minJobSuccessRate",
          "evalDriftDrop",
          "spendSpikeRatio",
          "minCallsForSlo",
          "minSpendUsd"
        ]
      },
      "FraudAnalysisController_BlacklistIpRequest": {
        "type": "object",
        "properties": {
          "duration_minutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ip": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "duration_minutes"
        ]
      },
      "FraudAnalysisController_BlacklistUserRequest": {
        "type": "object",
        "properties": {
          "duration_minutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "reason": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "duration_minutes"
        ]
      },
      "FraudAnalysisController_HCaptchaVerifyRequest": {
        "type": "object",
        "properties": {
          "nonce": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "FreeTierQuotaConfigUpdateRequest": {
        "type": "object",
        "properties": {
          "monthlyTokenLimit": {
            "type": "integer",
            "format": "int64"
          },
          "premiumMultiplier": {
            "type": "integer",
            "format": "int32"
          },
          "unlimitedMultiplier": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "FreeTierUsageLimiterService_QuotaConfig": {
        "type": "object",
        "properties": {
          "monthlyTokenLimit": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "premiumMultiplier": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "unlimitedMultiplier": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "monthlyTokenLimit",
          "premiumMultiplier",
          "unlimitedMultiplier"
        ]
      },
      "GatewayCapability": {
        "type": "string",
        "enum": [
          "SUBSCRIPTIONS",
          "ONE_TIME_ORDERS",
          "PAYMENT_VERIFICATION",
          "DISCOUNT_OFFERS",
          "USAGE_ADDONS",
          "UPI_COLLECT",
          "UPI_QR"
        ]
      },
      "GatewayInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "isDefault": {
            "type": "boolean",
            "default": false
          },
          "publicKeyId": {
            "type": "string"
          },
          "checkoutMode": {
            "$ref": "#/components/schemas/CheckoutMode"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GatewayCapability"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "configured",
          "isDefault"
        ]
      },
      "GenerateGraphRequest": {
        "type": "object",
        "properties": {
          "instruction": {
            "type": "string",
            "minLength": 1
          },
          "currentGraph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          }
        },
        "required": [
          "instruction"
        ]
      },
      "GenerateGraphResponse": {
        "type": "object",
        "properties": {
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "type": "string"
          },
          "explanation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GenerateGraphResponse_ExplanationStep"
            }
          },
          "suggestedSchedule": {
            "$ref": "#/components/schemas/GenerateGraphResponse_SuggestedSchedule"
          },
          "requirements": {
            "$ref": "#/components/schemas/GenerateGraphResponse_Requirements"
          },
          "insertedApprovals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GenerateGraphResponse_InsertedApproval"
            }
          }
        }
      },
      "GenerateGraphResponse_ExplanationStep": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "sentence": {
            "type": "string"
          }
        }
      },
      "GenerateGraphResponse_InsertedApproval": {
        "type": "object",
        "properties": {
          "approvalNodeId": {
            "type": "string"
          },
          "beforeNodeId": {
            "type": "string"
          },
          "sendNodeId": {
            "type": "string"
          }
        }
      },
      "GenerateGraphResponse_RequirementItem": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          }
        }
      },
      "GenerateGraphResponse_Requirements": {
        "type": "object",
        "properties": {
          "secrets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "knowledge": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GenerateGraphResponse_RequirementItem"
            }
          }
        }
      },
      "GenerateGraphResponse_SuggestedSchedule": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "GeneratedImageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "downloadUrl": {
            "type": "string"
          }
        }
      },
      "GeneratedMusicResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "durationSeconds"
        ]
      },
      "GoogleConnectionResponse": {
        "type": "object",
        "properties": {
          "connectedEmail": {
            "type": "string"
          },
          "grantedScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "connectionScope": {
            "type": "string"
          }
        }
      },
      "GoogleOAuthController_AuthorizeUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "GuardrailRuleAction": {
        "type": "string",
        "enum": [
          "BLOCK",
          "REDACT"
        ]
      },
      "GuardrailRuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "pattern": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "action": {
            "$ref": "#/components/schemas/GuardrailRuleAction"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "pattern",
          "action"
        ]
      },
      "GuardrailRuleResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string"
          },
          "ruleType": {
            "$ref": "#/components/schemas/GuardrailRuleType"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/GuardrailRuleAction"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "GuardrailRuleType": {
        "type": "string",
        "enum": [
          "DEFAULT_TEMPLATE",
          "CUSTOM"
        ]
      },
      "HandoffState": {
        "type": "string",
        "enum": [
          "AGENT",
          "AWAITING_HUMAN",
          "HUMAN"
        ]
      },
      "HardwareProfile": {
        "type": "object",
        "properties": {
          "ramGb": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "cpuCores": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "gpu": {
            "$ref": "#/components/schemas/HardwareProfile_Gpu"
          },
          "appleSilicon": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "ramGb",
          "cpuCores",
          "appleSilicon"
        ]
      },
      "HardwareProfile_Gpu": {
        "type": "object",
        "properties": {
          "vendor": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vramGb": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "vramGb"
        ]
      },
      "HostedLlmPoolSettingsResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "HostedLlmPoolSettingsUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ImessageActivationRequest": {
        "type": "object",
        "properties": {
          "serverUrl": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "inboundMode": {
            "$ref": "#/components/schemas/ImessageInboundMode"
          }
        },
        "required": [
          "serverUrl",
          "password"
        ]
      },
      "ImessageCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "serverUrl": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ImessageCredentialStatus"
          },
          "inboundMode": {
            "$ref": "#/components/schemas/ImessageInboundMode"
          },
          "allowedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowGroups": {
            "type": "boolean",
            "default": false
          },
          "unknownSenderPolicy": {
            "$ref": "#/components/schemas/UnknownSenderPolicy"
          },
          "webhookPath": {
            "type": "string"
          },
          "webhookToken": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "allowGroups"
        ]
      },
      "ImessageCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "DISCONNECTED"
        ]
      },
      "ImessageInboundMode": {
        "type": "string",
        "enum": [
          "WEBHOOK",
          "POLLING"
        ]
      },
      "ImessageSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "ImessageSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "ImessageSettingsRequest": {
        "type": "object",
        "properties": {
          "inboundMode": {
            "$ref": "#/components/schemas/ImessageInboundMode"
          },
          "allowedSenders": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 200
          },
          "allowGroups": {
            "type": "boolean",
            "default": false
          },
          "unknownSenderPolicy": {
            "$ref": "#/components/schemas/UnknownSenderPolicy"
          }
        },
        "required": [
          "inboundMode",
          "allowedSenders",
          "allowGroups",
          "unknownSenderPolicy"
        ]
      },
      "ImpersonationService_SessionItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          },
          "adminEmail": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "requestCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "requestCount"
        ]
      },
      "ImpersonationService_SessionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImpersonationService_SessionItem"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "total"
        ]
      },
      "ImpersonationService_StartedSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "grant": {
            "type": "string"
          },
          "viewUrl": {
            "type": "string"
          }
        }
      },
      "ImpersonationService_ViewAsSessionInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "readOnly": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "readOnly"
        ]
      },
      "ImprovementDtos_HealthScoreResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "$ref": "#/components/schemas/AgentHealthStatus"
          },
          "openIssueCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "pendingSuggestionCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "lastSweptAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "score",
          "openIssueCount",
          "pendingSuggestionCount"
        ]
      },
      "ImprovementDtos_SuggestionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "issueId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/ImprovementKind"
          },
          "title": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "suggestedText": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ImprovementStatus"
          },
          "appliedRef": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedBy": {
            "type": "string"
          }
        }
      },
      "ImprovementKind": {
        "type": "string",
        "enum": [
          "PROMPT_REVISION",
          "NEW_PROCEDURE"
        ]
      },
      "ImprovementStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "ACCEPTED",
          "DISMISSED"
        ]
      },
      "IngestAppUsageRequest": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestAppUsageRequest_Item"
            },
            "minItems": 1
          }
        },
        "required": [
          "events"
        ]
      },
      "IngestAppUsageRequest_Item": {
        "type": "object",
        "properties": {
          "packageName": {
            "type": "string",
            "minLength": 1
          },
          "eventType": {
            "$ref": "#/components/schemas/DeviceAppUsageEventType"
          },
          "eventTime": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "packageName",
          "eventType"
        ]
      },
      "IngestNotificationsRequest": {
        "type": "object",
        "properties": {
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestNotificationsRequest_Item"
            },
            "minItems": 1
          }
        },
        "required": [
          "notifications"
        ]
      },
      "IngestNotificationsRequest_Item": {
        "type": "object",
        "properties": {
          "packageName": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "postedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "packageName"
        ]
      },
      "IngestRequest": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "chunkSize": {
            "type": "integer",
            "format": "int32"
          },
          "chunkOverlap": {
            "type": "integer",
            "format": "int32"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "text"
        ]
      },
      "IngestResponse": {
        "type": "object",
        "properties": {
          "chunkCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "dimensions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "chunkIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "documentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "chunkCount",
          "dimensions"
        ]
      },
      "IngestScreenStateRequest": {
        "type": "object",
        "properties": {
          "screenText": {
            "type": "string"
          },
          "foregroundApp": {
            "type": "string"
          },
          "capturedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IngestSmsRequest": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestSmsRequest_Item"
            },
            "minItems": 1
          }
        },
        "required": [
          "messages"
        ]
      },
      "IngestSmsRequest_Item": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/DeviceSmsDirection"
          },
          "smsTimestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "direction"
        ]
      },
      "IntervalMethod": {
        "type": "string",
        "enum": [
          "WILSON_SCORE",
          "PERCENTILE_BOOTSTRAP",
          "HIERARCHICAL_BOOTSTRAP",
          "PAIRED_BOOTSTRAP"
        ]
      },
      "InvoiceController_BillingProfileBody": {
        "type": "object",
        "properties": {
          "gstin": {
            "type": "string"
          },
          "billingName": {
            "type": "string"
          },
          "billingAddress": {
            "type": "string"
          }
        }
      },
      "InvoiceController_InvoiceSummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "gstRateBp": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "gstAmountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amountMinor",
          "gstRateBp",
          "gstAmountMinor"
        ]
      },
      "IssueCategory": {
        "type": "string",
        "enum": [
          "BILLING",
          "TECHNICAL",
          "ACCOUNT",
          "FEATURE_REQUEST",
          "OTHER",
          "TOOL_FAILURE",
          "SAFETY",
          "SYSTEM",
          "WORKFLOW"
        ]
      },
      "IssueSeverity": {
        "type": "string",
        "enum": [
          "ERROR",
          "WARNING"
        ]
      },
      "IssueSource": {
        "type": "string",
        "enum": [
          "EXCEPTION",
          "WORKFLOW_RUN",
          "TOOL_CALL",
          "LLM_QUALITY",
          "EVENT_OUTBOX",
          "PROVIDER_FALLBACK",
          "TENANT_REPORTED",
          "ABUSE_ANOMALY",
          "GUARDRAIL_FALSE_POSITIVE",
          "UPSTREAM_PROVIDER_FAILURE",
          "SPEND_CAP"
        ]
      },
      "IssueStatus": {
        "type": "string",
        "enum": [
          "OPEN",
          "ACKNOWLEDGED",
          "RESOLVED"
        ]
      },
      "JevCredentialActivationRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "JevCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/ProviderStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "JevPlaygroundRequest": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "questions": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "JevPolicyRequest": {
        "type": "object",
        "properties": {
          "costRouting": {
            "type": "boolean"
          },
          "agentRouting": {
            "type": "boolean"
          },
          "simpleThreshold": {
            "type": "number",
            "format": "double",
            "minimum": 0.5,
            "maximum": 0.99
          }
        }
      },
      "JevPolicyResponse": {
        "type": "object",
        "properties": {
          "costRouting": {
            "type": "boolean"
          },
          "agentRouting": {
            "type": "boolean"
          },
          "simpleThreshold": {
            "type": "number",
            "format": "double"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "JevStatusResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "source": {
            "$ref": "#/components/schemas/DecisionModel_KeySource"
          },
          "tenantCredential": {
            "$ref": "#/components/schemas/JevCredentialResponse"
          }
        },
        "required": [
          "enabled",
          "configured"
        ]
      },
      "JobTraceEntry": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/JobTraceEntryType"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "durationMs": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "JobTraceEntryType": {
        "type": "string",
        "enum": [
          "PROGRESS",
          "TOOL_CALL"
        ]
      },
      "JudgeCalibrationService_CalibrationResponse": {
        "type": "object",
        "properties": {
          "judgeModel": {
            "type": "string"
          },
          "agentModel": {
            "type": "string"
          },
          "selfPreferenceWarning": {
            "type": "string"
          },
          "report": {
            "$ref": "#/components/schemas/JudgeCalibration_Report"
          },
          "method": {
            "type": "string"
          },
          "calibrationSetId": {
            "type": "string",
            "format": "uuid"
          },
          "resultId": {
            "type": "string",
            "format": "uuid"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "JudgeCalibrationSetController_AddItemsRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JudgeCalibrationSetService_ItemInput"
            }
          }
        }
      },
      "JudgeCalibrationSetController_CreateSetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JudgeCalibrationSetService_ItemInput"
            }
          }
        }
      },
      "JudgeCalibrationSetController_ItemResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "input": {
            "type": "string"
          },
          "outputA": {
            "type": "string"
          },
          "outputB": {
            "type": "string"
          },
          "humanLabel": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "position"
        ]
      },
      "JudgeCalibrationSetController_RenameSetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "JudgeCalibrationSetController_ResultResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "setId": {
            "type": "string",
            "format": "uuid"
          },
          "judgeModel": {
            "type": "string"
          },
          "agentModel": {
            "type": "string"
          },
          "n": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "usable": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "consistent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "kappa": {
            "type": "number",
            "format": "double"
          },
          "orderSwapConsistency": {
            "type": "number",
            "format": "double"
          },
          "rawAgreement": {
            "type": "number",
            "format": "double"
          },
          "interpretation": {
            "type": "string"
          },
          "selfPreferenceWarning": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "n",
          "usable",
          "consistent"
        ]
      },
      "JudgeCalibrationSetController_SetDetailResponse": {
        "type": "object",
        "properties": {
          "set": {
            "$ref": "#/components/schemas/JudgeCalibrationSetController_SetResponse"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JudgeCalibrationSetController_ItemResponse"
            }
          }
        }
      },
      "JudgeCalibrationSetController_SetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "itemCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "itemCount"
        ]
      },
      "JudgeCalibrationSetService_ItemInput": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "outputA": {
            "type": "string"
          },
          "outputB": {
            "type": "string"
          },
          "humanLabel": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          }
        }
      },
      "JudgeCalibration_ExampleOutcome": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "human": {
            "type": "string"
          },
          "judgeAB": {
            "type": "string"
          },
          "judgeBA": {
            "type": "string"
          },
          "consistent": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "consistent"
        ]
      },
      "JudgeCalibration_LabeledPair": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "answerA": {
            "type": "string"
          },
          "answerB": {
            "type": "string"
          },
          "humanPreferred": {
            "type": "string"
          }
        }
      },
      "JudgeCalibration_Report": {
        "type": "object",
        "properties": {
          "examples": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "usable": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "consistent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "orderSwapConsistency": {
            "type": "number",
            "format": "double"
          },
          "coverage": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rawAgreement": {
            "type": "number",
            "format": "double"
          },
          "cohenKappa": {
            "type": "number",
            "format": "double"
          },
          "interpretation": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JudgeCalibration_ExampleOutcome"
            }
          }
        },
        "required": [
          "examples",
          "usable",
          "consistent",
          "coverage"
        ]
      },
      "KnowledgeCollectionCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string"
          },
          "parentCollectionId": {
            "type": "string",
            "format": "uuid"
          },
          "embeddingModel": {
            "type": "string"
          },
          "textSearchConfig": {
            "type": "string"
          },
          "chunkSize": {
            "type": "integer",
            "format": "int32",
            "minimum": 10,
            "maximum": 200
          },
          "chunkOverlap": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 199
          }
        },
        "required": [
          "name"
        ]
      },
      "KnowledgeCollectionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parentCollectionId": {
            "type": "string",
            "format": "uuid"
          },
          "isDefault": {
            "type": "boolean",
            "default": false
          },
          "embeddingModel": {
            "type": "string"
          },
          "textSearchConfig": {
            "type": "string"
          },
          "fileCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "chunkCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "embeddingStatus": {
            "type": "string"
          },
          "chunkSize": {
            "type": "integer",
            "format": "int32"
          },
          "chunkOverlap": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "isDefault",
          "fileCount",
          "chunkCount"
        ]
      },
      "KnowledgeCollectionUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string"
          },
          "parentCollectionId": {
            "type": "string",
            "format": "uuid"
          },
          "chunkSize": {
            "type": "integer",
            "format": "int32",
            "minimum": 10,
            "maximum": 200
          },
          "chunkOverlap": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 199
          }
        },
        "required": [
          "name"
        ]
      },
      "KnowledgeConnectorController_ConnectorUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "KnowledgeConnectorController_ConnectorUpsertRequest": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "config": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "collectionId",
          "type",
          "name",
          "config"
        ]
      },
      "KnowledgeConnectorService_ConnectorSyncResult": {
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "refreshed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "pruned": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "fetched": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "created",
          "refreshed",
          "pruned",
          "failed",
          "fetched"
        ]
      },
      "KnowledgeDocumentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "fileExtension": {
            "type": "string"
          },
          "fileSizeBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "status": {
            "$ref": "#/components/schemas/KnowledgeDocumentStatus"
          },
          "chunkCount": {
            "type": "integer",
            "format": "int32"
          },
          "errorMessage": {
            "type": "string"
          },
          "hasOriginalFile": {
            "type": "boolean",
            "default": false
          },
          "contentType": {
            "type": "string"
          },
          "sourceUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "fileSizeBytes",
          "hasOriginalFile"
        ]
      },
      "KnowledgeDocumentStatus": {
        "type": "string",
        "enum": [
          "UPLOADED",
          "QUEUED",
          "EXTRACTING",
          "EMBEDDING",
          "READY",
          "FAILED"
        ]
      },
      "KnowledgeIngestionJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/KnowledgeIngestionJobStatus"
          },
          "errorMessage": {
            "type": "string"
          },
          "resultChunkCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "KnowledgeIngestionJobStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "PROCESSING",
          "COMPLETE",
          "FAILED"
        ]
      },
      "KnowledgeReembedJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceModel": {
            "type": "string"
          },
          "targetModel": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/KnowledgeReembedJobStatus"
          },
          "totalChunks": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "processedChunks": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorMessage": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "totalChunks",
          "processedChunks"
        ]
      },
      "KnowledgeReembedJobStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "EMBEDDING",
          "SWEEPING",
          "COMPLETED",
          "FAILED"
        ]
      },
      "KnowledgeReembedRequest": {
        "type": "object",
        "properties": {
          "targetModel": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "targetModel"
        ]
      },
      "KnowledgeStatsResponse": {
        "type": "object",
        "properties": {
          "totalCollections": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalDocuments": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalChunks": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalVectors": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "totalCollections",
          "totalDocuments",
          "totalChunks",
          "totalVectors"
        ]
      },
      "LandingEventController_LandingEventRequest": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string"
          }
        }
      },
      "LandingEventController_LandingMetricsDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "events": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          }
        }
      },
      "LandingEventController_LandingMetricsResponse": {
        "type": "object",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LandingEventController_LandingMetricsDay"
            }
          }
        }
      },
      "LeadActivityType": {
        "type": "string",
        "enum": [
          "NOTE",
          "EMAIL_SENT",
          "EMAIL_REPLY",
          "STAGE_CHANGE",
          "CALL",
          "TASK"
        ]
      },
      "LeadController_ActivityRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "LeadController_ActivityResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "leadId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/LeadActivityType"
          },
          "body": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LeadController_LeadRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "stage": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "format": "int32"
          },
          "owner": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "LeadController_LeadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "stage": {
            "$ref": "#/components/schemas/LeadStage"
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "owner": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          },
          "lastContactedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastRepliedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "score"
        ]
      },
      "LeadController_PageResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeadController_LeadResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "total",
          "page",
          "size"
        ]
      },
      "LeadController_StageRequest": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "LeadService_ImportResult": {
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "updated": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "created",
          "updated",
          "skipped"
        ]
      },
      "LeadService_StageTotal": {
        "type": "object",
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/LeadStage"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "count"
        ]
      },
      "LeadStage": {
        "type": "string",
        "enum": [
          "NEW",
          "CONTACTED",
          "REPLIED",
          "QUALIFIED",
          "PROPOSAL",
          "WON",
          "LOST"
        ]
      },
      "LearningProposalController_ApproveRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          }
        }
      },
      "LearningProposalView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          },
          "applicable": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "applicable"
        ]
      },
      "LedgerDtos_Baseline": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string"
          },
          "score": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "score",
          "version"
        ]
      },
      "LedgerDtos_Comparison": {
        "type": "object",
        "properties": {
          "significant": {
            "type": "boolean",
            "default": false
          },
          "delta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "significant",
          "delta"
        ]
      },
      "LedgerDtos_ExperimentRequest": {
        "type": "object",
        "properties": {
          "agentRef": {
            "type": "string"
          },
          "versionA": {
            "type": "string"
          },
          "versionB": {
            "type": "string"
          },
          "trafficPercent": {
            "type": "integer",
            "format": "int32"
          },
          "start": {
            "type": "boolean"
          }
        }
      },
      "LedgerDtos_ExperimentStarted": {
        "type": "object",
        "properties": {
          "experimentId": {
            "type": "string"
          },
          "agentRef": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "trafficPercent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "trafficPercent"
        ]
      },
      "LedgerDtos_ExperimentView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "agentRef": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "control": {
            "$ref": "#/components/schemas/LedgerDtos_VariantView"
          },
          "treatment": {
            "$ref": "#/components/schemas/LedgerDtos_VariantView"
          },
          "comparison": {
            "$ref": "#/components/schemas/LedgerDtos_Comparison"
          }
        }
      },
      "LedgerDtos_Ledger": {
        "type": "object",
        "properties": {
          "briefId": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "rung": {
            "type": "string"
          },
          "baseline": {
            "$ref": "#/components/schemas/LedgerDtos_Baseline"
          },
          "noiseFloor": {
            "type": "number",
            "format": "double"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerDtos_RunView"
            }
          },
          "thumbs": {
            "$ref": "#/components/schemas/LedgerDtos_ThumbsView"
          },
          "experiments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerDtos_ExperimentView"
            }
          },
          "trustEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerDtos_TrustEventView"
            }
          }
        }
      },
      "LedgerDtos_RehearsalRun": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string"
          },
          "persona": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "verdictReason": {
            "type": "string"
          },
          "turns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "turns"
        ]
      },
      "LedgerDtos_RehearsalStarted": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "agentRef": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "sessionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "personas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "LedgerDtos_RehearsalView": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerDtos_RehearsalRun"
            }
          }
        }
      },
      "LedgerDtos_RunView": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runId": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "score": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "passThreshold": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "verdict": {
            "type": "string"
          },
          "noiseFloor": {
            "type": "number",
            "format": "double"
          },
          "deltaVsPrev": {
            "type": "number",
            "format": "double"
          },
          "significant": {
            "type": "boolean",
            "default": false
          },
          "change": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "score",
          "passThreshold",
          "significant"
        ]
      },
      "LedgerDtos_ThumbsView": {
        "type": "object",
        "properties": {
          "up": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "down": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "rated": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "ratio": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "up",
          "down",
          "rated"
        ]
      },
      "LedgerDtos_TrustEventView": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "fromRung": {
            "type": "string"
          },
          "toRung": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "actor": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "evidence": {}
        }
      },
      "LedgerDtos_VariantView": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "feedback": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "thumbsUpRatePct": {
            "type": "number",
            "format": "double"
          },
          "errorRatePct": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "calls",
          "feedback"
        ]
      },
      "LlmCallLogController_LlmCallDiagnosisEntry": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "suggestedFix": {
            "type": "string"
          },
          "suggestedModels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string"
          }
        }
      },
      "LlmCallLogController_LlmCallLogEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64"
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "success": {
            "type": "boolean",
            "default": false
          },
          "errorMessage": {
            "type": "string"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "success",
          "latencyMs"
        ]
      },
      "LlmCallLogController_LlmProviderUsageSummaryEntry": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "firstCallAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastCallAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "totalCalls",
          "errorCount",
          "totalTokens"
        ]
      },
      "LlmDashboardMetrics": {
        "type": "object",
        "properties": {
          "callsLast24h": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tokensPerMinuteRecent": {
            "type": "number",
            "format": "double"
          },
          "p50LatencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "p95LatencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "p99LatencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "costTodayUsd": {
            "type": "number"
          },
          "costPerConversationTodayUsd": {
            "type": "number"
          },
          "conversationsToday": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "modelSplitLast24h": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LlmDashboardMetrics_ModelShare"
            }
          }
        },
        "required": [
          "callsLast24h",
          "conversationsToday"
        ]
      },
      "LlmDashboardMetrics_ModelShare": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "percent": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "calls",
          "percent"
        ]
      },
      "LlmGatewayContentPolicyController_ContentPolicyRequest": {
        "type": "object",
        "properties": {
          "piiRedactionEnabled": {
            "type": "boolean"
          },
          "piiRedactEmail": {
            "type": "boolean"
          },
          "piiRedactPhone": {
            "type": "boolean"
          },
          "piiRedactGovernmentId": {
            "type": "boolean"
          },
          "piiRedactCreditCard": {
            "type": "boolean"
          },
          "injectionScreeningEnabled": {
            "type": "boolean"
          },
          "injectionScreeningAction": {
            "type": "string"
          }
        }
      },
      "LlmGatewayContentPolicyController_ContentPolicyResponse": {
        "type": "object",
        "properties": {
          "piiRedactionEnabled": {
            "type": "boolean",
            "default": false
          },
          "piiRedactEmail": {
            "type": "boolean",
            "default": false
          },
          "piiRedactPhone": {
            "type": "boolean",
            "default": false
          },
          "piiRedactGovernmentId": {
            "type": "boolean",
            "default": false
          },
          "piiRedactCreditCard": {
            "type": "boolean",
            "default": false
          },
          "injectionScreeningEnabled": {
            "type": "boolean",
            "default": false
          },
          "injectionScreeningAction": {
            "type": "string"
          }
        },
        "required": [
          "piiRedactionEnabled",
          "piiRedactEmail",
          "piiRedactPhone",
          "piiRedactGovernmentId",
          "piiRedactCreditCard",
          "injectionScreeningEnabled"
        ]
      },
      "LlmRequestSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "agentId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "streaming": {
            "type": "boolean",
            "default": false
          },
          "options": {
            "type": "object",
            "additionalProperties": true
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LlmRequestSnapshot_Message"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LlmRequestSnapshot_Tool"
            }
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "totalChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "toolSchemaChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "prefixChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "prefixTokensEstimate": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "providerPromptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "fullTotalChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "streaming",
          "totalChars",
          "truncated",
          "toolSchemaChars",
          "prefixChars",
          "prefixTokensEstimate",
          "fullTotalChars"
        ]
      },
      "LlmRequestSnapshot_Message": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "chars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mediaCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "payloadChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptBlockTag"
            }
          }
        },
        "required": [
          "chars",
          "mediaCount",
          "payloadChars"
        ]
      },
      "LlmRequestSnapshot_Tool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "string"
          },
          "schemaChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "schemaChars"
        ]
      },
      "LocalAuthController_ChangePasswordRequest": {
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "newPassword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "required": [
          "currentPassword",
          "newPassword"
        ]
      },
      "LocalAuthController_ConfigResponse": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "setupRequired": {
            "type": "boolean",
            "default": false
          },
          "credentialTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "passwordMinLength": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "setupRequired",
          "passwordMinLength"
        ]
      },
      "LocalAuthController_LoginRequest": {
        "type": "object",
        "properties": {
          "identifier": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "type": {
            "type": "string",
            "maxLength": 32
          }
        },
        "required": [
          "identifier",
          "password"
        ]
      },
      "LocalAuthController_RefreshRequest": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "refreshToken"
        ]
      },
      "LocalAuthController_SessionResponse": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "expiresIn": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "refreshToken": {
            "type": "string"
          },
          "refreshExpiresIn": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "passwordChangeRequired": {
            "type": "boolean",
            "default": false
          },
          "user": {
            "$ref": "#/components/schemas/LocalAuthController_UserView"
          }
        },
        "required": [
          "expiresIn",
          "refreshExpiresIn",
          "passwordChangeRequired"
        ]
      },
      "LocalAuthController_SetupRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "required": [
          "token",
          "password"
        ]
      },
      "LocalAuthController_UserView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "LocalDevices_Enrolled": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "deviceSecret": {
            "type": "string"
          }
        }
      },
      "LocalModelPullService_Status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "percent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "percent"
        ]
      },
      "LocalModelsController_TagRequest": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "tag"
        ]
      },
      "LocalModelsController_WarmRequest": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "LocalModelsService_OllamaState": {
        "type": "object",
        "properties": {
          "reachable": {
            "type": "boolean",
            "default": false
          },
          "baseUrl": {
            "type": "string"
          },
          "installedTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "reachable"
        ]
      },
      "LocalModelsService_ProbeResult": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "toolCalling": {
            "type": "string"
          },
          "structuredOutput": {
            "type": "boolean",
            "default": false
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolRouterMode": {
            "type": "string"
          }
        },
        "required": [
          "structuredOutput",
          "latencyMs"
        ]
      },
      "LocalModelsService_Recommended": {
        "type": "object",
        "properties": {
          "hardware": {
            "$ref": "#/components/schemas/HardwareProfile"
          },
          "recommended": {
            "$ref": "#/components/schemas/ModelRecommender_Pick"
          },
          "alternatives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelRecommender_Pick"
            }
          },
          "catalog": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelRecommender_Pick"
            }
          },
          "budgetGb": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "ollama": {
            "$ref": "#/components/schemas/LocalModelsService_OllamaState"
          },
          "servingModel": {
            "type": "string"
          },
          "servingBlocked": {
            "type": "string"
          }
        },
        "required": [
          "budgetGb"
        ]
      },
      "LocalModelsService_Settings": {
        "type": "object",
        "properties": {
          "servingModel": {
            "type": "string"
          },
          "reasoningEffort": {
            "type": "string"
          },
          "keepAlive": {
            "type": "string"
          },
          "contextLength": {
            "type": "integer",
            "format": "int32"
          },
          "loadedContext": {
            "type": "integer",
            "format": "int32"
          },
          "wantedContext": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "wantedContext"
        ]
      },
      "LocalModelsService_SettingsUpdate": {
        "type": "object",
        "properties": {
          "reasoningEffort": {
            "type": "string"
          },
          "keepAlive": {
            "type": "string"
          },
          "contextLength": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "LocalModelsService_UseResult": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "rowId": {
            "type": "integer",
            "format": "int64"
          },
          "created": {
            "type": "boolean",
            "default": false
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "toolCallGrade": {
            "type": "string"
          }
        },
        "required": [
          "created",
          "enabled"
        ]
      },
      "LocalModelsService_WarmResult": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "loaded": {
            "type": "boolean",
            "default": false
          },
          "ms": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "loaded",
          "ms"
        ]
      },
      "LocalOpenAiProbeRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "model"
        ]
      },
      "LocalOpenAiProbeResponse": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "toolCallGrade": {
            "$ref": "#/components/schemas/ToolCallGrade"
          },
          "serverKind": {
            "$ref": "#/components/schemas/ToolCallCapabilityProbe_ServerKind"
          },
          "toolRouterMode": {
            "$ref": "#/components/schemas/ToolRouterMode"
          },
          "parameterBillions": {
            "type": "number",
            "format": "double"
          },
          "advice": {
            "type": "string"
          }
        }
      },
      "LocalPasskeyService_Options": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string"
          },
          "publicKey": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "LocalUnlockController_CodesResponse": {
        "type": "object",
        "properties": {
          "codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LocalUnlockController_DeviceRequest": {
        "type": "object",
        "properties": {
          "pin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "label": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "pin"
        ]
      },
      "LocalUnlockController_RegisterOptionsRequest": {
        "type": "object",
        "properties": {
          "setupToken": {
            "type": "string",
            "maxLength": 256
          }
        }
      },
      "LocalUnlockController_RegisterRequest": {
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "credential": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65536
          },
          "label": {
            "type": "string",
            "maxLength": 100
          },
          "setupToken": {
            "type": "string",
            "maxLength": 256
          }
        },
        "required": [
          "challengeId",
          "credential"
        ]
      },
      "LocalUnlockController_RegisterResponse": {
        "type": "object",
        "properties": {
          "passkey": {
            "$ref": "#/components/schemas/LocalUnlockService_PasskeyView"
          },
          "session": {
            "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
          },
          "recoveryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LocalUnlockController_SetupPinRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "pin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "label": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "token",
          "pin"
        ]
      },
      "LocalUnlockController_SetupPinResponse": {
        "type": "object",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/LocalAuthController_SessionResponse"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceSecret": {
            "type": "string"
          },
          "recoveryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LocalUnlockController_UnlockLoginRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "pattern": "pin|passkey|recovery"
          },
          "identifier": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "credentials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "maxProperties": 4
          }
        },
        "required": [
          "type",
          "identifier",
          "credentials"
        ]
      },
      "LocalUnlockService_DeviceView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": "string"
          }
        }
      },
      "LocalUnlockService_Methods": {
        "type": "object",
        "properties": {
          "hasPassword": {
            "type": "boolean",
            "default": false
          },
          "passkeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalUnlockService_PasskeyView"
            }
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalUnlockService_DeviceView"
            }
          },
          "recoveryCodesRemaining": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "hasPassword",
          "recoveryCodesRemaining"
        ]
      },
      "LocalUnlockService_PasskeyView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": "string"
          },
          "backedUp": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "backedUp"
        ]
      },
      "MandateApprovalPolicy": {
        "type": "string",
        "enum": [
          "ALWAYS",
          "ABOVE_THRESHOLD",
          "NEVER"
        ]
      },
      "MandateScope": {
        "type": "string",
        "enum": [
          "COLLECT",
          "PAY",
          "BOTH"
        ]
      },
      "MandateStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "REVOKED",
          "EXPIRED",
          "SUSPENDED"
        ]
      },
      "MatrixActivationRequest": {
        "type": "object",
        "properties": {
          "homeserverUrl": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "joinPolicy": {
            "$ref": "#/components/schemas/MatrixJoinPolicy"
          },
          "senderMode": {
            "$ref": "#/components/schemas/MatrixSenderMode"
          },
          "allowedSenders": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "homeserverUrl",
          "accessToken"
        ]
      },
      "MatrixController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64000
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "MatrixController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "MatrixCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "homeserverUrl": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MatrixCredentialStatus"
          },
          "joinPolicy": {
            "$ref": "#/components/schemas/MatrixJoinPolicy"
          },
          "senderMode": {
            "$ref": "#/components/schemas/MatrixSenderMode"
          },
          "allowedSenders": {
            "type": "string"
          },
          "inboundActive": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "inboundActive"
        ]
      },
      "MatrixCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "MatrixJoinPolicy": {
        "type": "string",
        "enum": [
          "OFF",
          "ALLOWLIST"
        ]
      },
      "MatrixPolicyRequest": {
        "type": "object",
        "properties": {
          "joinPolicy": {
            "$ref": "#/components/schemas/MatrixJoinPolicy"
          },
          "senderMode": {
            "$ref": "#/components/schemas/MatrixSenderMode"
          },
          "allowedSenders": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "joinPolicy",
          "senderMode"
        ]
      },
      "MatrixSenderMode": {
        "type": "string",
        "enum": [
          "PAIRING",
          "ALLOWLIST"
        ]
      },
      "McpAppsController_ToolCallRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "arguments": {}
        }
      },
      "McpAppsController_ToolCallResponse": {
        "type": "object",
        "properties": {
          "isError": {
            "type": "boolean",
            "default": false
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "isError"
        ]
      },
      "McpAppsService_AppView": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string"
          },
          "serverName": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "csp": {
            "type": "string"
          },
          "toolInput": {
            "type": "string"
          },
          "toolResult": {
            "type": "string"
          },
          "toolResultTruncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "toolResultTruncated"
        ]
      },
      "McpCatalogEntry": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/McpServerType"
          },
          "description": {
            "type": "string"
          },
          "iconKey": {
            "type": "string"
          },
          "docsUrl": {
            "type": "string"
          },
          "ready": {
            "type": "boolean",
            "default": false
          },
          "requiredEnvVars": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "yamlSnippet": {
            "type": "string"
          },
          "dynamicCommand": {
            "type": "string"
          },
          "dynamicArgs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dynamicUrl": {
            "type": "string"
          },
          "requiresOAuth": {
            "type": "boolean",
            "default": false
          },
          "verified": {
            "type": "boolean",
            "default": false
          },
          "oauthProviderId": {
            "type": "string"
          }
        },
        "required": [
          "ready",
          "requiresOAuth",
          "verified"
        ]
      },
      "McpConnectionPhase": {
        "type": "string",
        "enum": [
          "SPAWN",
          "HTTP",
          "HANDSHAKE",
          "INIT_TIMEOUT",
          "OK"
        ]
      },
      "McpConnectionStatus": {
        "type": "string",
        "enum": [
          "NOT_CONFIGURED",
          "STATIC",
          "CONNECTING",
          "CONNECTED",
          "ERROR",
          "DISABLED"
        ]
      },
      "McpConnectionTestResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "default": false
          },
          "phase": {
            "$ref": "#/components/schemas/McpConnectionPhase"
          },
          "detail": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "toolCount": {
            "type": "integer",
            "format": "int32"
          },
          "suggestedFix": {
            "$ref": "#/components/schemas/McpConnectionTestResult_SuggestedFix"
          }
        },
        "required": [
          "ok"
        ]
      },
      "McpConnectionTestResult_SuggestedFix": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "McpEdgeEligibilityRequest": {
        "type": "object",
        "properties": {
          "edgeEligible": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "edgeEligible"
        ]
      },
      "McpOAuthController_AuthorizeRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "returnTo": {
            "type": "string"
          }
        }
      },
      "McpOAuthController_AuthorizeResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "clientMode": {
            "type": "string"
          }
        }
      },
      "McpOAuthController_CapabilitiesResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "cimd": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "cimd"
        ]
      },
      "McpOAuthController_DisconnectResponse": {
        "type": "object",
        "properties": {
          "disconnected": {
            "type": "boolean",
            "default": false
          },
          "liveConnectionsDropped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "disconnected",
          "liveConnectionsDropped"
        ]
      },
      "McpOAuthController_StatusResponse": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "McpOAuthController_UrlRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "McpPendingReviewResponse": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "args": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "McpReviewDecisionRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "McpReviewStatus": {
        "type": "string",
        "enum": [
          "NOT_REQUIRED",
          "PENDING",
          "APPROVED",
          "REJECTED"
        ]
      },
      "McpServerAccessController_McpGrantToolCallView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "toolName": {
            "type": "string"
          },
          "toolInput": {
            "type": "string"
          },
          "toolOutput": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "McpServerAccessGrantCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "exposedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedWorkflowIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "name"
        ]
      },
      "McpServerAccessGrantCreatedResponse": {
        "type": "object",
        "properties": {
          "grant": {
            "$ref": "#/components/schemas/McpServerAccessGrantResponse"
          },
          "rawApiKey": {
            "type": "string"
          }
        }
      },
      "McpServerAccessGrantResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "apiKeyDisplayPrefix": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "exposedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedWorkflowIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "McpServerAccessGrantToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "McpServerAccessGrantUpdateRequest": {
        "type": "object",
        "properties": {
          "exposedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedWorkflowIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "exposedKnowledgeCollectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          }
        }
      },
      "McpServerAuthOptionsController_AuthOptions": {
        "type": "object",
        "properties": {
          "grantKeys": {
            "type": "boolean",
            "default": false
          },
          "oauth": {
            "$ref": "#/components/schemas/McpServerAuthOptionsController_OAuthOptions"
          },
          "origin": {
            "$ref": "#/components/schemas/McpServerAuthOptionsController_OriginOptions"
          }
        },
        "required": [
          "grantKeys"
        ]
      },
      "McpServerAuthOptionsController_OAuthOptions": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "resource": {
            "type": "string"
          },
          "metadataUrl": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "tenantClaim": {
            "type": "string"
          },
          "grantClaim": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "McpServerAuthOptionsController_OriginOptions": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "allowed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "McpServerRegistrationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "$ref": "#/components/schemas/McpServerType"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "command": {
            "type": "string"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "enabled"
        ]
      },
      "McpServerRegistrationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/McpServerType"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "dynamic": {
            "type": "boolean",
            "default": false
          },
          "command": {
            "type": "string"
          },
          "args": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "connectionStatus": {
            "$ref": "#/components/schemas/McpConnectionStatus"
          },
          "connectionError": {
            "type": "string"
          },
          "connectionPhase": {
            "$ref": "#/components/schemas/McpConnectionPhase"
          },
          "connectionHint": {
            "type": "string"
          },
          "usageStatus": {
            "$ref": "#/components/schemas/McpUsageStatus"
          },
          "connectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "suggestedFix": {
            "$ref": "#/components/schemas/McpConnectionTestResult_SuggestedFix"
          },
          "reviewStatus": {
            "$ref": "#/components/schemas/McpReviewStatus"
          },
          "reviewRejectionReason": {
            "type": "string"
          },
          "credentialsCorrupted": {
            "type": "boolean",
            "default": false
          },
          "edgeEligible": {
            "type": "boolean",
            "default": false
          },
          "wasUpdate": {
            "type": "boolean",
            "default": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "dynamic",
          "credentialsCorrupted",
          "edgeEligible",
          "wasUpdate"
        ]
      },
      "McpServerToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "McpServerType": {
        "type": "string",
        "enum": [
          "STDIO",
          "SSE",
          "STREAMABLE_HTTP"
        ]
      },
      "McpToolExposureController_ExposureResponse": {
        "type": "object",
        "properties": {
          "exposed": {
            "type": "boolean",
            "default": false
          },
          "toolName": {
            "type": "string"
          },
          "featureEnabled": {
            "type": "boolean",
            "default": false
          },
          "mcpPath": {
            "type": "string"
          }
        },
        "required": [
          "exposed",
          "featureEnabled"
        ]
      },
      "McpToolExposureController_ExposureUpdateRequest": {
        "type": "object",
        "properties": {
          "exposed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "exposed"
        ]
      },
      "McpToolPinService_PinStatus": {
        "type": "object",
        "properties": {
          "registrationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean",
            "default": false
          },
          "changed": {
            "type": "boolean",
            "default": false
          },
          "pinnedHash": {
            "type": "string"
          },
          "observedHash": {
            "type": "string"
          },
          "pinnedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pinnedBy": {
            "type": "string"
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "added": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "changedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "pinned",
          "changed"
        ]
      },
      "McpUsageStatus": {
        "type": "string",
        "enum": [
          "UNTESTED",
          "READY",
          "FAILED",
          "ACKNOWLEDGED"
        ]
      },
      "MeController_MeResponse": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MemoryImportDtos_Capacity": {
        "type": "object",
        "properties": {
          "sharedRemaining": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "perAgentLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "sharedRemaining",
          "perAgentLimit"
        ]
      },
      "MemoryImportDtos_ImportFact": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "MemoryImportDtos_ImportLimits": {
        "type": "object",
        "properties": {
          "maxFacts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxFacts",
          "maxChars"
        ]
      },
      "MemoryImportDtos_ImportRequest": {
        "type": "object",
        "properties": {
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryImportDtos_ImportFact"
            }
          },
          "source": {
            "type": "string"
          }
        }
      },
      "MemoryImportDtos_ImportResponse": {
        "type": "object",
        "properties": {
          "saved": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryImportDtos_SkippedFact"
            }
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "saved"
        ]
      },
      "MemoryImportDtos_PreviewFact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "text": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "duplicateOf": {
            "type": "string"
          },
          "rejectedReason": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "MemoryImportDtos_PreviewRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "sourceHint": {
            "type": "string"
          }
        }
      },
      "MemoryImportDtos_PreviewResponse": {
        "type": "object",
        "properties": {
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryImportDtos_PreviewFact"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/MemoryImportDtos_PreviewStats"
          },
          "capacity": {
            "$ref": "#/components/schemas/MemoryImportDtos_Capacity"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "MemoryImportDtos_PreviewStats": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "kept": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "duplicates": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rejected": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "lines",
          "kept",
          "duplicates",
          "rejected"
        ]
      },
      "MemoryImportDtos_SkippedFact": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "MemoryProvenanceService_FactSource": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "learnedAt": {
            "type": "string",
            "format": "date-time"
          },
          "matched": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "matched"
        ]
      },
      "MetaActivationRequest": {
        "type": "object",
        "properties": {
          "phoneNumberId": {
            "type": "string",
            "minLength": 1
          },
          "wabaId": {
            "type": "string",
            "minLength": 1
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "appSecret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "phoneNumberId",
          "wabaId",
          "accessToken",
          "appSecret"
        ]
      },
      "MetaCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "phoneNumberId": {
            "type": "string"
          },
          "wabaId": {
            "type": "string"
          },
          "displayPhoneNumber": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MetaWhatsAppCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MetaSocialActivationRequest": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "minLength": 1
          },
          "pageAccessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "appSecret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "instagramBusinessAccountId": {
            "type": "string"
          }
        },
        "required": [
          "pageId",
          "pageAccessToken",
          "appSecret"
        ]
      },
      "MetaSocialCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pageId": {
            "type": "string"
          },
          "pageName": {
            "type": "string"
          },
          "instagramConnected": {
            "type": "boolean",
            "default": false
          },
          "instagramUsername": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MetaSocialCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "instagramConnected"
        ]
      },
      "MetaSocialCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "MetaSocialSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "MetaSocialSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "MetaWhatsAppCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "MobileSentinelService_AdminSummary": {
        "type": "object",
        "properties": {
          "windowDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "activeUsers": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "events": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "bySeverity": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "escalations": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "windowDays",
          "activeUsers",
          "events",
          "escalations"
        ]
      },
      "MobileSentinelService_Escalate": {
        "type": "object",
        "properties": {
          "caregiverName": {
            "type": "string"
          },
          "caregiverEmail": {
            "type": "string"
          }
        }
      },
      "MobileSentinelService_EventIn": {
        "type": "object",
        "properties": {
          "clientEventId": {
            "type": "string"
          },
          "sentinelId": {
            "type": "string"
          },
          "sentinelName": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "kinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "findings": {},
          "readings": {},
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "escalate": {
            "$ref": "#/components/schemas/MobileSentinelService_Escalate"
          }
        }
      },
      "MobileSentinelService_EventView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "clientEventId": {
            "type": "string"
          },
          "sentinelId": {
            "type": "string"
          },
          "sentinelName": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "kinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "findings": {},
          "readings": {},
          "deviceLabel": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "escalatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "escalatedTo": {
            "type": "string"
          }
        }
      },
      "MobileSentinelService_IngestRequest": {
        "type": "object",
        "properties": {
          "deviceLabel": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MobileSentinelService_EventIn"
            }
          }
        }
      },
      "MobileSentinelService_IngestResult": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "duplicates": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rejected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MobileSentinelService_Rejection"
            }
          },
          "escalated": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "readingsDropped": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "accepted",
          "duplicates",
          "escalated",
          "readingsDropped"
        ]
      },
      "MobileSentinelService_PolicyRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "syncEnabled": {
            "type": "boolean"
          },
          "allowRawReadings": {
            "type": "boolean"
          },
          "allowedKinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "caregiverEscalationEnabled": {
            "type": "boolean"
          },
          "retentionDays": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MobileSentinelService_PolicyView": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "syncEnabled": {
            "type": "boolean",
            "default": false
          },
          "allowRawReadings": {
            "type": "boolean",
            "default": false
          },
          "allowedKinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "caregiverEscalationEnabled": {
            "type": "boolean",
            "default": false
          },
          "retentionDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "syncEnabled",
          "allowRawReadings",
          "caregiverEscalationEnabled",
          "retentionDays"
        ]
      },
      "MobileSentinelService_Rejection": {
        "type": "object",
        "properties": {
          "clientEventId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ModalityCatalogResponse": {
        "type": "object",
        "properties": {
          "speechToText": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityProviderOption"
            }
          },
          "textToSpeech": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityProviderOption"
            }
          },
          "videoToText": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModalityProviderOption"
            }
          }
        }
      },
      "ModalityProviderOption": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "providerId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaultModel": {
            "type": "string"
          },
          "implemented": {
            "type": "boolean",
            "default": false
          },
          "available": {
            "type": "boolean",
            "default": false
          },
          "unavailabilityReason": {
            "type": "string"
          },
          "premium": {
            "type": "boolean",
            "default": false
          },
          "beta": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "implemented",
          "available",
          "premium",
          "beta"
        ]
      },
      "ModelPricingController_ModelPriceEntry": {
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "inputPerMillionUsd": {
            "type": "number"
          },
          "outputPerMillionUsd": {
            "type": "number"
          }
        }
      },
      "ModelPricingController_ModelPricingRequest": {
        "type": "object",
        "properties": {
          "modelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ModelRecommender_Pick": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "downloadGb": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "ramGb": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "toolCalling": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "paramsB": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "contextK": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "vramGb": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "licence": {
            "type": "string"
          },
          "thinking": {
            "type": "boolean",
            "default": false
          },
          "bestFor": {
            "type": "string"
          },
          "fits": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "downloadGb",
          "ramGb",
          "paramsB",
          "contextK",
          "vramGb",
          "thinking",
          "fits"
        ]
      },
      "ModerationController_BlocklistEntryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "default": false
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "active"
        ]
      },
      "ModerationController_BlocklistUpsertRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ModerationController_BlocklistsResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModerationController_BlocklistEntryResponse"
            }
          }
        }
      },
      "ModerationController_PolicyPacksResponse": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModerationPackState"
            }
          }
        }
      },
      "ModerationController_PolicyPacksUpdateRequest": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "packs": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        }
      },
      "ModerationController_ReviewDecisionRequest": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "decision": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "ModerationController_ReviewItemResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string"
          },
          "packId": {
            "type": "string"
          },
          "decidingLayer": {
            "type": "string"
          },
          "confidence": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "reason": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "reviewedBy": {
            "type": "string"
          },
          "reviewedAt": {
            "type": "string"
          },
          "reviewNotes": {
            "type": "string"
          }
        },
        "required": [
          "confidence"
        ]
      },
      "ModerationController_ReviewQueueResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModerationController_ReviewItemResponse"
            }
          },
          "pendingCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "pendingCount"
        ]
      },
      "ModerationController_ThresholdsUpdateRequest": {
        "type": "object",
        "properties": {
          "moderationEnabled": {
            "type": "boolean"
          },
          "externalClassifierEnabled": {
            "type": "boolean"
          },
          "packs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ModerationThresholdService_PackThresholdsUpdate"
            }
          }
        }
      },
      "ModerationPackState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enforcement": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "defaultEnabled": {
            "type": "boolean",
            "default": false
          },
          "available": {
            "type": "boolean",
            "default": false
          },
          "unavailableReason": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "scopeOfEffectiveValue": {
            "$ref": "#/components/schemas/ModerationPolicyScope"
          },
          "explicitlySetAtThisScope": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "defaultEnabled",
          "available",
          "explicitlySetAtThisScope"
        ]
      },
      "ModerationPolicyScope": {
        "type": "string",
        "enum": [
          "GLOBAL",
          "PLAN",
          "TENANT"
        ]
      },
      "ModerationRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "ModerationReviewDecisionRequest": {
        "type": "object",
        "properties": {
          "notes": {
            "type": "string",
            "maxLength": 4000
          }
        }
      },
      "ModerationReviewItemResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "policyPack": {
            "type": "string"
          },
          "decidingLayer": {
            "type": "string"
          },
          "confidence": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "$ref": "#/components/schemas/ModerationReviewStatus"
          },
          "reason": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "reviewedBy": {
            "type": "string"
          },
          "reviewedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reviewNotes": {
            "type": "string"
          }
        },
        "required": [
          "confidence"
        ]
      },
      "ModerationReviewStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "APPROVED",
          "BLOCKED",
          "ESCALATED"
        ]
      },
      "ModerationThresholdService_PackThresholds": {
        "type": "object",
        "properties": {
          "semanticEnabled": {
            "type": "boolean",
            "default": false
          },
          "reviewThreshold": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "blockThreshold": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "semanticEnabled",
          "reviewThreshold",
          "blockThreshold"
        ]
      },
      "ModerationThresholdService_PackThresholdsUpdate": {
        "type": "object",
        "properties": {
          "semanticEnabled": {
            "type": "boolean"
          },
          "reviewThreshold": {
            "type": "integer",
            "format": "int32"
          },
          "blockThreshold": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ModerationThresholdService_Thresholds": {
        "type": "object",
        "properties": {
          "moderationEnabled": {
            "type": "boolean",
            "default": false
          },
          "externalClassifierEnabled": {
            "type": "boolean",
            "default": false
          },
          "packs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ModerationThresholdService_PackThresholds"
            }
          }
        },
        "required": [
          "moderationEnabled",
          "externalClassifierEnabled"
        ]
      },
      "NewsletterRecipient": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "adminEmail": {
            "type": "string"
          },
          "newsOptIn": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "newsOptIn"
        ]
      },
      "NewsletterSendRequest": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "bodyHtml": {
            "type": "string"
          },
          "bodyText": {
            "type": "string"
          },
          "recipientTenantIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "NewsletterSendResult": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "sent",
          "skipped"
        ]
      },
      "NodeTraceEntry": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "nodeType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "logLines": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "durationMs": {
            "type": "integer",
            "format": "int64"
          },
          "inputJson": {
            "type": "string"
          },
          "outputJson": {
            "type": "string"
          },
          "inputTruncated": {
            "type": "boolean"
          },
          "outputTruncated": {
            "type": "boolean"
          },
          "tokensIn": {
            "type": "integer",
            "format": "int64"
          },
          "tokensOut": {
            "type": "integer",
            "format": "int64"
          },
          "costUsd": {
            "type": "number"
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeTraceEntry_ToolCallTrace"
            }
          }
        }
      },
      "NodeTraceEntry_ToolCallTrace": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "input": {
            "type": "string"
          },
          "output": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMs": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "NorthStarDtos_ChannelPoint": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "runs": {
            "type": "integer",
            "format": "int64"
          },
          "successRate": {
            "type": "number",
            "format": "double"
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "suppressed"
        ]
      },
      "NorthStarDtos_CohortPoint": {
        "type": "object",
        "properties": {
          "weekStart": {
            "type": "string",
            "format": "date"
          },
          "signups": {
            "type": "integer",
            "format": "int64"
          },
          "activated": {
            "type": "integer",
            "format": "int64"
          },
          "medianMinutes": {
            "type": "number",
            "format": "double"
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "suppressed"
        ]
      },
      "NorthStarDtos_Coverage": {
        "type": "object",
        "properties": {
          "tenantsTotal": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsScanned": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsSkipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "tenantsTotal",
          "tenantsScanned",
          "tenantsSkipped",
          "truncated"
        ]
      },
      "NorthStarDtos_LanguagePoint": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string"
          },
          "conversations": {
            "type": "integer",
            "format": "int64"
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "suppressed"
        ]
      },
      "NorthStarDtos_NorthStarResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "weeks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NorthStarDtos_WeekPoint"
            }
          },
          "timeToFirstRunMedianMinutes": {
            "type": "number",
            "format": "double"
          },
          "timeToFirstRunCohorts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NorthStarDtos_CohortPoint"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NorthStarDtos_LanguagePoint"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NorthStarDtos_ChannelPoint"
            }
          },
          "passK": {
            "$ref": "#/components/schemas/NorthStarDtos_PassK"
          },
          "coverage": {
            "$ref": "#/components/schemas/NorthStarDtos_Coverage"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "NorthStarDtos_PassK": {
        "type": "object",
        "properties": {
          "average": {
            "type": "number",
            "format": "double"
          },
          "cases": {
            "type": "integer",
            "format": "int64"
          },
          "byK": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NorthStarDtos_PassKGroup"
            }
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "suppressed"
        ]
      },
      "NorthStarDtos_PassKGroup": {
        "type": "object",
        "properties": {
          "k": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cases": {
            "type": "integer",
            "format": "int64"
          },
          "passPowK": {
            "type": "number",
            "format": "double"
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "k",
          "suppressed"
        ]
      },
      "NorthStarDtos_WeekPoint": {
        "type": "object",
        "properties": {
          "weekStart": {
            "type": "string",
            "format": "date"
          },
          "partial": {
            "type": "boolean",
            "default": false
          },
          "wau": {
            "type": "integer",
            "format": "int64"
          },
          "runs": {
            "type": "integer",
            "format": "int64"
          },
          "scheduledShare": {
            "type": "number",
            "format": "double"
          },
          "successRate": {
            "type": "number",
            "format": "double"
          },
          "runsByKind": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "suppressed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "partial",
          "suppressed"
        ]
      },
      "NotificationCategory": {
        "type": "string",
        "enum": [
          "SYSTEM",
          "TOOL_FAILURE",
          "BILLING",
          "SAFETY",
          "WORKFLOW",
          "AGENT"
        ]
      },
      "NotificationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "$ref": "#/components/schemas/NotificationCategory"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/NotificationSeverity"
          },
          "read": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "link": {
            "type": "string"
          },
          "relatedIssueId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "read"
        ]
      },
      "NotificationSeverity": {
        "type": "string",
        "enum": [
          "INFO",
          "WARNING",
          "ERROR"
        ]
      },
      "OAuthProviderController_AuthorizeRequest": {
        "type": "object",
        "properties": {
          "returnTo": {
            "type": "string"
          }
        }
      },
      "OAuthProviderController_AuthorizeResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          }
        }
      },
      "OAuthProviderController_DisconnectResponse": {
        "type": "object",
        "properties": {
          "disconnected": {
            "type": "boolean",
            "default": false
          },
          "providerRevocation": {
            "type": "string"
          }
        },
        "required": [
          "disconnected"
        ]
      },
      "OAuthProviderController_ProvidersResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OAuthProviderService_ProviderView"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "OAuthProviderService_ProviderView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "notConfiguredReason": {
            "type": "string"
          },
          "connected": {
            "type": "boolean",
            "default": false
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revocable": {
            "type": "boolean",
            "default": false
          },
          "registersMcpServer": {
            "type": "boolean",
            "default": false
          },
          "redirectUri": {
            "type": "string"
          },
          "docsUrl": {
            "type": "string"
          }
        },
        "required": [
          "configured",
          "connected",
          "revocable",
          "registersMcpServer"
        ]
      },
      "OcrProvider": {
        "type": "string",
        "enum": [
          "GOOGLE_VISION",
          "AWS_TEXTRACT",
          "AZURE_DOCUMENT_INTELLIGENCE"
        ]
      },
      "OcrProviderActivationRequest": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/OcrProvider"
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "provider",
          "apiKey"
        ]
      },
      "OcrProviderStatusResponse": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/OcrProvider"
          }
        }
      },
      "OnboardingRequest": {
        "type": "object",
        "properties": {
          "orgName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "newsOptIn": {
            "type": "boolean"
          },
          "demoToken": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "orgName"
        ]
      },
      "OpenAiChatRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenAiChatRequest_Message"
            }
          },
          "stream": {
            "type": "boolean"
          },
          "stream_options": {
            "$ref": "#/components/schemas/OpenAiChatRequest_StreamOptions"
          }
        }
      },
      "OpenAiChatRequest_Message": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {},
          "name": {
            "type": "string"
          }
        }
      },
      "OpenAiChatRequest_StreamOptions": {
        "type": "object",
        "properties": {
          "include_usage": {
            "type": "boolean"
          }
        }
      },
      "OpenApiPreviewRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "toolPrefix": {
            "type": "string"
          },
          "specUrl": {
            "type": "string"
          },
          "specText": {
            "type": "string"
          }
        }
      },
      "OpenApiPreviewResponse": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "serverUrl": {
            "type": "string"
          },
          "suggestedBaseUrl": {
            "type": "string"
          },
          "toolPrefix": {
            "type": "string"
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpenApiPreviewResponse_OperationPreview"
            }
          }
        }
      },
      "OpenApiPreviewResponse_OperationPreview": {
        "type": "object",
        "properties": {
          "operationKey": {
            "type": "string"
          },
          "suggestedToolName": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "deprecated": {
            "type": "boolean",
            "default": false
          },
          "bodyMode": {
            "type": "string"
          },
          "inputSchemaJson": {
            "type": "string"
          }
        },
        "required": [
          "deprecated"
        ]
      },
      "OpenApiToolResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "toolName": {
            "type": "string"
          },
          "operationKey": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "httpMethod": {
            "type": "string"
          },
          "pathTemplate": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "bodyMode": {
            "type": "string"
          },
          "inputSchemaJson": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "deprecated": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "deprecated"
        ]
      },
      "OpenApiToolSourceRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "toolPrefix": {
            "type": "string"
          },
          "specUrl": {
            "type": "string"
          },
          "specText": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "authType": {
            "type": "string"
          },
          "authHeaderName": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "maxLength": 4096
          },
          "oauth2TokenUrl": {
            "type": "string"
          },
          "oauth2ClientId": {
            "type": "string"
          },
          "oauth2Scope": {
            "type": "string"
          },
          "oauth2TokenStyle": {
            "type": "string"
          },
          "enabledOperationKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "OpenApiToolSourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "toolPrefix": {
            "type": "string"
          },
          "specUrl": {
            "type": "string"
          },
          "specTitle": {
            "type": "string"
          },
          "specVersion": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "authType": {
            "type": "string"
          },
          "authHeaderName": {
            "type": "string"
          },
          "oauth2TokenUrl": {
            "type": "string"
          },
          "oauth2ClientId": {
            "type": "string"
          },
          "oauth2Scope": {
            "type": "string"
          },
          "oauth2TokenStyle": {
            "type": "string"
          },
          "hasSecret": {
            "type": "boolean",
            "default": false
          },
          "secretPreview": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "toolCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "enabledToolCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "lastRefreshedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastError": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "hasSecret",
          "enabled",
          "toolCount",
          "enabledToolCount"
        ]
      },
      "OpenApiToolTestRequest": {
        "type": "object",
        "properties": {
          "inputJson": {
            "type": "string"
          }
        }
      },
      "OpenResponsesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "input": {},
          "instructions": {},
          "temperature": {
            "type": "number",
            "format": "double"
          },
          "max_output_tokens": {
            "type": "integer",
            "format": "int32"
          },
          "stream": {
            "type": "boolean"
          },
          "metadata": {},
          "previous_response_id": {
            "type": "string"
          },
          "tools": {},
          "tool_choice": {},
          "background": {
            "type": "boolean"
          },
          "conversation": {}
        }
      },
      "OperatorInboxController_ConversationPageResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperatorInboxController_ConversationSummary"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "total",
          "page",
          "totalPages"
        ]
      },
      "OperatorInboxController_ConversationSummary": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "externalIdMasked": {
            "type": "string"
          },
          "resolvedPhoneMasked": {
            "type": "string"
          },
          "paired": {
            "type": "boolean",
            "default": false
          },
          "pairingCode": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "handoffState": {
            "$ref": "#/components/schemas/HandoffState"
          },
          "escalationReason": {
            "type": "string"
          },
          "escalatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "takenOverBy": {
            "type": "string"
          },
          "takenOverAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessagePreview": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "paired"
        ]
      },
      "OperatorInboxController_EscalateRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "OperatorInboxController_InboxSessionResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "externalIdMasked": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "handoffState": {
            "$ref": "#/components/schemas/HandoffState"
          },
          "escalationReason": {
            "type": "string"
          },
          "escalatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "takenOverBy": {
            "type": "string"
          },
          "takenOverAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessagePreview": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OperatorInboxController_ReplyRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "body"
        ]
      },
      "OperatorInboxService_InboxStats": {
        "type": "object",
        "properties": {
          "waitingHuman": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "held": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "pendingPairing": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "agentHandled": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "waitingHuman",
          "held",
          "pendingPairing",
          "agentHandled",
          "total"
        ]
      },
      "Page_DocumentGenerationJobResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentGenerationJobResponse"
            }
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "content"
        ]
      },
      "PairingCodeResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PaymentCheckoutController_CreateOrderRequest": {
        "type": "object",
        "properties": {
          "amountInSubunits": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "receipt": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          }
        },
        "required": [
          "amountInSubunits"
        ]
      },
      "PaymentCheckoutController_CreateOrderResponse": {
        "type": "object",
        "properties": {
          "gateway": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "keyId": {
            "type": "string"
          },
          "publicKeyId": {
            "type": "string"
          },
          "checkoutMode": {
            "$ref": "#/components/schemas/CheckoutMode"
          },
          "checkoutUrl": {
            "type": "string"
          }
        },
        "required": [
          "amount"
        ]
      },
      "PaymentCheckoutController_GatewayListResponse": {
        "type": "object",
        "properties": {
          "defaultGateway": {
            "type": "string"
          },
          "gateways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GatewayInfo"
            }
          }
        }
      },
      "PaymentCheckoutController_VerifyPaymentRequest": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string"
          },
          "paymentId": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          }
        }
      },
      "PaymentCheckoutController_VerifyPaymentResponse": {
        "type": "object",
        "properties": {
          "verified": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "verified"
        ]
      },
      "PaymentDtos_CreateMandateRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "$ref": "#/components/schemas/MandateScope"
          },
          "maxPerTxnPaise": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "maxDailyPaise": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "maxMonthlyPaise": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "allowedVpas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedMerchantCategories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approvalPolicy": {
            "$ref": "#/components/schemas/MandateApprovalPolicy"
          },
          "approvalThresholdPaise": {
            "type": "integer",
            "format": "int64"
          },
          "validFrom": {
            "type": "string",
            "format": "date-time"
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "agentId",
          "scope",
          "maxPerTxnPaise",
          "maxDailyPaise",
          "maxMonthlyPaise",
          "approvalPolicy",
          "validFrom",
          "validUntil"
        ]
      },
      "PaymentDtos_MandatePreviewResponse": {
        "type": "object",
        "properties": {
          "canonicalJson": {
            "type": "string"
          },
          "canonicalHashSha256": {
            "type": "string"
          }
        }
      },
      "PaymentDtos_MandateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "grantedByUserId": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/MandateScope"
          },
          "maxPerTxnPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxDailyPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxMonthlyPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "allowedVpas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedMerchantCategories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approvalPolicy": {
            "$ref": "#/components/schemas/MandateApprovalPolicy"
          },
          "approvalThresholdPaise": {
            "type": "integer",
            "format": "int64"
          },
          "validFrom": {
            "type": "string",
            "format": "date-time"
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/MandateStatus"
          },
          "canonicalHashSha256": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedBy": {
            "type": "string"
          },
          "revokeReason": {
            "type": "string"
          }
        },
        "required": [
          "maxPerTxnPaise",
          "maxDailyPaise",
          "maxMonthlyPaise"
        ]
      },
      "PaymentDtos_MandateSpendResponse": {
        "type": "object",
        "properties": {
          "mandateId": {
            "type": "string",
            "format": "uuid"
          },
          "maxPerTxnPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxDailyPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxMonthlyPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "dailySpendPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "monthlySpendPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "maxPerTxnPaise",
          "maxDailyPaise",
          "maxMonthlyPaise",
          "dailySpendPaise",
          "monthlySpendPaise"
        ]
      },
      "PaymentDtos_RevokeMandateRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "PaymentDtos_TransactionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "mandateId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/PaymentTransactionType"
          },
          "amountPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "vpa": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "merchantCategory": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentTransactionStatus"
          },
          "approvalId": {
            "type": "string",
            "format": "uuid"
          },
          "shortUrl": {
            "type": "string"
          },
          "receiptUrl": {
            "type": "string"
          },
          "gatewayPaymentId": {
            "type": "string"
          },
          "failureReason": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amountPaise"
        ]
      },
      "PaymentTransactionStatus": {
        "type": "string",
        "enum": [
          "INITIATED",
          "PENDING_APPROVAL",
          "AWAITING_PAYMENT",
          "CAPTURED",
          "FAILED",
          "EXPIRED",
          "REFUNDED"
        ]
      },
      "PaymentTransactionType": {
        "type": "string",
        "enum": [
          "PAYMENT_LINK",
          "UPI_COLLECT",
          "PAYOUT"
        ]
      },
      "PerUserBudgetConfigUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "dailyUsd": {
            "type": "number"
          },
          "windowSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "splitPct": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "fallbackUsdPer1kTokens": {
            "type": "number"
          }
        }
      },
      "PerUserBudgetService_BudgetConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "dailyUsd": {
            "type": "number"
          },
          "windowSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "splitPct": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "fallbackUsdPer1kTokens": {
            "type": "number"
          }
        },
        "required": [
          "enabled",
          "windowSeconds"
        ]
      },
      "PerUserBudgetService_BudgetStatus": {
        "type": "object",
        "properties": {
          "modality": {
            "type": "string"
          },
          "capUsd": {
            "type": "number"
          },
          "spentUsd": {
            "type": "number"
          },
          "remainingUsd": {
            "type": "number"
          },
          "resetSeconds": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PermissionLevel": {
        "type": "string",
        "enum": [
          "RUNNER",
          "VIEWER",
          "EDITOR"
        ]
      },
      "PilotDtos_BaselineRequest": {
        "type": "object",
        "properties": {
          "jobType": {
            "type": "string"
          },
          "baselinePeriod": {
            "type": "string"
          },
          "monthlyVolume": {
            "type": "number"
          },
          "avgHandlingMinutes": {
            "type": "number"
          },
          "missedRate": {
            "type": "number"
          },
          "avgValuePerConversion": {
            "type": "number"
          },
          "valueCurrency": {
            "type": "string"
          }
        }
      },
      "PilotDtos_BaselineResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "jobType": {
            "type": "string"
          },
          "baselinePeriod": {
            "type": "string"
          },
          "monthlyVolume": {
            "type": "number"
          },
          "avgHandlingMinutes": {
            "type": "number"
          },
          "missedRate": {
            "type": "number"
          },
          "avgValuePerConversion": {
            "type": "number"
          },
          "valueCurrency": {
            "type": "string"
          },
          "enteredBy": {
            "type": "string"
          },
          "enteredAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "PilotDtos_DemoStatus": {
        "type": "object",
        "properties": {
          "demo": {
            "type": "boolean",
            "default": false
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "demo"
        ]
      },
      "PlanLimitsResponse": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "maxUsers": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxAgents": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxWorkflows": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxKbCollections": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "byokAllowed": {
            "type": "boolean",
            "default": false
          },
          "whatsappAllowed": {
            "type": "boolean",
            "default": false
          },
          "whiteLabel": {
            "type": "boolean",
            "default": false
          },
          "liveVisionAllowed": {
            "type": "boolean",
            "default": false
          },
          "externalChannelsAllowed": {
            "type": "boolean",
            "default": false
          },
          "developerApiAllowed": {
            "type": "boolean",
            "default": false
          },
          "ssoAllowed": {
            "type": "boolean",
            "default": false
          },
          "scimAllowed": {
            "type": "boolean",
            "default": false
          },
          "workflowExportAllowed": {
            "type": "boolean",
            "default": false
          },
          "automationAllowed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "maxUsers",
          "maxAgents",
          "maxWorkflows",
          "maxKbCollections",
          "byokAllowed",
          "whatsappAllowed",
          "whiteLabel",
          "liveVisionAllowed",
          "externalChannelsAllowed",
          "developerApiAllowed",
          "ssoAllowed",
          "scimAllowed",
          "workflowExportAllowed",
          "automationAllowed"
        ]
      },
      "PlanLimitsUpdateRequest": {
        "type": "object",
        "properties": {
          "maxUsers": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxAgents": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxWorkflows": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxKbCollections": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "byokAllowed": {
            "type": "boolean",
            "default": false
          },
          "whatsappAllowed": {
            "type": "boolean",
            "default": false
          },
          "whiteLabel": {
            "type": "boolean",
            "default": false
          },
          "liveVisionAllowed": {
            "type": "boolean"
          },
          "externalChannelsAllowed": {
            "type": "boolean"
          },
          "developerApiAllowed": {
            "type": "boolean"
          },
          "ssoAllowed": {
            "type": "boolean"
          },
          "scimAllowed": {
            "type": "boolean"
          },
          "workflowExportAllowed": {
            "type": "boolean"
          },
          "automationAllowed": {
            "type": "boolean"
          }
        },
        "required": [
          "maxUsers",
          "maxAgents",
          "maxWorkflows",
          "maxKbCollections",
          "byokAllowed",
          "whatsappAllowed",
          "whiteLabel"
        ]
      },
      "PlanRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "locale": {
            "type": "string",
            "maxLength": 16
          },
          "context": {
            "type": "object",
            "additionalProperties": true
          },
          "depth": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "prompt"
        ]
      },
      "PlatformActivityEntry": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "entryId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/AuditOutcome"
          },
          "detail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PlatformAuditSearchService_AuditRow": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "tenantName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PlatformAuditSearchService_SearchResult": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformAuditSearchService_AuditRow"
            }
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "tenantsScanned": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsInScope": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsFailed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rowLimit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTenants": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hasMore": {
            "type": "boolean",
            "default": false
          },
          "knownTotal": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "truncated",
          "tenantsScanned",
          "tenantsInScope",
          "tenantsFailed",
          "rowLimit",
          "maxTenants",
          "offset",
          "hasMore",
          "knownTotal"
        ]
      },
      "PlatformBillingService_BillingSummary": {
        "type": "object",
        "properties": {
          "liveTenants": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tenantsByPlan": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "tenantsBySubscriptionStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "activeCompGrants": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "compGrantsExpiringWithin7d": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "compGrantsOverdueForRevert": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "pastDue": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cancelScheduled": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "pendingUpgrade": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "invoiceTotals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBillingService_CurrencyTotal"
            }
          }
        },
        "required": [
          "liveTenants",
          "activeCompGrants",
          "compGrantsExpiringWithin7d",
          "compGrantsOverdueForRevert",
          "pastDue",
          "cancelScheduled",
          "pendingUpgrade"
        ]
      },
      "PlatformBillingService_CompGrantList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBillingService_CompGrantRow"
            }
          }
        },
        "required": [
          "total"
        ]
      },
      "PlatformBillingService_CompGrantRow": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "planBeforeComp": {
            "type": "string"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          },
          "overdue": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "overdue"
        ]
      },
      "PlatformBillingService_CurrencyTotal": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "invoices": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "gstMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "invoicesLast30d": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "amountMinorLast30d": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "invoices",
          "amountMinor",
          "gstMinor",
          "invoicesLast30d",
          "amountMinorLast30d"
        ]
      },
      "PlatformBillingService_InvoiceList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBillingService_InvoiceRow"
            }
          }
        },
        "required": [
          "count"
        ]
      },
      "PlatformBillingService_InvoiceRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "tenantName": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          },
          "gatewayPaymentId": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "gstAmountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amountMinor",
          "gstAmountMinor"
        ]
      },
      "PlatformBillingService_SubscriptionList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "scanTruncated": {
            "type": "boolean",
            "default": false
          },
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformBillingService_SubscriptionRow"
            }
          }
        },
        "required": [
          "total",
          "scanTruncated"
        ]
      },
      "PlatformBillingService_SubscriptionRow": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "paymentGateway": {
            "type": "string"
          },
          "gatewaySubscriptionId": {
            "type": "string"
          },
          "subscriptionStatus": {
            "type": "string"
          },
          "trialEndsAt": {
            "type": "string",
            "format": "date-time"
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "pastDueSince": {
            "type": "string",
            "format": "date-time"
          },
          "cancelScheduled": {
            "type": "boolean",
            "default": false
          },
          "pendingPlan": {
            "type": "string"
          },
          "compExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "compGrantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "compReason": {
            "type": "string"
          },
          "planBeforeComp": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "cancelScheduled"
        ]
      },
      "PlatformBroadcastService_AnnouncementState": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "linkUrl": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PlatformBroadcastService_AnnouncementUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "linkUrl": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        }
      },
      "PlatformBroadcastService_MaintenanceState": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PlatformBroadcastService_MaintenanceUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "endsAt": {
            "type": "string"
          }
        }
      },
      "PlatformBroadcastService_PublicAnnouncement": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "linkUrl": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PlatformBroadcastService_PublicMaintenance": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PlatformCircuitBreakerController_Config": {
        "type": "object",
        "properties": {
          "failureThreshold": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "windowMinutes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cooldownMinutes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "failureThreshold",
          "windowMinutes",
          "cooldownMinutes"
        ]
      },
      "PlatformCircuitBreakerController_Entry": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "open": {
            "type": "boolean",
            "default": false
          },
          "cooldownSecondsRemaining": {
            "type": "integer",
            "format": "int64"
          },
          "reopensAt": {
            "type": "string",
            "format": "date-time"
          },
          "consecutiveFailures": {
            "type": "integer",
            "format": "int64"
          },
          "lastError": {
            "type": "string"
          }
        },
        "required": [
          "open"
        ]
      },
      "PlatformCircuitBreakerController_Listing": {
        "type": "object",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/PlatformCircuitBreakerController_Config"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformCircuitBreakerController_Entry"
            }
          },
          "openCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "openCount",
          "truncated"
        ]
      },
      "PlatformCircuitBreakerController_ResetRequest": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          }
        }
      },
      "PlatformCircuitBreakerController_ResetResult": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "wasOpen": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "wasOpen"
        ]
      },
      "PlatformController_DiscoverHostedModelsRequest": {
        "type": "object",
        "properties": {
          "baseUrl": {
            "type": "string"
          },
          "apiKey": {
            "type": "string"
          },
          "completionsPath": {
            "type": "string"
          }
        }
      },
      "PlatformController_DiscoverHostedModelsResponse": {
        "type": "object",
        "properties": {
          "models": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PlatformController_ModelCatalogRefreshResult": {
        "type": "object",
        "properties": {
          "refreshedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PlatformEmailSuppressionService_SuppressionItem": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenantId": {
            "type": "string"
          }
        }
      },
      "PlatformEmailSuppressionService_SuppressionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformEmailSuppressionService_SuppressionItem"
            }
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "total"
        ]
      },
      "PlatformFallbackAlertStatus": {
        "type": "object",
        "properties": {
          "threshold": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalFallbackTriggered": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalFallbackFailures": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "alertActive": {
            "type": "boolean",
            "default": false
          },
          "tenantBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformTenantFallbackSummary"
            }
          }
        },
        "required": [
          "threshold",
          "totalFallbackTriggered",
          "totalFallbackFailures",
          "alertActive"
        ]
      },
      "PlatformFeatureBudgetService_FeatureConfig": {
        "type": "object",
        "properties": {
          "featureKey": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "dailyUsd": {
            "type": "number"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PlatformFeatureBudgetService_GlobalConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "windowSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "masterDailyUsd": {
            "type": "number"
          },
          "defaultFeatureDailyUsd": {
            "type": "number"
          }
        },
        "required": [
          "enabled",
          "windowSeconds"
        ]
      },
      "PlatformHostedLlmActiveResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "label": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        },
        "required": [
          "available"
        ]
      },
      "PlatformHostedLlmBudgetUpdateRequest": {
        "type": "object",
        "properties": {
          "budgetUsd": {
            "type": "number"
          }
        }
      },
      "PlatformHostedLlmCostDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          }
        },
        "required": [
          "totalCalls",
          "totalTokens"
        ]
      },
      "PlatformHostedLlmCostSummary": {
        "type": "object",
        "properties": {
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "budgetUsd": {
            "type": "number"
          },
          "remainingBudgetUsd": {
            "type": "number"
          },
          "byTenant": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformHostedLlmCostSummary_PlatformTenantHostedLlmCost"
            }
          }
        },
        "required": [
          "totalCalls",
          "errorCount",
          "totalTokens"
        ]
      },
      "PlatformHostedLlmCostSummary_PlatformTenantHostedLlmCost": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          }
        },
        "required": [
          "totalCalls",
          "totalTokens"
        ]
      },
      "PlatformHostedLlmProviderResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "label": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "priority": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "region": {
            "type": "string"
          },
          "completionsPath": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "providerName": {
            "type": "string"
          },
          "modelAutoSelected": {
            "type": "boolean",
            "default": false
          },
          "authType": {
            "type": "string"
          },
          "vertexProjectId": {
            "type": "string"
          },
          "vertexLocation": {
            "type": "string"
          },
          "zeroCost": {
            "type": "boolean",
            "default": false
          },
          "toolCallGrade": {
            "type": "string"
          },
          "toolRouterMode": {
            "type": "string"
          },
          "toolRouterEnabled": {
            "type": "boolean"
          },
          "toolRouterActive": {
            "type": "string"
          },
          "parameterBillions": {
            "type": "number",
            "format": "double"
          },
          "smallModel": {
            "type": "boolean"
          },
          "smallModelActive": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "priority",
          "modelAutoSelected",
          "zeroCost",
          "smallModelActive"
        ]
      },
      "PlatformHostedLlmProviderUpsertRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "apiKey": {
            "type": "string",
            "maxLength": 4096
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "priority": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "region": {
            "type": "string"
          },
          "completionsPath": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "authType": {
            "type": "string"
          },
          "vertexProjectId": {
            "type": "string"
          },
          "vertexLocation": {
            "type": "string"
          },
          "zeroCost": {
            "type": "boolean"
          },
          "toolRouterEnabled": {
            "type": "boolean"
          },
          "smallModel": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "priority"
        ]
      },
      "PlatformImpersonationController_StartRequest": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "PlatformIssueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/IssueSource"
          },
          "sourceId": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/IssueCategory"
          },
          "severity": {
            "$ref": "#/components/schemas/IssueSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/IssueStatus"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "occurrenceCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledgedBy": {
            "type": "string"
          },
          "acknowledgedAt": {
            "type": "string",
            "format": "date-time"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "occurrenceCount"
        ]
      },
      "PlatformIssueSummary": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "issueId": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "$ref": "#/components/schemas/IssueSource"
          },
          "sourceId": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/IssueSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/IssueStatus"
          },
          "title": {
            "type": "string"
          },
          "occurrenceCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "occurrenceCount"
        ]
      },
      "PlatformKillSwitchStatus": {
        "type": "object",
        "properties": {
          "stopped": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "stoppedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "stopped"
        ]
      },
      "PlatformLlmTaskConfigResponse": {
        "type": "object",
        "properties": {
          "task": {
            "$ref": "#/components/schemas/PlatformTask"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "hasCredential": {
            "type": "boolean",
            "default": false
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "configured": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "hasCredential",
          "configured"
        ]
      },
      "PlatformLlmTaskUpsertRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "apiKey": {
            "type": "string",
            "maxLength": 4096
          }
        }
      },
      "PlatformMigrationService_MigrationCounts": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "pending": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "pending",
          "failed"
        ]
      },
      "PlatformMigrationService_MigrationsResponse": {
        "type": "object",
        "properties": {
          "controlPlane": {
            "$ref": "#/components/schemas/PlatformMigrationService_MigrationCounts"
          },
          "expectedTenantVersion": {
            "type": "string"
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformMigrationService_TenantMigration"
            }
          }
        }
      },
      "PlatformMigrationService_TenantMigration": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schema": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "pending": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "pending",
          "failed"
        ]
      },
      "PlatformObservabilityService_OpenIssueCount": {
        "type": "object",
        "properties": {
          "open": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "failedTenants": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "open",
          "failedTenants"
        ]
      },
      "PlatformSettingResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PlatformSettingUpdateRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          }
        }
      },
      "PlatformSpendCapController_SpendCapUpdate": {
        "type": "object",
        "properties": {
          "capUsd": {
            "type": "number"
          }
        }
      },
      "PlatformSpendService_DayReport": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PlatformSpendService_Meta"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformSpendService_DayRow"
            }
          }
        }
      },
      "PlatformSpendService_DayRow": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "allProviders": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          },
          "hostedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "hostedCostUsd": {
            "type": "number"
          }
        },
        "required": [
          "hostedCalls"
        ]
      },
      "PlatformSpendService_Meta": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "tenantsTotal": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsScanned": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tenantsFailed": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "includesLiveToday": {
            "type": "boolean",
            "default": false
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "tenantsTotal",
          "tenantsScanned",
          "tenantsFailed",
          "truncated",
          "includesLiveToday"
        ]
      },
      "PlatformSpendService_Metrics": {
        "type": "object",
        "properties": {
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "totalCalls",
          "errorCount",
          "promptTokens",
          "completionTokens",
          "totalTokens"
        ]
      },
      "PlatformSpendService_ModelReport": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PlatformSpendService_Meta"
          },
          "totalRows": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformSpendService_ModelRow"
            }
          }
        },
        "required": [
          "totalRows"
        ]
      },
      "PlatformSpendService_ModelRow": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "modality": {
            "type": "string"
          },
          "allProviders": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          }
        }
      },
      "PlatformSpendService_ProviderReport": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PlatformSpendService_Meta"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformSpendService_ProviderRow"
            }
          }
        }
      },
      "PlatformSpendService_ProviderRow": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "hostedPool": {
            "type": "boolean",
            "default": false
          },
          "metrics": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          }
        },
        "required": [
          "hostedPool"
        ]
      },
      "PlatformSpendService_SummaryReport": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PlatformSpendService_Meta"
          },
          "allProviders": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          },
          "hostedPool": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          }
        }
      },
      "PlatformSpendService_TenantReport": {
        "type": "object",
        "properties": {
          "meta": {
            "$ref": "#/components/schemas/PlatformSpendService_Meta"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformSpendService_TenantRow"
            }
          }
        }
      },
      "PlatformSpendService_TenantRow": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "allProviders": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          },
          "hostedPool": {
            "$ref": "#/components/schemas/PlatformSpendService_Metrics"
          }
        }
      },
      "PlatformTask": {
        "type": "string",
        "enum": [
          "TRANSLATION_REFRESH",
          "ASK_AI_HELPER"
        ]
      },
      "PlatformTenantCounts": {
        "type": "object",
        "properties": {
          "registeredActive": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "demoLive": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "demoExpiredUnreclaimed": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "registeredActive",
          "demoLive",
          "demoExpiredUnreclaimed"
        ]
      },
      "PlatformTenantDataResidencyUpdateRequest": {
        "type": "object",
        "properties": {
          "region": {
            "$ref": "#/components/schemas/DataResidencyRegion"
          }
        }
      },
      "PlatformTenantDetailController_Quota": {
        "type": "object",
        "properties": {
          "tokensUsedMonth": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tokensMonthlyLimit": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "usesPlatformLlm": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "tokensUsedMonth",
          "tokensMonthlyLimit",
          "usesPlatformLlm"
        ]
      },
      "PlatformTenantDetailController_TenantDetail": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "schemaName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "accountType": {
            "type": "string"
          },
          "dataResidencyRegion": {
            "$ref": "#/components/schemas/DataResidencyRegion"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "emergencyStopped": {
            "type": "boolean",
            "default": false
          },
          "emergencyStopReason": {
            "type": "string"
          },
          "emergencyStoppedAt": {
            "type": "string",
            "format": "date-time"
          },
          "accessState": {
            "type": "string"
          },
          "subscriptionStatus": {
            "type": "string"
          },
          "pastDue": {
            "type": "boolean",
            "default": false
          },
          "compPlanExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "userCount": {
            "type": "integer",
            "format": "int64"
          },
          "agentCount": {
            "type": "integer",
            "format": "int64"
          },
          "workflowCount": {
            "type": "integer",
            "format": "int64"
          },
          "quota": {
            "$ref": "#/components/schemas/PlatformTenantDetailController_Quota"
          },
          "lastLlmCallAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLlmCallKnown": {
            "type": "boolean",
            "default": false
          },
          "unavailable": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "spend30dUsd": {
            "type": "number"
          }
        },
        "required": [
          "emergencyStopped",
          "pastDue",
          "lastLlmCallKnown"
        ]
      },
      "PlatformTenantDetailController_TenantRef": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "emergencyStopped": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "emergencyStopped"
        ]
      },
      "PlatformTenantFallbackSummary": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "fallbackTriggeredCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "fallbackFailedCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "fallbackTriggeredCount",
          "fallbackFailedCount"
        ]
      },
      "PlatformTenantLlmUsageSummary": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "tenantName": {
            "type": "string"
          },
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double"
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          }
        },
        "required": [
          "totalCalls",
          "errorCount",
          "totalTokens"
        ]
      },
      "PlatformTenantPlanUpdateRequest": {
        "type": "object",
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          }
        }
      },
      "PlatformTenantSummary": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "agentCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "workflowCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "userCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "metricsComplete": {
            "type": "boolean",
            "default": false
          },
          "emergencyStopped": {
            "type": "boolean",
            "default": false
          },
          "dataResidencyRegion": {
            "$ref": "#/components/schemas/DataResidencyRegion"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerEmail": {
            "type": "string"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "spend30dUsd": {
            "type": "number"
          },
          "hostedSpend30dUsd": {
            "type": "number"
          },
          "llmCalls30d": {
            "type": "integer",
            "format": "int64"
          },
          "spendCapUsd": {
            "type": "number"
          },
          "capMonthToDateUsd": {
            "type": "number"
          },
          "capBlocked": {
            "type": "boolean"
          }
        },
        "required": [
          "agentCount",
          "workflowCount",
          "userCount",
          "metricsComplete",
          "emergencyStopped"
        ]
      },
      "PlatformToolCredentialActivationRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "maxLength": 4096
          },
          "extraConfig": {
            "type": "string"
          }
        }
      },
      "PlatformToolCredentialStatusResponse": {
        "type": "object",
        "properties": {
          "toolKey": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "extraConfig": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "configured"
        ]
      },
      "PlatformTraceDtos_ObservationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "inputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "outputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "costUsd": {
            "type": "number",
            "format": "double"
          },
          "level": {
            "type": "string"
          },
          "statusMessage": {
            "type": "string"
          }
        }
      },
      "PlatformTraceDtos_TraceDayMetric": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "traces": {
            "type": "integer",
            "format": "int64"
          },
          "costUsd": {
            "type": "number",
            "format": "double"
          },
          "p50LatencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "p95LatencyMs": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PlatformTraceDtos_TraceDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "totalCostUsd": {
            "type": "number",
            "format": "double"
          },
          "inputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "outputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "level": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "input": {
            "type": "string"
          },
          "output": {
            "type": "string"
          }
        }
      },
      "PlatformTraceDtos_TraceDetailResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "trace": {
            "$ref": "#/components/schemas/PlatformTraceDtos_TraceDetail"
          },
          "observations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformTraceDtos_ObservationRow"
            }
          }
        },
        "required": [
          "available"
        ]
      },
      "PlatformTraceDtos_TraceListMeta": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalItems": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "page",
          "limit",
          "totalItems",
          "totalPages"
        ]
      },
      "PlatformTraceDtos_TraceListResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformTraceDtos_TraceRow"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PlatformTraceDtos_TraceListMeta"
          }
        },
        "required": [
          "available"
        ]
      },
      "PlatformTraceDtos_TraceMetricsResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "byDay": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformTraceDtos_TraceDayMetric"
            }
          },
          "byModel": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformTraceDtos_TraceModelMetric"
            }
          }
        },
        "required": [
          "available"
        ]
      },
      "PlatformTraceDtos_TraceModelMetric": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64"
          },
          "costUsd": {
            "type": "number",
            "format": "double"
          },
          "inputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "outputTokens": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PlatformTraceDtos_TraceRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "totalCostUsd": {
            "type": "number",
            "format": "double"
          },
          "inputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "outputTokens": {
            "type": "integer",
            "format": "int64"
          },
          "level": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PlatformUserController_ActionResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "ok"
        ]
      },
      "PlatformUserController_EnabledRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "PlatformUserController_RolesRequest": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "PlatformUserController_UserDetail": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PlatformUserController_UserRow"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requiredActions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PlatformUserController_UserListResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformUserController_UserRow"
            }
          }
        },
        "required": [
          "total"
        ]
      },
      "PlatformUserController_UserRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "emailVerified": {
            "type": "boolean",
            "default": false
          },
          "tenantId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenantName": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "emailVerified"
        ]
      },
      "PlatformVersionService_ServiceVersion": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "gitSha": {
            "type": "string"
          },
          "buildTime": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PlatformVersionService_VersionsResponse": {
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformVersionService_ServiceVersion"
            }
          }
        }
      },
      "PluginArtifactService_StoredArtifact": {
        "type": "object",
        "properties": {
          "pluginId": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "artifact": {
            "$ref": "#/components/schemas/PluginCatalogController_PluginArtifact"
          }
        }
      },
      "PluginCatalogController_PluginArtifact": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "sha256": {
            "type": "string"
          }
        },
        "required": [
          "sizeBytes"
        ]
      },
      "PluginCatalogController_PluginCatalog": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "plugins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PluginCatalogController_PluginEntry"
            }
          }
        }
      },
      "PluginCatalogController_PluginEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "latestVersion": {
            "type": "string"
          },
          "releasedAt": {
            "type": "string"
          },
          "releaseNotes": {
            "type": "string"
          },
          "artifact": {
            "$ref": "#/components/schemas/PluginCatalogController_PluginArtifact"
          },
          "externalStoreUrl": {
            "type": "string"
          }
        }
      },
      "PolicyArmRequest": {
        "type": "object",
        "properties": {
          "armKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "armConfigJson": {
            "type": "string",
            "minLength": 1
          },
          "contextBucket": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "armKey",
          "armConfigJson"
        ]
      },
      "PolicyArmResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "armKey": {
            "type": "string"
          },
          "armConfigJson": {
            "type": "string"
          },
          "contextBucket": {
            "type": "string"
          },
          "pulls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "alpha": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "beta": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "pulls",
          "alpha",
          "beta"
        ]
      },
      "PolicyDimension": {
        "type": "string",
        "enum": [
          "MODEL_ROUTE",
          "REASONING_DEPTH",
          "PROMPT_VARIANT",
          "TOOL_SUBSET",
          "GEN_PARAMS"
        ]
      },
      "PolicyUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "explorationRate": {
            "type": "number",
            "minimum": 0.0,
            "maximum": 1.0
          },
          "algorithm": {
            "$ref": "#/components/schemas/BanditAlgorithm"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PortabilityDtos_FidelityView": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "sourceNodes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "exact": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "needsReview": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "placeholders": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "skipped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "sourceConnections": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "connectionsKept": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "connectionsDropped": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "sourceNodes",
          "exact",
          "needsReview",
          "placeholders",
          "skipped",
          "sourceConnections",
          "connectionsKept",
          "connectionsDropped"
        ]
      },
      "PortabilityDtos_ImportResponse": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "validationIssues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "placeholders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortabilityDtos_PlaceholderView"
            }
          },
          "fidelity": {
            "$ref": "#/components/schemas/PortabilityDtos_FidelityView"
          },
          "report": {
            "$ref": "#/components/schemas/AgentImportDtos_ConversionReport"
          }
        }
      },
      "PortabilityDtos_PlaceholderView": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "mappable": {
            "type": "boolean",
            "default": false
          },
          "resolved": {
            "type": "boolean",
            "default": false
          },
          "mappedTo": {
            "type": "string"
          },
          "usedBy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortabilityDtos_UseView"
            }
          }
        },
        "required": [
          "mappable",
          "resolved"
        ]
      },
      "PortabilityDtos_PreviewResponse": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "detectedSource": {
            "type": "string"
          },
          "workflow": {
            "$ref": "#/components/schemas/PortabilityDtos_WorkflowView"
          },
          "placeholders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortabilityDtos_PlaceholderView"
            }
          },
          "validationIssues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fidelity": {
            "$ref": "#/components/schemas/PortabilityDtos_FidelityView"
          },
          "report": {
            "$ref": "#/components/schemas/AgentImportDtos_ConversionReport"
          }
        }
      },
      "PortabilityDtos_UseView": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        }
      },
      "PortabilityDtos_WorkflowView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          }
        }
      },
      "PrivacyController_ContactRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "minLength": 1
          },
          "externalId": {
            "type": "string",
            "minLength": 1
          },
          "includeLeads": {
            "type": "boolean",
            "default": false
          },
          "keepConsentProof": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "channel",
          "externalId",
          "includeLeads",
          "keepConsentProof"
        ]
      },
      "PrivacyController_PurposesRequest": {
        "type": "object",
        "properties": {
          "purposes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PrivacyController_RetentionRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "dataClass": {
            "$ref": "#/components/schemas/PrivacyDataClass"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "retentionDays": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "dataClass",
          "enabled"
        ]
      },
      "PrivacyDataClass": {
        "type": "string",
        "enum": [
          "TRANSCRIPT",
          "RECORDING",
          "EXTRACTED_FIELDS"
        ]
      },
      "ProcedureGuardKind": {
        "type": "string",
        "enum": [
          "FORBID_TOOL",
          "REQUIRE_APPROVAL",
          "REQUIRE_TOOL_BEFORE"
        ]
      },
      "ProcedureRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcedureRequest_RuleInput"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "ProcedureRequest_RuleInput": {
        "type": "object",
        "properties": {
          "instruction": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "guardKind": {
            "$ref": "#/components/schemas/ProcedureGuardKind"
          },
          "guardTool": {
            "type": "string",
            "maxLength": 255
          },
          "guardConfig": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "instruction"
        ]
      },
      "ProcedureResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ProcedureStatus"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcedureResponse_RuleView"
            }
          }
        }
      },
      "ProcedureResponse_RuleView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleOrder": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "instruction": {
            "type": "string"
          },
          "guardKind": {
            "$ref": "#/components/schemas/ProcedureGuardKind"
          },
          "guardTool": {
            "type": "string"
          },
          "guardConfig": {}
        },
        "required": [
          "ruleOrder"
        ]
      },
      "ProcedureStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "ACTIVE",
          "ARCHIVED"
        ]
      },
      "ProductCatalogController_ProductRequest": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "maxLength": 128
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "category": {
            "type": "string",
            "maxLength": 64
          },
          "pricePaise": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "default": 0
          },
          "currency": {
            "type": "string",
            "maxLength": 3
          },
          "availability": {
            "$ref": "#/components/schemas/CommerceProduct_ProductAvailability"
          },
          "imageUrl": {
            "type": "string",
            "maxLength": 1024
          },
          "productUrl": {
            "type": "string",
            "maxLength": 1024
          },
          "published": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "name",
          "pricePaise",
          "published"
        ]
      },
      "ProductCatalogController_ProductResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "pricePaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "availability": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "productUrl": {
            "type": "string"
          },
          "published": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pricePaise",
          "published"
        ]
      },
      "ProductFeedController_CartLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 99,
            "default": 0
          }
        },
        "required": [
          "product_id",
          "quantity"
        ]
      },
      "ProductFeedController_FeedCheckoutRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductFeedController_CartLine"
            },
            "minItems": 1,
            "maxItems": 50
          },
          "customer_phone": {
            "type": "string",
            "maxLength": 32
          },
          "customer_name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "items"
        ]
      },
      "ProductFeedController_FeedCheckoutResponse": {
        "type": "object",
        "properties": {
          "checkout_session_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "amount_paise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "payment_url": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amount_paise"
        ]
      },
      "ProgressSource": {
        "type": "string",
        "enum": [
          "AGENT",
          "RUNTIME"
        ]
      },
      "PromptAdminController_OverrideRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "acknowledgeRisk": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "expectedVersion": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "acknowledgeRisk"
        ]
      },
      "PromptAdminController_RestoreRequest": {
        "type": "object",
        "properties": {
          "toVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "acknowledgeRisk": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "toVersion",
          "acknowledgeRisk"
        ]
      },
      "PromptAdminController_ValidateRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "PromptBlockTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hash": {
            "type": "string"
          },
          "chars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "estimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "version",
          "chars",
          "estimatedTokens"
        ]
      },
      "PromptDefinition": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "riskClass": {
            "$ref": "#/components/schemas/PromptRiskClass"
          },
          "securityCritical": {
            "type": "boolean",
            "default": false
          },
          "disableable": {
            "type": "boolean",
            "default": false
          },
          "retired": {
            "type": "boolean",
            "default": false
          },
          "strictPlaceholders": {
            "type": "boolean",
            "default": false
          },
          "placeholders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptPlaceholder"
            }
          },
          "minLength": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxLength": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "securityCritical",
          "disableable",
          "retired",
          "strictPlaceholders",
          "minLength",
          "maxLength"
        ]
      },
      "PromptDirectiveAdminService_CustomInstructions": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PromptDirectiveAdminService_DirectiveView": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "securityCritical": {
            "type": "boolean",
            "default": false
          },
          "placeholders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "overridden": {
            "type": "boolean",
            "default": false
          },
          "defaultText": {
            "type": "string"
          },
          "overrideText": {
            "type": "string"
          },
          "effectiveText": {
            "type": "string"
          }
        },
        "required": [
          "securityCritical",
          "enabled",
          "overridden"
        ]
      },
      "PromptDirectiveAdminService_Overview": {
        "type": "object",
        "properties": {
          "directives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptDirectiveAdminService_DirectiveView"
            }
          },
          "customInstructions": {
            "$ref": "#/components/schemas/PromptDirectiveAdminService_CustomInstructions"
          },
          "assembledPreview": {
            "type": "string"
          },
          "assembledPreviewNote": {
            "type": "string"
          },
          "promptPreviewPath": {
            "type": "string"
          }
        }
      },
      "PromptDirectiveController_CustomInstructionsUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "PromptDirectiveController_DirectiveUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "text": {
            "type": "string"
          },
          "acknowledgeRisk": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled",
          "acknowledgeRisk"
        ]
      },
      "PromptHistoryEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "scope": {
            "$ref": "#/components/schemas/PromptScope"
          },
          "scopeId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "action": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "previousText": {
            "type": "string"
          },
          "previousEnabled": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "version",
          "enabled",
          "previousEnabled"
        ]
      },
      "PromptOverride": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/PromptScope"
          },
          "scopeId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "version"
        ]
      },
      "PromptOverrideService_Applied": {
        "type": "object",
        "properties": {
          "override": {
            "$ref": "#/components/schemas/PromptOverride"
          },
          "history": {
            "$ref": "#/components/schemas/PromptHistoryEntry"
          },
          "unchanged": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "unchanged"
        ]
      },
      "PromptOverrideService_OverrideView": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/PromptScope"
          },
          "scopeId": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "version"
        ]
      },
      "PromptOverrideService_PromptView": {
        "type": "object",
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/PromptDefinition"
          },
          "defaultText": {
            "type": "string"
          },
          "effective": {
            "$ref": "#/components/schemas/ResolvedPrompt"
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptOverrideService_OverrideView"
            }
          }
        }
      },
      "PromptOverrideService_Validation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "securityCritical": {
            "type": "boolean",
            "default": false
          },
          "requiresAcknowledgement": {
            "type": "boolean",
            "default": false
          },
          "length": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "valid",
          "securityCritical",
          "requiresAcknowledgement",
          "length"
        ]
      },
      "PromptPlaceholder": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "required"
        ]
      },
      "PromptPreviewService_BlockView": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "hash": {
            "type": "string"
          },
          "estimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "estimatedTokens"
        ]
      },
      "PromptPreviewService_Preview": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "smallModel": {
            "type": "boolean",
            "default": false
          },
          "systemPrompt": {
            "type": "string"
          },
          "memoryBlock": {
            "type": "string"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptPreviewService_BlockView"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptPreviewService_ToolView"
            }
          },
          "promptEstimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "toolsEstimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tokenBudget": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "overBudget": {
            "type": "boolean",
            "default": false
          },
          "tokenEstimateNote": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "smallModel",
          "promptEstimatedTokens",
          "toolsEstimatedTokens",
          "tokenBudget",
          "overBudget"
        ]
      },
      "PromptPreviewService_Request": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "smallModel": {
            "type": "boolean"
          },
          "includeMemoryRecall": {
            "type": "boolean"
          }
        }
      },
      "PromptPreviewService_ToolView": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "string"
          },
          "estimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "estimatedTokens"
        ]
      },
      "PromptRiskClass": {
        "type": "string",
        "enum": [
          "STEERS_EVERY_TURN",
          "SECONDARY_CALL",
          "USER_VISIBLE",
          "TOOL_DESCRIPTION"
        ]
      },
      "PromptScope": {
        "type": "string",
        "enum": [
          "AGENT",
          "TENANT",
          "PLATFORM"
        ]
      },
      "PromptSource": {
        "type": "string",
        "enum": [
          "DEFAULT",
          "PLATFORM",
          "TENANT",
          "AGENT",
          "FALLBACK"
        ]
      },
      "PromptVersionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "systemPrompt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProviderActivationRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "providerName",
          "apiKey"
        ]
      },
      "ProviderAvailabilityResponse": {
        "type": "object",
        "properties": {
          "hasByokProvider": {
            "type": "boolean",
            "default": false
          },
          "platformHostedAvailable": {
            "type": "boolean",
            "default": false
          },
          "canCreateAgents": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "hasByokProvider",
          "platformHostedAvailable",
          "canCreateAgents"
        ]
      },
      "ProviderCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "providerKey": {
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/ProviderStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProviderHealth": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "windowDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failures": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "successes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "lastSuccessAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFailureAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastError": {
            "type": "string"
          },
          "backgroundPausedUntil": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "windowDays",
          "failures",
          "successes"
        ]
      },
      "ProviderModelResponse": {
        "type": "object",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "contextWindow": {
            "type": "integer",
            "format": "int32"
          },
          "supportsImageInput": {
            "type": "boolean",
            "default": false
          },
          "supportsAudioInput": {
            "type": "boolean",
            "default": false
          },
          "supportsVideoInput": {
            "type": "boolean",
            "default": false
          },
          "capabilitySummary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "deprecated": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "supportsImageInput",
          "supportsAudioInput",
          "supportsVideoInput"
        ]
      },
      "ProviderName": {
        "type": "string",
        "enum": [
          "ANTHROPIC",
          "OPENAI",
          "AZURE_OPENAI",
          "GOOGLE_VERTEX",
          "AWS_BEDROCK",
          "OLLAMA",
          "OPENROUTER",
          "GROK",
          "GEMINI",
          "SARVAM",
          "MISTRAL",
          "DEEPSEEK",
          "GROQ",
          "META",
          "LOCAL_OPENAI",
          "PLATFORM_HOSTED"
        ]
      },
      "ProviderResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "status": {
            "$ref": "#/components/schemas/ProviderStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "health": {
            "$ref": "#/components/schemas/ProviderHealth"
          }
        }
      },
      "ProviderStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "INACTIVE"
        ]
      },
      "PublicStatusController_Component": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PublicStatusController_PublicStatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicStatusController_Component"
            }
          },
          "maintenance": {
            "$ref": "#/components/schemas/PlatformBroadcastService_PublicMaintenance"
          },
          "announcement": {
            "$ref": "#/components/schemas/PlatformBroadcastService_PublicAnnouncement"
          },
          "edition": {
            "$ref": "#/components/schemas/EditionInfo"
          }
        }
      },
      "QualityController_QualityConfigResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "enabledEvaluations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvaluationType"
            }
          },
          "planTier": {
            "type": "string"
          }
        }
      },
      "QualityHistoryResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "timestamps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "overallScores": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            }
          },
          "scoresByType": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              }
            }
          },
          "recordCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "recordCount"
        ]
      },
      "QualityStatisticsResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "totalEvaluations": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "averageQualityScore": {
            "type": "number",
            "format": "double"
          },
          "averageScoresByType": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "totalEvaluations"
        ]
      },
      "QualitySummaryResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "overallScore": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "scoresByType": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "feedbackByType": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "turnNumber": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "evaluatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "overallScore",
          "turnNumber"
        ]
      },
      "QuickTaskChannel": {
        "type": "string",
        "enum": [
          "WHATSAPP",
          "SMS",
          "CALL",
          "LOG"
        ]
      },
      "QuickTaskPreviewRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "message"
        ]
      },
      "QuickTaskPreviewResponse": {
        "type": "object",
        "properties": {
          "agentName": {
            "type": "string"
          },
          "detectedTools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolDescriptor"
            }
          },
          "thirdPartyNumber": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "QuickTaskRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1
          },
          "channel": {
            "$ref": "#/components/schemas/QuickTaskChannel"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "message",
          "channel"
        ]
      },
      "QuickTaskResponse": {
        "type": "object",
        "properties": {
          "resultText": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/QuickTaskChannel"
          },
          "deliveryNote": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "QuickTaskRunDetailResponse": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "$ref": "#/components/schemas/QuickTaskChannel"
          },
          "status": {
            "$ref": "#/components/schemas/QuickTaskRunStatus"
          },
          "requestMessage": {
            "type": "string"
          },
          "resultText": {
            "type": "string"
          },
          "deliveryNote": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "toolCalls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuickTaskRunDetailResponse_ToolCallEntry"
            }
          },
          "agentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "QuickTaskRunDetailResponse_ToolCallEntry": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "toolInput": {
            "type": "string"
          },
          "toolOutput": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuickTaskRunStatus": {
        "type": "string",
        "enum": [
          "RUNNING",
          "COMPLETED",
          "FAILED"
        ]
      },
      "QuickTaskRunSummaryResponse": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/QuickTaskChannel"
          },
          "status": {
            "$ref": "#/components/schemas/QuickTaskRunStatus"
          },
          "requestMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RagDtos_Interval": {
        "type": "object",
        "properties": {
          "low": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "high": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "low",
          "high"
        ]
      },
      "RagDtos_RagEvalConfig": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "preset": {
            "type": "string"
          },
          "rrfK": {
            "type": "integer",
            "format": "int32"
          },
          "vectorWeight": {
            "type": "number",
            "format": "double"
          },
          "keywordWeight": {
            "type": "number",
            "format": "double"
          },
          "mmrLambda": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "RagDtos_RagEvalConfigResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "preset": {
            "type": "string"
          },
          "questions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "k": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hitRate": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "hitRateCi": {
            "$ref": "#/components/schemas/RagDtos_Interval"
          },
          "recallAtK": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "mrr": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "avgReturnedChars": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "failedQuestions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "perQuestion": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagDtos_RagEvalQuestionResult"
            }
          }
        },
        "required": [
          "questions",
          "k",
          "hitRate",
          "recallAtK",
          "mrr",
          "avgReturnedChars",
          "avgLatencyMs",
          "failedQuestions"
        ]
      },
      "RagDtos_RagEvalQuestion": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "expectedDocumentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "expectedSubstrings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RagDtos_RagEvalQuestionResult": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "hit": {
            "type": "boolean",
            "default": false
          },
          "firstRelevantRank": {
            "type": "integer",
            "format": "int32"
          },
          "recall": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "returned": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "returnedChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "hit",
          "recall",
          "returned",
          "returnedChars"
        ]
      },
      "RagDtos_RagEvalRequest": {
        "type": "object",
        "properties": {
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagDtos_RagEvalQuestion"
            }
          },
          "configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagDtos_RagEvalConfig"
            }
          },
          "k": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "RagDtos_RagEvalResponse": {
        "type": "object",
        "properties": {
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "k": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "questions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "childChunksInCollection": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "parentChunksInCollection": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RagDtos_RagEvalConfigResult"
            }
          }
        },
        "required": [
          "k",
          "questions",
          "childChunksInCollection",
          "parentChunksInCollection",
          "truncated"
        ]
      },
      "RagDtos_RagSettingsResponse": {
        "type": "object",
        "properties": {
          "parentChildAvailable": {
            "type": "boolean",
            "default": false
          },
          "parentChildEnabled": {
            "type": "boolean",
            "default": false
          },
          "childTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "parentTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "parentChunkCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "fusionEnabled": {
            "type": "boolean",
            "default": false
          },
          "queryRewriteMode": {
            "type": "string"
          },
          "schemaReady": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "parentChildAvailable",
          "parentChildEnabled",
          "childTokens",
          "parentTokens",
          "parentChunkCount",
          "fusionEnabled",
          "schemaReady"
        ]
      },
      "RagDtos_RagSettingsUpdateRequest": {
        "type": "object",
        "properties": {
          "parentChildEnabled": {
            "type": "boolean"
          }
        }
      },
      "RazorpayCheckoutController_CloseUpiQrResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "RazorpayCheckoutController_CreateUpiCollectRequest": {
        "type": "object",
        "properties": {
          "amountInPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "description": {
            "type": "string"
          },
          "customerName": {
            "type": "string"
          },
          "customerContact": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string"
          }
        },
        "required": [
          "amountInPaise"
        ]
      },
      "RazorpayCheckoutController_CreateUpiCollectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "shortUrl": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "RazorpayCheckoutController_CreateUpiQrRequest": {
        "type": "object",
        "properties": {
          "amountInPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "amountInPaise"
        ]
      },
      "RazorpayCheckoutController_CreateUpiQrResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "amountInPaise": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "amountInPaise"
        ]
      },
      "ReadinessRow": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "actionHref": {
            "type": "string"
          },
          "unlocksAt": {
            "type": "string"
          }
        }
      },
      "RealtimeSessionRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "maxLength": 32
          },
          "model": {
            "type": "string",
            "maxLength": 128
          },
          "voice": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "agentId",
          "provider"
        ]
      },
      "RealtimeSessionResponse": {
        "type": "object",
        "properties": {
          "relayPath": {
            "type": "string"
          },
          "ticket": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "inputSampleRate": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "outputSampleRate": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "inputSampleRate",
          "outputSampleRate"
        ]
      },
      "ReasoningDepth": {
        "type": "string",
        "enum": [
          "FAST",
          "CAREFUL",
          "RIGOROUS",
          "PLANNED"
        ]
      },
      "ReferralRedeemRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16,
            "pattern": "\\s*[A-Za-z0-9]+\\s*"
          }
        },
        "required": [
          "code"
        ]
      },
      "ReferralStatusResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "redemptionsCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "redeemedByMe": {
            "type": "boolean",
            "default": false
          },
          "canRedeem": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "redemptionsCount",
          "redeemedByMe",
          "canRedeem"
        ]
      },
      "RegisterDeviceRequest": {
        "type": "object",
        "properties": {
          "deviceName": {
            "type": "string",
            "minLength": 1
          },
          "platform": {
            "$ref": "#/components/schemas/DevicePlatform"
          }
        },
        "required": [
          "deviceName",
          "platform"
        ]
      },
      "RegistryEnvVarSpec": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "secret": {
            "type": "boolean",
            "default": false
          },
          "defaultValue": {
            "type": "string"
          },
          "positional": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "required",
          "secret",
          "positional"
        ]
      },
      "RegistrySearchResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistrySearchResult"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "unavailable": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "unavailable"
        ]
      },
      "RegistrySearchResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "repositoryUrl": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/McpServerType"
          },
          "runtime": {
            "type": "string"
          },
          "runnable": {
            "type": "boolean",
            "default": false
          },
          "notRunnableReason": {
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string"
          },
          "envVars": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryEnvVarSpec"
            }
          },
          "status": {
            "type": "string"
          },
          "reviewRequired": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "runnable",
          "reviewRequired"
        ]
      },
      "RelayJob": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "externalIdMasked": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelayJob_RelayTurn"
            }
          },
          "createdAtEpochMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "status": {
            "type": "string"
          },
          "claimedBy": {
            "type": "string"
          }
        },
        "required": [
          "createdAtEpochMs"
        ]
      },
      "RelayJob_RelayTurn": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "ReliabilityApi_AvailabilitySlo": {
        "type": "object",
        "properties": {
          "requests": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "serverErrors": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "availability": {
            "type": "number",
            "format": "double"
          },
          "errorRatio": {
            "type": "number",
            "format": "double"
          },
          "burnRate": {
            "type": "number",
            "format": "double"
          },
          "budgetRemaining": {
            "type": "number",
            "format": "double"
          },
          "verdict": {
            "type": "string"
          }
        },
        "required": [
          "requests",
          "serverErrors"
        ]
      },
      "ReliabilityApi_DependenciesResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "cacheTtlSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "overall": {
            "$ref": "#/components/schemas/DependencyStatus"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityApi_DependencyEntry"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "cacheTtlSeconds"
        ]
      },
      "ReliabilityApi_DependencyEntry": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DependencyStatus"
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64"
          },
          "lastCheckedAt": {
            "type": "string",
            "format": "date-time"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "ReliabilityApi_JobSlo": {
        "type": "object",
        "properties": {
          "finished": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "succeeded": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "failed": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "successRate": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "finished",
          "succeeded",
          "failed"
        ]
      },
      "ReliabilityApi_LatencySlo": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "count": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "p50Ms": {
            "type": "number",
            "format": "double"
          },
          "p95Ms": {
            "type": "number",
            "format": "double"
          },
          "p99Ms": {
            "type": "number",
            "format": "double"
          },
          "targetMs": {
            "type": "number",
            "format": "double"
          },
          "meetsTarget": {
            "type": "boolean"
          },
          "slowShare": {
            "type": "number",
            "format": "double"
          },
          "slowShareBoundMs": {
            "type": "number",
            "format": "double"
          },
          "burnRate": {
            "type": "number",
            "format": "double"
          },
          "verdict": {
            "type": "string"
          }
        },
        "required": [
          "count"
        ]
      },
      "ReliabilityApi_Objectives": {
        "type": "object",
        "properties": {
          "availabilityTarget": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "apiP95TargetMs": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "chatTtftP95TargetMs": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "latencyQuantile": {
            "type": "number",
            "format": "double",
            "default": 0
          }
        },
        "required": [
          "availabilityTarget",
          "apiP95TargetMs",
          "chatTtftP95TargetMs",
          "latencyQuantile"
        ]
      },
      "ReliabilityApi_ProviderErrorRate": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "calls": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "errors": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "errorRate": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "calls",
          "errors"
        ]
      },
      "ReliabilityApi_SloResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "windowHours": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "coveredSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "scope": {
            "type": "string"
          },
          "replicas": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "objectives": {
            "$ref": "#/components/schemas/ReliabilityApi_Objectives"
          },
          "availability": {
            "$ref": "#/components/schemas/ReliabilityApi_AvailabilitySlo"
          },
          "latency": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityApi_LatencySlo"
            }
          },
          "llmProviders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityApi_ProviderErrorRate"
            }
          },
          "jobs": {
            "$ref": "#/components/schemas/ReliabilityApi_JobSlo"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "windowHours",
          "coveredSeconds",
          "replicas"
        ]
      },
      "ReliabilityDtos_AgentReliabilityResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "confidenceLevel": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "maxRunsPerDataset": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "datasets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityDtos_DatasetReliabilityResponse"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "confidenceLevel",
          "maxRunsPerDataset"
        ]
      },
      "ReliabilityDtos_CaseReliabilityResponse": {
        "type": "object",
        "properties": {
          "caseKey": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "rollouts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "successes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "passRate": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "passRateInterval": {
            "$ref": "#/components/schemas/ReliabilityDtos_IntervalResponse"
          },
          "allPassed": {
            "type": "boolean",
            "default": false
          },
          "unreplicated": {
            "type": "boolean",
            "default": false
          },
          "meanScore": {
            "type": "number",
            "format": "double"
          },
          "scoredRollouts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "rollouts",
          "successes",
          "passRate",
          "allPassed",
          "unreplicated",
          "scoredRollouts"
        ]
      },
      "ReliabilityDtos_DatasetNoiseFloorResponse": {
        "type": "object",
        "properties": {
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetName": {
            "type": "string"
          },
          "noiseFloor": {
            "$ref": "#/components/schemas/ReliabilityDtos_NoiseFloorResponse"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ReliabilityDtos_DatasetReliabilityResponse": {
        "type": "object",
        "properties": {
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "datasetName": {
            "type": "string"
          },
          "runIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "runsConsidered": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "caseCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "minRolloutsPerCase": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxRolloutsPerCase": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "k": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "unreplicated": {
            "type": "boolean",
            "default": false
          },
          "reliabilityGap": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityDtos_MetricResponse"
            }
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReliabilityDtos_CaseReliabilityResponse"
            }
          },
          "noiseFloor": {
            "$ref": "#/components/schemas/ReliabilityDtos_NoiseFloorResponse"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "runsConsidered",
          "caseCount",
          "minRolloutsPerCase",
          "maxRolloutsPerCase",
          "k",
          "unreplicated",
          "reliabilityGap"
        ]
      },
      "ReliabilityDtos_IntervalResponse": {
        "type": "object",
        "properties": {
          "low": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "high": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "confidenceLevel": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "method": {
            "$ref": "#/components/schemas/IntervalMethod"
          }
        },
        "required": [
          "low",
          "high",
          "confidenceLevel"
        ]
      },
      "ReliabilityDtos_MetricResponse": {
        "type": "object",
        "properties": {
          "metric": {
            "$ref": "#/components/schemas/ReliabilityMetricId"
          },
          "label": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "value": {
            "type": "number",
            "format": "double"
          },
          "interval": {
            "$ref": "#/components/schemas/ReliabilityDtos_IntervalResponse"
          },
          "n": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "unit": {
            "$ref": "#/components/schemas/SampleUnit"
          },
          "k": {
            "type": "integer",
            "format": "int32"
          },
          "unreplicated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "n",
          "unreplicated"
        ]
      },
      "ReliabilityDtos_NoiseFloorResponse": {
        "type": "object",
        "properties": {
          "firstRunId": {
            "type": "string",
            "format": "uuid"
          },
          "secondRunId": {
            "type": "string",
            "format": "uuid"
          },
          "secondRunFinishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pairedCases": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "meanAbsoluteDelta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "maxAbsoluteDelta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "floor": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "meanAbsoluteDeltaInterval": {
            "$ref": "#/components/schemas/ReliabilityDtos_IntervalResponse"
          },
          "signedMeanDelta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "signedMeanDeltaInterval": {
            "$ref": "#/components/schemas/ReliabilityDtos_IntervalResponse"
          },
          "configurationSuspect": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "pairedCases",
          "meanAbsoluteDelta",
          "maxAbsoluteDelta",
          "floor",
          "signedMeanDelta",
          "configurationSuspect"
        ]
      },
      "ReliabilityDtos_PairedComparisonResponse": {
        "type": "object",
        "properties": {
          "datasetId": {
            "type": "string",
            "format": "uuid"
          },
          "baselineRunId": {
            "type": "string",
            "format": "uuid"
          },
          "variantRunId": {
            "type": "string",
            "format": "uuid"
          },
          "pairedCases": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "baselineMean": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "variantMean": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "meanDelta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "deltaInterval": {
            "$ref": "#/components/schemas/ReliabilityDtos_IntervalResponse"
          },
          "verdict": {
            "$ref": "#/components/schemas/ComparisonVerdict"
          },
          "noiseFloorTested": {
            "type": "number",
            "format": "double"
          },
          "casesVariantBetter": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "casesBaselineBetter": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "casesTied": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "signTestPValue": {
            "type": "number",
            "format": "double"
          },
          "unreplicated": {
            "type": "boolean",
            "default": false
          },
          "explanation": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "pairedCases",
          "baselineMean",
          "variantMean",
          "meanDelta",
          "casesVariantBetter",
          "casesBaselineBetter",
          "casesTied",
          "unreplicated"
        ]
      },
      "ReliabilityMetricId": {
        "type": "string",
        "enum": [
          "PASS_AT_1",
          "PASS_AT_K",
          "PASS_HAT_K",
          "MEAN_SCORE"
        ]
      },
      "ResearchRunStartRequest": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "depth": {
            "type": "string"
          },
          "seedUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "type": "string"
          }
        }
      },
      "ResearchStatusResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "searchConfigured": {
            "type": "boolean",
            "default": false
          },
          "runsEnabled": {
            "type": "boolean",
            "default": false
          },
          "limits": {
            "$ref": "#/components/schemas/ResearchStatusResponse_Limits"
          },
          "remainingToday": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "enabled",
          "searchConfigured",
          "runsEnabled"
        ]
      },
      "ResearchStatusResponse_Limits": {
        "type": "object",
        "properties": {
          "maxSearchesPerRun": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxFetchesPerRun": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxSources": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalDeadlineSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runBudgetUsd": {
            "type": "number"
          },
          "maxRunsPerUserPerDay": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxSearchesPerRun",
          "maxFetchesPerRun",
          "maxSources",
          "totalDeadlineSeconds",
          "maxRunsPerUserPerDay",
          "runTimeoutSeconds"
        ]
      },
      "ResolutionDtos_DisputeRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ResolutionDtos_RecordResolutionRequest": {
        "type": "object",
        "properties": {
          "conversationKey": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dedupeKey": {
            "type": "string"
          }
        }
      },
      "ResolutionDtos_ResolutionActionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "recorded": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "recorded"
        ]
      },
      "ResolutionDtos_ResolutionEventResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "conversationKey": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "billable": {
            "type": "boolean",
            "default": false
          },
          "billableReason": {
            "type": "string"
          },
          "unitPriceMinor": {
            "type": "integer",
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "disputedAt": {
            "type": "string",
            "format": "date-time"
          },
          "disputedBy": {
            "type": "string"
          },
          "disputeReason": {
            "type": "string"
          }
        },
        "required": [
          "billable"
        ]
      },
      "ResolutionDtos_ResolutionListResponse": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResolutionDtos_ResolutionEventResponse"
            }
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "limit",
          "offset"
        ]
      },
      "ResolutionDtos_ResolutionSummaryResponse": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "totalEvents": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "byOutcome": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            }
          },
          "billableCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "billableTotalMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "currency": {
            "type": "string"
          },
          "configuredUnitPriceMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "freeModeMeteringOnly": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "totalEvents",
          "billableCount",
          "billableTotalMinor",
          "configuredUnitPriceMinor",
          "freeModeMeteringOnly"
        ]
      },
      "ResolvedPrompt": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PromptSource"
          },
          "scope": {
            "$ref": "#/components/schemas/PromptScope"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "locale": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "known": {
            "type": "boolean",
            "default": false
          },
          "hash": {
            "type": "string"
          },
          "estimatedTokens": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "version",
          "enabled",
          "known",
          "estimatedTokens"
        ]
      },
      "ResourceType": {
        "type": "string",
        "enum": [
          "AGENT",
          "WORKFLOW"
        ]
      },
      "ResumableChatStreamService_TurnSnapshot": {
        "type": "object",
        "properties": {
          "turnId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "lastEventId": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "text": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "lastEventId"
        ]
      },
      "ResumableTurnReplyService_PersistedReply": {
        "type": "object",
        "properties": {
          "turnId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "error": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "error"
        ]
      },
      "RetentionPolicyService_Rule": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "dataClass": {
            "$ref": "#/components/schemas/PrivacyDataClass"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "retentionDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "retentionDays"
        ]
      },
      "RetentionPolicyService_Saved": {
        "type": "object",
        "properties": {
          "rule": {
            "$ref": "#/components/schemas/RetentionPolicyService_Rule"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RlPreferenceExport": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "dpoCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "ktoCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "dpo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RlPreferenceExport_DpoPair"
            }
          },
          "kto": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RlPreferenceExport_KtoSample"
            }
          }
        },
        "required": [
          "dpoCount",
          "ktoCount"
        ]
      },
      "RlPreferenceExport_DpoPair": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "chosen": {
            "type": "string"
          },
          "rejected": {
            "type": "string"
          }
        }
      },
      "RlPreferenceExport_KtoSample": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string"
          },
          "completion": {
            "type": "string"
          },
          "desirable": {
            "type": "boolean",
            "default": false
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "desirable"
        ]
      },
      "RlSummaryResponse": {
        "type": "object",
        "properties": {
          "feedbackCounts": {
            "$ref": "#/components/schemas/RlSummaryResponse_FeedbackCounts"
          },
          "rewardTrend": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RlSummaryResponse_RewardPoint"
            }
          },
          "arms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RlSummaryResponse_ArmStat"
            }
          },
          "policies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RlSummaryResponse_PolicyState"
            }
          }
        }
      },
      "RlSummaryResponse_ArmStat": {
        "type": "object",
        "properties": {
          "dimension": {
            "type": "string"
          },
          "policyId": {
            "type": "string",
            "format": "uuid"
          },
          "armId": {
            "type": "string",
            "format": "uuid"
          },
          "armKey": {
            "type": "string"
          },
          "armConfigJson": {
            "type": "string"
          },
          "contextBucket": {
            "type": "string"
          },
          "pulls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "avgReward": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "alpha": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "beta": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "pulls",
          "avgReward",
          "alpha",
          "beta",
          "enabled"
        ]
      },
      "RlSummaryResponse_FeedbackCounts": {
        "type": "object",
        "properties": {
          "up": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "down": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "rating": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "edit": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolved": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "unresolved": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "avgRating": {
            "type": "number",
            "format": "double"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "up",
          "down",
          "rating",
          "edit",
          "resolved",
          "unresolved",
          "total"
        ]
      },
      "RlSummaryResponse_PolicyState": {
        "type": "object",
        "properties": {
          "dimension": {
            "type": "string"
          },
          "policyId": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "explorationRate": {
            "type": "number"
          },
          "algorithm": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "RlSummaryResponse_RewardPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "avgReward": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "avgReward",
          "count"
        ]
      },
      "RoiDtos_AgentRoiResponse": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "includeAssumedResolutions": {
            "type": "boolean",
            "default": false
          },
          "roiBasis": {
            "type": "string"
          },
          "agents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoiDtos_AgentRoiRow"
            }
          }
        },
        "required": [
          "includeAssumedResolutions"
        ]
      },
      "RoiDtos_AgentRoiRow": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "conversations": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolved": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolvedConfirmed": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolvedAssumed": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolvedByHuman": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "handedToHuman": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "abandoned": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "unresolved": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "humanCorrected": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "handoverRate": {
            "type": "number"
          },
          "humanCorrectionRate": {
            "type": "number"
          },
          "approvalsDecided": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "approvalsDenied": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "approvalDenialRate": {
            "type": "number"
          },
          "byokEstimatedCostUsd": {
            "type": "number"
          },
          "platformHostedEstimatedCostUsd": {
            "type": "number"
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "estimatedCostPerResolvedUsd": {
            "type": "number"
          },
          "costComplete": {
            "type": "boolean",
            "default": false
          },
          "platformChargesMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "platformChargesCurrency": {
            "type": "string"
          },
          "valuePerResolution": {
            "type": "number"
          },
          "valueCurrency": {
            "type": "string"
          },
          "minutesSavedPerResolution": {
            "type": "number"
          },
          "valueTotal": {
            "type": "number"
          },
          "minutesSavedTotal": {
            "type": "number"
          },
          "netValue": {
            "type": "number"
          },
          "roiPercent": {
            "type": "number"
          },
          "roiNote": {
            "type": "string"
          }
        },
        "required": [
          "conversations",
          "resolved",
          "resolvedConfirmed",
          "resolvedAssumed",
          "resolvedByHuman",
          "handedToHuman",
          "abandoned",
          "unresolved",
          "humanCorrected",
          "approvalsDecided",
          "approvalsDenied",
          "costComplete",
          "platformChargesMinor"
        ]
      },
      "RoiDtos_AssumptionRequest": {
        "type": "object",
        "properties": {
          "valuePerResolution": {
            "type": "number"
          },
          "valueCurrency": {
            "type": "string"
          },
          "minutesSavedPerResolution": {
            "type": "number"
          }
        }
      },
      "RoiDtos_AssumptionResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "valuePerResolution": {
            "type": "number"
          },
          "valueCurrency": {
            "type": "string"
          },
          "minutesSavedPerResolution": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "basis": {
            "type": "string"
          }
        }
      },
      "RoiDtos_BudgetResponse": {
        "type": "object",
        "properties": {
          "monthStart": {
            "type": "string",
            "format": "date"
          },
          "plan": {
            "type": "string"
          },
          "spentUsd": {
            "type": "number"
          },
          "capUsd": {
            "type": "number"
          },
          "percentUsed": {
            "type": "number"
          },
          "capConfigured": {
            "type": "boolean",
            "default": false
          },
          "spendBasis": {
            "type": "string"
          },
          "alertsFired": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        },
        "required": [
          "capConfigured"
        ]
      },
      "RoiDtos_CostReportResponse": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "groupBy": {
            "type": "string"
          },
          "costBasis": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoiDtos_CostRow"
            }
          },
          "total": {
            "$ref": "#/components/schemas/RoiDtos_CostRow"
          },
          "platformChargesMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "platformChargesCurrency": {
            "type": "string"
          }
        },
        "required": [
          "platformChargesMinor"
        ]
      },
      "RoiDtos_CostRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "failedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "pricedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "unpricedCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "callsWithoutUsage": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "byokEstimatedCostUsd": {
            "type": "number"
          },
          "platformHostedEstimatedCostUsd": {
            "type": "number"
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "costComplete": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "calls",
          "failedCalls",
          "pricedCalls",
          "unpricedCalls",
          "callsWithoutUsage",
          "promptTokens",
          "completionTokens",
          "costComplete"
        ]
      },
      "RoiDtos_OutcomeRequest": {
        "type": "object",
        "properties": {
          "conversationKey": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "RoiDtos_OutcomeResponse": {
        "type": "object",
        "properties": {
          "conversationKey": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "recorded": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "recorded"
        ]
      },
      "RoiDtos_PriceListResponse": {
        "type": "object",
        "properties": {
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoiDtos_PriceResponse"
            }
          },
          "unpricedModels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoiDtos_UnpricedModel"
            }
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "RoiDtos_PriceRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "type": "string"
          },
          "modelPrefix": {
            "type": "string"
          },
          "inputPerMillion": {
            "type": "number"
          },
          "outputPerMillion": {
            "type": "number"
          },
          "cacheWritePerMillion": {
            "type": "number"
          },
          "cacheReadPerMillion": {
            "type": "number"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "RoiDtos_PriceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "providerName": {
            "type": "string"
          },
          "modelPrefix": {
            "type": "string"
          },
          "inputPerMillion": {
            "type": "number"
          },
          "outputPerMillion": {
            "type": "number"
          },
          "cacheWritePerMillion": {
            "type": "number"
          },
          "cacheReadPerMillion": {
            "type": "number"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "setAt": {
            "type": "string",
            "format": "date-time"
          },
          "setBy": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "RoiDtos_UnpricedModel": {
        "type": "object",
        "properties": {
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "calls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "calls",
          "totalTokens"
        ]
      },
      "RunAgentInput": {
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "parentRunId": {
            "type": "string"
          },
          "state": {},
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunAgentInput_InputMessage"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunAgentInput_Tool"
            }
          },
          "context": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunAgentInput_ContextItem"
            }
          },
          "forwardedProps": {}
        }
      },
      "RunAgentInput_ContextItem": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "RunAgentInput_InputMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "content": {},
          "toolCalls": {
            "type": "array",
            "items": {}
          },
          "toolCallId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "RunAgentInput_Tool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parameters": {}
        }
      },
      "RunCodeRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "language": {
            "type": "string",
            "minLength": 1
          },
          "timeoutSeconds": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "code",
          "language"
        ]
      },
      "RunCodeResponse": {
        "type": "object",
        "properties": {
          "stdout": {
            "type": "string"
          },
          "stderr": {
            "type": "string"
          },
          "exitCode": {
            "type": "integer",
            "format": "int32"
          },
          "timedOut": {
            "type": "boolean",
            "default": false
          },
          "sandboxId": {
            "type": "string"
          }
        },
        "required": [
          "timedOut"
        ]
      },
      "RunCostTimeline_Step": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "offsetMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "latencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "success": {
            "type": "boolean",
            "default": false
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64"
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64"
          },
          "costUsd": {
            "type": "number"
          },
          "cumulativeCostUsd": {
            "type": "number"
          },
          "cacheReadTokens": {
            "type": "integer",
            "format": "int64"
          },
          "cacheWriteTokens": {
            "type": "integer",
            "format": "int64"
          },
          "cacheHitRatio": {
            "type": "number",
            "format": "double"
          },
          "agentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "traceId": {
            "type": "string"
          },
          "spanId": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasoningTokens": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "index",
          "offsetMs",
          "latencyMs",
          "success"
        ]
      },
      "RunCostTimeline_Summary": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "callCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "failedCalls": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "unpricedCalls": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalCostUsd": {
            "type": "number"
          },
          "cacheReadTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cacheWriteTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cacheAccountedCalls": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cacheHitRatio": {
            "type": "number",
            "format": "double"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "wallClockMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "summedLatencyMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunCostTimeline_Step"
            }
          },
          "reasoningTokens": {
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "callCount",
          "failedCalls",
          "unpricedCalls",
          "promptTokens",
          "completionTokens",
          "totalTokens",
          "cacheReadTokens",
          "cacheWriteTokens",
          "cacheAccountedCalls",
          "wallClockMs",
          "summedLatencyMs"
        ]
      },
      "RuntimeLimits": {
        "type": "object",
        "properties": {
          "continuationPasses": {
            "type": "integer",
            "format": "int32"
          },
          "maxToolSteps": {
            "type": "integer",
            "format": "int32"
          },
          "retrievalMinScore": {
            "type": "number",
            "format": "double"
          },
          "retrievalTopK": {
            "type": "integer",
            "format": "int32"
          },
          "toolOutputMaxChars": {
            "type": "integer",
            "format": "int32"
          },
          "toolTimeoutSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "turnTimeoutSeconds": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "RuntimeLimitsView": {
        "type": "object",
        "properties": {
          "overrides": {
            "$ref": "#/components/schemas/RuntimeLimits"
          },
          "effective": {
            "$ref": "#/components/schemas/RuntimeLimitsView_Effective"
          },
          "bounds": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AgentRuntimeProperties_Range"
            }
          }
        }
      },
      "RuntimeLimitsView_Effective": {
        "type": "object",
        "properties": {
          "maxToolSteps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "turnTimeoutSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolTimeoutSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "toolOutputMaxChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "retrievalTopK": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "retrievalMinScore": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "continuationPasses": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "layers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "maxToolSteps",
          "turnTimeoutSeconds",
          "toolTimeoutSeconds",
          "toolOutputMaxChars",
          "retrievalTopK",
          "retrievalMinScore",
          "continuationPasses"
        ]
      },
      "SampleUnit": {
        "type": "string",
        "enum": [
          "ROLLOUT",
          "CASE",
          "CASE_PAIR"
        ]
      },
      "SandboxResponse": {
        "type": "object",
        "properties": {
          "sandboxId": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "envdVersion": {
            "type": "string"
          }
        }
      },
      "SandboxSummaryResponse": {
        "type": "object",
        "properties": {
          "sandboxId": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SandboxValidateResponse": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false
          },
          "sourceSha256": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SandboxValidateResponse_SandboxValidationError"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "valid"
        ]
      },
      "SandboxValidateResponse_SandboxValidationError": {
        "type": "object",
        "properties": {
          "line": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "SarvamCredentialActivationRequest": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "apiKey"
        ]
      },
      "SarvamCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/SarvamCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SarvamCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ]
      },
      "SarvamGeneratedAudioResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "downloadUrl": {
            "type": "string"
          }
        }
      },
      "ScheduledJobRegistryService_JobView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bean": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          },
          "lastStartedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastFinishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastStatus": {
            "type": "string"
          },
          "lastError": {
            "type": "string"
          },
          "lastDurationMs": {
            "type": "integer",
            "format": "int64"
          },
          "runNowAllowed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "runNowAllowed"
        ]
      },
      "ScheduledTaskDtos_Capabilities": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "maxTasks": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "minIntervalMinutes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxPromptChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "deliveryChannels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "maxTasks",
          "minIntervalMinutes",
          "maxPromptChars"
        ]
      },
      "ScheduledTaskDtos_PreviewRequest": {
        "type": "object",
        "properties": {
          "frequency": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12
          },
          "time": {
            "type": "string",
            "maxLength": 5
          },
          "day": {
            "type": "string",
            "maxLength": 8
          },
          "cron": {
            "type": "string",
            "maxLength": 64
          },
          "timezone": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "frequency"
        ]
      },
      "ScheduledTaskDtos_PreviewResponse": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "nextRuns": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      },
      "ScheduledTaskDtos_RunResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "taskId": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "attempt": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "costUsd": {
            "type": "number"
          },
          "deliveryStatus": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "attempt"
        ]
      },
      "ScheduledTaskDtos_TaskRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "frequency": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12
          },
          "time": {
            "type": "string",
            "maxLength": 5
          },
          "day": {
            "type": "string",
            "maxLength": 8
          },
          "cron": {
            "type": "string",
            "maxLength": 64
          },
          "timezone": {
            "type": "string",
            "maxLength": 64
          },
          "delivery": {
            "type": "string",
            "maxLength": 12
          },
          "deliveryTo": {
            "type": "string",
            "maxLength": 255
          },
          "maxRuns": {
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "agentId",
          "name",
          "prompt",
          "frequency"
        ]
      },
      "ScheduledTaskDtos_TaskResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "day": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "scheduleDescription": {
            "type": "string"
          },
          "delivery": {
            "type": "string"
          },
          "deliveryTo": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "disabledReason": {
            "type": "string"
          },
          "nextRunAt": {
            "type": "string",
            "format": "date-time"
          },
          "upcomingRuns": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          },
          "lastRunAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastStatus": {
            "type": "string"
          },
          "lastJobId": {
            "type": "string",
            "format": "uuid"
          },
          "consecutiveFailures": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "maxRuns": {
            "type": "integer",
            "format": "int32"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerSubject": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "consecutiveFailures",
          "runCount"
        ]
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1
          },
          "topK": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 100
          },
          "collectionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true
          },
          "metadataFilter": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "query"
        ]
      },
      "SearchResultResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "chunkIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "content": {
            "type": "string"
          },
          "collectionId": {
            "type": "string",
            "format": "uuid"
          },
          "distance": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceUrl": {
            "type": "string"
          },
          "startChar": {
            "type": "integer",
            "format": "int32"
          },
          "endChar": {
            "type": "integer",
            "format": "int32"
          },
          "quote": {
            "type": "string"
          }
        },
        "required": [
          "chunkIndex",
          "distance"
        ]
      },
      "SecretKind": {
        "type": "string",
        "enum": [
          "API_KEY",
          "PASSWORD",
          "TOKEN",
          "BASIC_AUTH",
          "CUSTOM"
        ]
      },
      "SecretResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/SecretScope"
          },
          "kind": {
            "$ref": "#/components/schemas/SecretKind"
          },
          "description": {
            "type": "string"
          },
          "preview": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SecretStatus"
          },
          "codeToolAccess": {
            "type": "boolean",
            "default": false
          },
          "allowedHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "expired": {
            "type": "boolean",
            "default": false
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rotatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "codeToolAccess",
          "expired"
        ]
      },
      "SecretScope": {
        "type": "string",
        "enum": [
          "TENANT",
          "USER"
        ]
      },
      "SecretStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "REVOKED"
        ]
      },
      "SecretStoreRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
          },
          "scope": {
            "$ref": "#/components/schemas/SecretScope"
          },
          "kind": {
            "$ref": "#/components/schemas/SecretKind"
          },
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "value": {
            "type": "string",
            "minLength": 6,
            "maxLength": 8192
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "codeToolAccess": {
            "type": "boolean"
          },
          "allowedHosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 32
          }
        },
        "required": [
          "name",
          "scope",
          "kind",
          "value"
        ]
      },
      "SecretVaultController_AllowedHostsRequest": {
        "type": "object",
        "properties": {
          "allowedHosts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 32
          }
        }
      },
      "SessionConfigController_SessionConfigResponse": {
        "type": "object",
        "properties": {
          "idleTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "idleWarningSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "idleTimeoutSeconds",
          "idleWarningSeconds"
        ]
      },
      "SessionRewindRequest": {
        "type": "object",
        "properties": {
          "keepTurns": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "default": 0
          }
        },
        "required": [
          "keepTurns"
        ]
      },
      "SetDefaultAgentRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "agentId"
        ]
      },
      "SetUserEnabledRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SetUserPermissionsRequest": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "permissions"
        ]
      },
      "SetUserRolesRequest": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "roles"
        ]
      },
      "SettingHistoryEntry": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "action": {
            "type": "string"
          },
          "value": {},
          "previousValue": {},
          "reason": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version"
        ]
      },
      "SettingHistoryRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/SettingScope"
          },
          "agentId": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "action": {
            "type": "string"
          },
          "value": {},
          "previousValue": {},
          "reason": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version"
        ]
      },
      "SettingRisk": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high",
          "security"
        ]
      },
      "SettingRole": {
        "type": "string",
        "enum": [
          "VIEWER",
          "EDITOR",
          "TENANT_ADMIN"
        ]
      },
      "SettingScope": {
        "type": "string",
        "enum": [
          "tenant",
          "agent"
        ]
      },
      "SettingSource": {
        "type": "string",
        "enum": [
          "default",
          "platform",
          "tenant",
          "agent"
        ]
      },
      "SettingType": {
        "type": "string",
        "enum": [
          "int",
          "long",
          "decimal",
          "duration",
          "bool",
          "enum",
          "string",
          "text",
          "percent"
        ]
      },
      "SettingUnit": {
        "type": "string",
        "enum": [
          "chars",
          "tokens",
          "ms",
          "s",
          "count",
          "usd",
          "percent"
        ]
      },
      "SettingValue": {
        "type": "object",
        "properties": {
          "value": {},
          "source": {
            "$ref": "#/components/schemas/SettingSource"
          },
          "locked": {
            "type": "boolean",
            "default": false
          },
          "lockedReason": {
            "type": "string"
          },
          "inherited": {
            "$ref": "#/components/schemas/SettingValue_Inherited"
          }
        },
        "required": [
          "locked"
        ]
      },
      "SettingValue_Inherited": {
        "type": "object",
        "properties": {
          "value": {},
          "source": {
            "$ref": "#/components/schemas/SettingSource"
          }
        }
      },
      "SettingsController_CatalogResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogEntry"
            }
          }
        }
      },
      "SettingsController_EffectiveResponse": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/SettingValue"
            }
          }
        }
      },
      "SettingsController_HistoryPageResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettingHistoryRow"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "hasMore": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "total",
          "offset",
          "limit",
          "hasMore"
        ]
      },
      "SettingsController_ValueRequest": {
        "type": "object",
        "properties": {
          "value": {},
          "reason": {
            "type": "string"
          }
        }
      },
      "SettingsController_WriteResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "effective": {
            "$ref": "#/components/schemas/SettingValue"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "unchanged": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "unchanged"
        ]
      },
      "ShareController_GrantRequest": {
        "type": "object",
        "properties": {
          "granteeEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "permissionLevel": {
            "$ref": "#/components/schemas/PermissionLevel"
          }
        },
        "required": [
          "granteeEmail",
          "permissionLevel"
        ]
      },
      "ShareController_GrantResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "granteeUserId": {
            "type": "string"
          },
          "granteeEmail": {
            "type": "string"
          },
          "permissionLevel": {
            "$ref": "#/components/schemas/PermissionLevel"
          },
          "grantedBy": {
            "type": "string"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SharedWithMeController_SharedResourceResponse": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "format": "uuid"
          },
          "resourceType": {
            "$ref": "#/components/schemas/ResourceType"
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "permissionLevel": {
            "$ref": "#/components/schemas/PermissionLevel"
          },
          "grantedBy": {
            "type": "string"
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SignalActivationRequest": {
        "type": "object",
        "properties": {
          "baseUrl": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "authToken": {
            "type": "string",
            "maxLength": 4096
          },
          "unknownSenders": {
            "$ref": "#/components/schemas/UnknownSenderPolicy"
          },
          "groupMode": {
            "$ref": "#/components/schemas/SignalGroupMode"
          }
        },
        "required": [
          "baseUrl",
          "number"
        ]
      },
      "SignalCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "baseUrl": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "hasAuthToken": {
            "type": "boolean",
            "default": false
          },
          "unknownSenders": {
            "$ref": "#/components/schemas/UnknownSenderPolicy"
          },
          "groupMode": {
            "$ref": "#/components/schemas/SignalGroupMode"
          },
          "status": {
            "$ref": "#/components/schemas/SignalCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "hasAuthToken"
        ]
      },
      "SignalCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "SignalGroupMode": {
        "type": "string",
        "enum": [
          "IGNORE",
          "MENTION",
          "ALL"
        ]
      },
      "SignalPolicyRequest": {
        "type": "object",
        "properties": {
          "unknownSenders": {
            "$ref": "#/components/schemas/UnknownSenderPolicy"
          },
          "groupMode": {
            "$ref": "#/components/schemas/SignalGroupMode"
          }
        }
      },
      "SignalSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "SignalSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "SignupRequest": {
        "type": "object",
        "properties": {
          "orgName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "adminEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email",
            "maxLength": 254
          },
          "adminPassword": {
            "type": "string",
            "minLength": 12,
            "maxLength": 128
          },
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "accountType": {
            "$ref": "#/components/schemas/AccountType"
          },
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "newsOptIn": {
            "type": "boolean"
          },
          "demoToken": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "orgName",
          "adminEmail",
          "adminPassword",
          "firstName",
          "lastName"
        ]
      },
      "SignupResponse": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string"
          },
          "schemaName": {
            "type": "string"
          },
          "gatewaySubscriptionId": {
            "type": "string"
          },
          "gatewayPublicKey": {
            "type": "string"
          },
          "checkoutUrl": {
            "type": "string"
          }
        }
      },
      "SimulationDtos_AttackReportResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "total": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "succeededAttacks": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "resisted": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "inconclusive": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "pending": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "attackSuccessRate": {
            "type": "number",
            "format": "double"
          },
          "perScenario": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimulationDtos_AttackScenarioResult"
            }
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "total",
          "succeededAttacks",
          "resisted",
          "inconclusive",
          "pending"
        ]
      },
      "SimulationDtos_AttackScenarioResult": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/SimulationVerdict"
          },
          "deterministic": {
            "type": "boolean",
            "default": false
          },
          "reason": {
            "type": "string"
          },
          "runId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "deterministic"
        ]
      },
      "SimulationDtos_CreatePersonaRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          }
        }
      },
      "SimulationDtos_CreateSessionRequest": {
        "type": "object",
        "properties": {
          "personaKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxTurns": {
            "type": "integer",
            "format": "int32"
          },
          "budgetUsd": {
            "type": "number"
          }
        }
      },
      "SimulationDtos_PersonaResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "builtIn": {
            "type": "boolean",
            "default": false
          },
          "attack": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "builtIn",
          "attack"
        ]
      },
      "SimulationDtos_RunDetailResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "personaKey": {
            "type": "string"
          },
          "personaName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SimulationRunStatus"
          },
          "termination": {
            "$ref": "#/components/schemas/SimulationTermination"
          },
          "transcriptJson": {
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/SimulationVerdict"
          },
          "verdictReason": {
            "type": "string"
          },
          "turnCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "costUsd": {
            "type": "number"
          },
          "agentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "turnCount"
        ]
      },
      "SimulationDtos_RunSummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "personaKey": {
            "type": "string"
          },
          "personaName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SimulationRunStatus"
          },
          "termination": {
            "$ref": "#/components/schemas/SimulationTermination"
          },
          "verdict": {
            "$ref": "#/components/schemas/SimulationVerdict"
          },
          "verdictReason": {
            "type": "string"
          },
          "turnCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "costUsd": {
            "type": "number"
          },
          "agentVersionId": {
            "type": "string",
            "format": "uuid"
          },
          "errorMessage": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "turnCount"
        ]
      },
      "SimulationDtos_SessionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "personaKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxTurns": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "$ref": "#/components/schemas/SimulationSessionStatus"
          },
          "budgetUsd": {
            "type": "number"
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "maxTurns",
          "cancelRequested"
        ]
      },
      "SimulationRunStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "RUNNING",
          "PASSED",
          "FAILED",
          "ERROR",
          "CANCELLED"
        ]
      },
      "SimulationSessionStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "RUNNING",
          "COMPLETED",
          "CANCELLED"
        ]
      },
      "SimulationTermination": {
        "type": "string",
        "enum": [
          "GOAL_MET",
          "GOAL_FAILED",
          "MAX_TURNS",
          "AGENT_ERROR",
          "SIMULATOR_ERROR",
          "SAFETY_TRIP",
          "NO_PROGRESS"
        ]
      },
      "SimulationVerdict": {
        "type": "string",
        "enum": [
          "PASSED",
          "FAILED",
          "INCONCLUSIVE"
        ]
      },
      "SiteWidePromoRequest": {
        "type": "object",
        "properties": {
          "durationDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "reason": {
            "type": "string"
          },
          "sendEmail": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "durationDays",
          "sendEmail"
        ]
      },
      "SiteWidePromoResult": {
        "type": "object",
        "properties": {
          "grantedTenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteWidePromoService_GrantedTenant"
            }
          },
          "skippedAlreadyUnlimitedTenantIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "SiteWidePromoService_GrantedTenant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SkillController_AgentSkillsRequest": {
        "type": "object",
        "properties": {
          "skillsEnabled": {
            "type": "boolean"
          },
          "allowedSkillNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        }
      },
      "SkillController_AgentSkillsResponse": {
        "type": "object",
        "properties": {
          "skillsEnabled": {
            "type": "boolean",
            "default": false
          },
          "allowedSkillNames": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "activeSkills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillController_SkillSummaryResponse"
            }
          }
        },
        "required": [
          "skillsEnabled"
        ]
      },
      "SkillController_DistillPatternResponse": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "distinctSessions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "runs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "meanReward": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "sampleGoals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "distinctSessions",
          "runs",
          "meanReward"
        ]
      },
      "SkillController_DistillResponse": {
        "type": "object",
        "properties": {
          "patterns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillController_DistillPatternResponse"
            }
          },
          "proposedSkillNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skipped": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "SkillController_EnabledRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SkillController_ImportResponse": {
        "type": "object",
        "properties": {
          "skill": {
            "$ref": "#/components/schemas/SkillController_SkillDetailResponse"
          },
          "skippedPaths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SkillController_PendingImprovementResponse": {
        "type": "object",
        "properties": {
          "skillId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "files": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "rationale": {
            "type": "string"
          },
          "proposedBy": {
            "type": "string"
          },
          "proposedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillController_RegistryInstallRequest": {
        "type": "object",
        "properties": {
          "githubUrl": {
            "type": "string"
          },
          "replace": {
            "type": "boolean",
            "default": false
          },
          "expectedSha256": {
            "type": "string"
          }
        },
        "required": [
          "replace"
        ]
      },
      "SkillController_SkillDetailResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "skillMd": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillController_SkillFileEntry"
            }
          },
          "status": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "uses": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "agentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveness": {
            "type": "number",
            "format": "double"
          },
          "stale": {
            "type": "boolean",
            "default": false
          },
          "staleReason": {
            "type": "string"
          },
          "reviewNote": {
            "type": "string"
          },
          "frontmatter": {
            "type": "object",
            "additionalProperties": true
          },
          "selfCheck": {
            "$ref": "#/components/schemas/SkillLifecycleService_SelfCheck"
          }
        },
        "required": [
          "version",
          "uses",
          "stale"
        ]
      },
      "SkillController_SkillFileEntry": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "sizeBytes",
          "size"
        ]
      },
      "SkillController_SkillSummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "fileCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdBy": {
            "type": "string"
          },
          "pendingImprovement": {
            "type": "boolean",
            "default": false
          },
          "status": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "uses": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "agentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "effectiveness": {
            "type": "number",
            "format": "double"
          },
          "stale": {
            "type": "boolean",
            "default": false
          },
          "selfCheck": {
            "$ref": "#/components/schemas/SkillLifecycleService_SelfCheck"
          }
        },
        "required": [
          "enabled",
          "fileCount",
          "pendingImprovement",
          "version",
          "uses",
          "stale"
        ]
      },
      "SkillController_SkillWriteRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "skillMd": {
            "type": "string"
          }
        }
      },
      "SkillLifecycleController_AgentsRequest": {
        "type": "object",
        "properties": {
          "agentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "SkillLifecycleController_AgentsResponse": {
        "type": "object",
        "properties": {
          "agentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "unrestrictedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "SkillLifecycleController_RejectRequest": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "SkillLifecycleController_VersionSummary": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "note": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "contentSha256": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ]
      },
      "SkillLifecycleService_SelfCheck": {
        "type": "object",
        "properties": {
          "verdict": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SkillRegistryClient_RegistrySkill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "githubUrl": {
            "type": "string"
          },
          "registryUrl": {
            "type": "string"
          },
          "stars": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "stars"
        ]
      },
      "SkillRegistryClient_SearchResult": {
        "type": "object",
        "properties": {
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillRegistryClient_RegistrySkill"
            }
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "page",
          "totalPages",
          "total"
        ]
      },
      "SkillScanner_Finding": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/SkillScanner_Severity"
          },
          "excerpt": {
            "type": "string"
          },
          "where": {
            "type": "string"
          }
        }
      },
      "SkillScanner_Report": {
        "type": "object",
        "properties": {
          "riskLevel": {
            "$ref": "#/components/schemas/SkillScanner_RiskLevel"
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillScanner_Finding"
            }
          },
          "truncated": {
            "type": "boolean",
            "default": false
          },
          "scannerVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "truncated",
          "scannerVersion"
        ]
      },
      "SkillScanner_RiskLevel": {
        "type": "string",
        "enum": [
          "none",
          "low",
          "medium",
          "high"
        ]
      },
      "SkillScanner_Severity": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "SkillSupplyChainController_ApproveRequest": {
        "type": "object",
        "properties": {
          "expectedSha256": {
            "type": "string"
          },
          "acknowledgeHighRisk": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "acknowledgeHighRisk"
        ]
      },
      "SkillSupplyChainController_DraftPreviewRequest": {
        "type": "object",
        "properties": {
          "skillMd": {
            "type": "string"
          }
        }
      },
      "SkillSupplyChainController_RegistryPreviewRequest": {
        "type": "object",
        "properties": {
          "githubUrl": {
            "type": "string"
          }
        }
      },
      "SkillSupplyChainService_PreviewResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "replacesExisting": {
            "type": "boolean",
            "default": false
          },
          "scan": {
            "$ref": "#/components/schemas/SkillScanner_Report"
          },
          "disclaimer": {
            "type": "string"
          },
          "contentSha256": {
            "type": "string"
          }
        },
        "required": [
          "replacesExisting"
        ]
      },
      "SkillSupplyChainService_SecurityOverview": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "enforcing": {
            "type": "boolean",
            "default": false
          },
          "skills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkillSupplyChainService_SkillSecuritySummary"
            }
          }
        },
        "required": [
          "enabled",
          "enforcing"
        ]
      },
      "SkillSupplyChainService_SkillReviewItem": {
        "type": "object",
        "properties": {
          "skillId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "riskLevel": {
            "$ref": "#/components/schemas/SkillScanner_RiskLevel"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvedBy": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "attachedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SkillSupplyChainService_SkillSecurityReport": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "blocked": {
            "type": "boolean",
            "default": false
          },
          "enforcing": {
            "type": "boolean",
            "default": false
          },
          "contentSha256": {
            "type": "string"
          },
          "approvedSha256": {
            "type": "string"
          },
          "approvedBy": {
            "type": "string"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scan": {
            "$ref": "#/components/schemas/SkillScanner_Report"
          },
          "stagedScan": {
            "$ref": "#/components/schemas/SkillScanner_Report"
          },
          "attachedAgentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "blocked",
          "enforcing"
        ]
      },
      "SkillSupplyChainService_SkillSecuritySummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "riskLevel": {
            "$ref": "#/components/schemas/SkillScanner_RiskLevel"
          },
          "findingCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "blocked": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "findingCount",
          "blocked"
        ]
      },
      "SlackActivationRequest": {
        "type": "object",
        "properties": {
          "botToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "signingSecret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "botToken",
          "signingSecret"
        ]
      },
      "SlackCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "teamName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SlackCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SlackCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "SlackSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "SlackSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "SmartAiBudgetConfigUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "masterDailyUsd": {
            "type": "number"
          },
          "windowSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "defaultFeatureDailyUsd": {
            "type": "number"
          }
        }
      },
      "SmartAiFeatureConfigUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "dailyUsd": {
            "type": "number"
          }
        }
      },
      "SocialProvidersResponse": {
        "type": "object",
        "properties": {
          "providers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SpeakRequest": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000
          }
        }
      },
      "SpeakResponse": {
        "type": "object",
        "properties": {
          "audioBase64": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "speechText": {
            "type": "string"
          }
        }
      },
      "SpendCapService_CapStatus": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "capUsd": {
            "type": "number"
          },
          "monthToDateUsd": {
            "type": "number"
          },
          "percentUsed": {
            "type": "number"
          },
          "alertStage": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "blocked": {
            "type": "boolean",
            "default": false
          },
          "monthStart": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "alertStage",
          "blocked"
        ]
      },
      "SpendProtectionResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "cacheWindowDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "caching": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpendProtectionResponse_CachingProviderStatus"
            }
          },
          "costAwareRouting": {
            "$ref": "#/components/schemas/SpendProtectionResponse_CostMechanismStatus"
          },
          "toolSchemaMinimization": {
            "$ref": "#/components/schemas/SpendProtectionResponse_CostMechanismStatus"
          },
          "approvalGates": {
            "$ref": "#/components/schemas/SpendProtectionResponse_CostMechanismStatus"
          }
        },
        "required": [
          "cacheWindowDays"
        ]
      },
      "SpendProtectionResponse_CachingProviderStatus": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "default": false
          },
          "callsInWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "cacheReadTokenShare": {
            "type": "number",
            "format": "double"
          },
          "callsWithCacheHitShare": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "active",
          "callsInWindow"
        ]
      },
      "SpendProtectionResponse_CostMechanismStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "default": false
          },
          "description": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "active"
        ]
      },
      "SpendReport_AgentUsage": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        }
      },
      "SpendReport_DayUsage": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        }
      },
      "SpendReport_ModalityUsage": {
        "type": "object",
        "properties": {
          "modality": {
            "type": "string"
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        }
      },
      "SpendReport_ModelUsage": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "modality": {
            "type": "string"
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        }
      },
      "SpendReport_ProviderUsage": {
        "type": "object",
        "properties": {
          "providerName": {
            "type": "string"
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        }
      },
      "SpendReport_Summary": {
        "type": "object",
        "properties": {
          "fromDate": {
            "type": "string",
            "format": "date"
          },
          "toDate": {
            "type": "string",
            "format": "date"
          },
          "includesLiveToday": {
            "type": "boolean",
            "default": false
          },
          "metrics": {
            "$ref": "#/components/schemas/SpendReport_UsageMetrics"
          }
        },
        "required": [
          "includesLiveToday"
        ]
      },
      "SpendReport_UsageMetrics": {
        "type": "object",
        "properties": {
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "successRate": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "promptTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "completionTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "totalTokens": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "messageVolume": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "distinctSessions": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "estimatedCostUsd": {
            "type": "number"
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double"
          },
          "latencyP50Ms": {
            "type": "number",
            "format": "double"
          },
          "latencyP95Ms": {
            "type": "number",
            "format": "double"
          },
          "cacheHitRate": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "totalCalls",
          "errorCount",
          "successRate",
          "promptTokens",
          "completionTokens",
          "totalTokens",
          "messageVolume",
          "distinctSessions"
        ]
      },
      "StdioSandboxStatus": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "mechanism": {
            "type": "string"
          },
          "available": {
            "type": "boolean",
            "default": false
          },
          "degraded": {
            "type": "boolean",
            "default": false
          },
          "enforcing": {
            "type": "boolean",
            "default": false
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "networkAllowAll": {
            "type": "boolean",
            "default": false
          },
          "networkAllowCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "degraded",
          "enforcing",
          "required",
          "networkAllowAll",
          "networkAllowCount"
        ]
      },
      "StudioAppDomainController_AddRequest": {
        "type": "object",
        "properties": {
          "hostname": {
            "type": "string",
            "maxLength": 253
          }
        }
      },
      "StudioAppDomainController_DomainView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "lastError": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "verifiedAt": {
            "type": "string"
          },
          "lastCheckedAt": {
            "type": "string"
          },
          "dns": {
            "$ref": "#/components/schemas/StudioAppDomainService_DnsInstructions"
          }
        }
      },
      "StudioAppDomainService_DnsInstructions": {
        "type": "object",
        "properties": {
          "txtName": {
            "type": "string"
          },
          "txtValue": {
            "type": "string"
          },
          "cnameTarget": {
            "type": "string"
          },
          "aTarget": {
            "type": "string"
          }
        }
      },
      "StudioAppOwnerController_AppSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "authMode": {
            "type": "string"
          },
          "aiEnabled": {
            "type": "boolean",
            "default": false
          },
          "publishedVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "updatedAt": {
            "type": "string"
          },
          "userCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "connectionCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "publicUrl": {
            "type": "string"
          }
        },
        "required": [
          "aiEnabled",
          "publishedVersion",
          "userCount",
          "connectionCount"
        ]
      },
      "StudioAppPublicController_AiChatRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 4000
          }
        }
      },
      "StudioAppPublicController_CallRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string",
            "maxLength": 2000
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "StudioAppPublicController_LoginRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254
          },
          "password": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "StudioAppPublicController_SignupRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254
          },
          "password": {
            "type": "string",
            "maxLength": 128
          },
          "name": {
            "type": "string",
            "maxLength": 120
          }
        }
      },
      "StudioAppService_ConnectionSpec": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "shareId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "requestTemplate": {
            "type": "string"
          },
          "responsePath": {
            "type": "string"
          },
          "requiresAuth": {
            "type": "boolean"
          }
        }
      },
      "StudioAppService_PublishRequest": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "authMode": {
            "type": "string"
          },
          "aiEnabled": {
            "type": "boolean"
          },
          "aiSystemPrompt": {
            "type": "string"
          },
          "aiMaxTokens": {
            "type": "integer",
            "format": "int32"
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StudioAppService_ConnectionSpec"
            }
          }
        }
      },
      "StudioCollabController_CommentBody": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "versionAt": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "StudioCollabController_CommentView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "versionAt": {
            "type": "integer",
            "format": "int64"
          },
          "authorSubject": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "resolved": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "createdAt",
          "resolved"
        ]
      },
      "StudioCollabController_InviteBody": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "StudioCollabController_MemberView": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "addedAt": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "StudioCollabController_ResolveBody": {
        "type": "object",
        "properties": {
          "resolved": {
            "type": "boolean"
          }
        }
      },
      "StudioProjectController_ProjectView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "emoji": {
            "type": "string"
          },
          "settings": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "updatedAt": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "versionCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StudioProjectController_VersionView"
            }
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "updatedAt",
          "versionCount"
        ]
      },
      "StudioProjectController_UpsertBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "emoji": {
            "type": "string"
          },
          "settings": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer",
            "format": "int64"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StudioProjectController_VersionBody"
            }
          }
        }
      },
      "StudioProjectController_VersionBody": {
        "type": "object",
        "properties": {
          "at": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "note": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "html": {
            "type": "string"
          }
        },
        "required": [
          "at"
        ]
      },
      "StudioProjectController_VersionView": {
        "type": "object",
        "properties": {
          "at": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "note": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "authorSubject": {
            "type": "string"
          }
        },
        "required": [
          "at"
        ]
      },
      "SystemStatusResponse": {
        "type": "object",
        "properties": {
          "overallStatus": {
            "type": "string"
          },
          "database": {
            "$ref": "#/components/schemas/SystemStatusResponse_DatabaseStatus"
          },
          "redis": {
            "$ref": "#/components/schemas/SystemStatusResponse_ComponentStatus"
          },
          "kafka": {
            "$ref": "#/components/schemas/SystemStatusResponse_KafkaStatus"
          },
          "diskSpace": {
            "$ref": "#/components/schemas/SystemStatusResponse_ComponentStatus"
          },
          "jvm": {
            "$ref": "#/components/schemas/SystemStatusResponse_JvmStatus"
          },
          "mcp": {
            "$ref": "#/components/schemas/SystemStatusResponse_McpStatus"
          },
          "llm": {
            "$ref": "#/components/schemas/SystemStatusResponse_LlmStatus"
          },
          "sidecar": {
            "$ref": "#/components/schemas/SystemStatusResponse_ComponentStatus"
          }
        }
      },
      "SystemStatusResponse_ComponentStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "SystemStatusResponse_DatabaseStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "activeConnections": {
            "type": "integer",
            "format": "int32"
          },
          "idleConnections": {
            "type": "integer",
            "format": "int32"
          },
          "totalConnections": {
            "type": "integer",
            "format": "int32"
          },
          "maxPoolSize": {
            "type": "integer",
            "format": "int32"
          },
          "threadsAwaitingConnection": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "SystemStatusResponse_JvmStatus": {
        "type": "object",
        "properties": {
          "heapUsedMb": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "heapMaxMb": {
            "type": "integer",
            "format": "int64"
          },
          "uptimeSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "availableProcessors": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "heapUsedMb",
          "uptimeSeconds",
          "availableProcessors"
        ]
      },
      "SystemStatusResponse_KafkaStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "config": {
            "$ref": "#/components/schemas/SystemStatusResponse_KafkaStatus_KafkaConfig"
          },
          "queue": {
            "$ref": "#/components/schemas/SystemStatusResponse_KafkaStatus_KafkaQueue"
          },
          "dlq": {
            "$ref": "#/components/schemas/SystemStatusResponse_KafkaStatus_KafkaDlq"
          }
        }
      },
      "SystemStatusResponse_KafkaStatus_KafkaConfig": {
        "type": "object",
        "properties": {
          "bootstrapServers": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "dltTopic": {
            "type": "string"
          },
          "partitions": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "replicationFactor": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "consumerGroup": {
            "type": "string"
          },
          "maxRetries": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "retryBackoffMs": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "partitions",
          "replicationFactor",
          "maxRetries",
          "retryBackoffMs"
        ]
      },
      "SystemStatusResponse_KafkaStatus_KafkaDlq": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string"
          },
          "messageCount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "SystemStatusResponse_KafkaStatus_KafkaQueue": {
        "type": "object",
        "properties": {
          "pendingCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "deadLetteredCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "pendingCount",
          "deadLetteredCount"
        ]
      },
      "SystemStatusResponse_LlmStatus": {
        "type": "object",
        "properties": {
          "totalCalls": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "errorCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "avgLatencyMs": {
            "type": "number",
            "format": "double"
          }
        },
        "required": [
          "totalCalls",
          "errorCount"
        ]
      },
      "SystemStatusResponse_McpServerSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "SystemStatusResponse_McpStatus": {
        "type": "object",
        "properties": {
          "totalServers": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "enabledServers": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "servers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SystemStatusResponse_McpServerSummary"
            }
          }
        },
        "required": [
          "totalServers",
          "enabledServers"
        ]
      },
      "TeamsActivationRequest": {
        "type": "object",
        "properties": {
          "appId": {
            "type": "string",
            "minLength": 1
          },
          "appPassword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "aadTenantId": {
            "type": "string"
          }
        },
        "required": [
          "appId",
          "appPassword"
        ]
      },
      "TeamsCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "appId": {
            "type": "string"
          },
          "aadTenantId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TeamsCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamsCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "TeamsSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "TeamsSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "TelegramActivationRequest": {
        "type": "object",
        "properties": {
          "botToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "botToken"
        ]
      },
      "TelegramCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "botUserId": {
            "type": "string"
          },
          "botUsername": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TelegramCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TelegramCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "TelegramSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "TelegramSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "TemplateAiReview": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/TemplateAiReview_Status"
          },
          "summary": {
            "type": "string"
          },
          "blockers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateReadinessReport_Issue"
            }
          },
          "advisories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateReadinessReport_Issue"
            }
          }
        }
      },
      "TemplateAiReview_Status": {
        "type": "string",
        "enum": [
          "PASSED",
          "ISSUES",
          "UNAVAILABLE"
        ]
      },
      "TemplateCreateRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "summary": {
            "type": "string",
            "maxLength": 4000
          },
          "category": {
            "type": "string",
            "maxLength": 64
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "kind",
          "sourceId",
          "title"
        ]
      },
      "TemplateDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "config": {},
          "importCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "verified": {
            "type": "boolean",
            "default": false
          },
          "ratingCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "ratingAvg": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateRequirement"
            }
          }
        },
        "required": [
          "importCount",
          "verified",
          "ratingCount",
          "ratingAvg",
          "version"
        ]
      },
      "TemplateImportResponse": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "resourceId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "TemplateKind": {
        "type": "string",
        "enum": [
          "AGENT",
          "WORKFLOW"
        ]
      },
      "TemplateRatingRequest": {
        "type": "object",
        "properties": {
          "stars": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 5
          },
          "review": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "stars"
        ]
      },
      "TemplateRatingView": {
        "type": "object",
        "properties": {
          "stars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "review": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "stars"
        ]
      },
      "TemplateReadinessReport": {
        "type": "object",
        "properties": {
          "ready": {
            "type": "boolean",
            "default": false
          },
          "blockers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateReadinessReport_Issue"
            }
          },
          "advisories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateReadinessReport_Issue"
            }
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateRequirement"
            }
          },
          "derivedTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ready"
        ]
      },
      "TemplateReadinessReport_Issue": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "principle": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "fix": {
            "type": "string"
          }
        }
      },
      "TemplateRequirement": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TemplateRequirement_Type"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "setupPath": {
            "type": "string"
          }
        },
        "required": [
          "required"
        ]
      },
      "TemplateRequirement_Type": {
        "type": "string",
        "enum": [
          "MCP_SERVER",
          "GOOGLE_CONNECTION",
          "KNOWLEDGE_BASE",
          "CODE_INTEL",
          "CODE_SANDBOX",
          "MEMORY",
          "HUMAN_APPROVAL",
          "MODEL_KEY",
          "VOICE_MODEL",
          "VIDEO_MODEL",
          "BUILT_IN_TOOL"
        ]
      },
      "TemplateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/TemplateStatus"
          },
          "config": {},
          "sourceTenantId": {
            "type": "string"
          },
          "submittedBy": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reviewedBy": {
            "type": "string"
          },
          "reviewedAt": {
            "type": "string",
            "format": "date-time"
          },
          "rejectReason": {
            "type": "string"
          },
          "importCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "verified": {
            "type": "boolean",
            "default": false
          },
          "verifiedBy": {
            "type": "string"
          },
          "verifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ratingCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "ratingAvg": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "review": {
            "$ref": "#/components/schemas/TemplateReview"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateRequirement"
            }
          }
        },
        "required": [
          "importCount",
          "verified",
          "ratingCount",
          "ratingAvg",
          "version"
        ]
      },
      "TemplateReview": {
        "type": "object",
        "properties": {
          "standardVersion": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "rules": {
            "$ref": "#/components/schemas/TemplateReadinessReport"
          },
          "ai": {
            "$ref": "#/components/schemas/TemplateAiReview"
          },
          "reviewedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "standardVersion"
        ]
      },
      "TemplateStandard_Checker": {
        "type": "string",
        "enum": [
          "RULES",
          "AI"
        ]
      },
      "TemplateStandard_Guide": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "intro": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "principles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateStandard_Principle"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateStandard_Rule"
            }
          },
          "examplePrompt": {
            "type": "string"
          },
          "exampleSummary": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ]
      },
      "TemplateStandard_Principle": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        }
      },
      "TemplateStandard_Rule": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "principle": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/TemplateStandard_Severity"
          },
          "checker": {
            "$ref": "#/components/schemas/TemplateStandard_Checker"
          },
          "requirement": {
            "type": "string"
          },
          "howToFix": {
            "type": "string"
          }
        }
      },
      "TemplateStandard_Severity": {
        "type": "string",
        "enum": [
          "BLOCKER",
          "ADVISORY"
        ]
      },
      "TemplateStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "PENDING",
          "APPROVED",
          "REJECTED",
          "WITHDRAWN"
        ]
      },
      "TemplateSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "importCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "verified": {
            "type": "boolean",
            "default": false
          },
          "ratingCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "ratingAvg": {
            "type": "number",
            "format": "double",
            "default": 0
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "importCount",
          "verified",
          "ratingCount",
          "ratingAvg",
          "version"
        ]
      },
      "TemplateUpdateRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "summary": {
            "type": "string",
            "maxLength": 4000
          },
          "category": {
            "type": "string",
            "maxLength": 64
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "title"
        ]
      },
      "TenantApiKeyCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name"
        ]
      },
      "TenantApiKeyCreatedResponse": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/TenantApiKeyResponse"
          },
          "apiKey": {
            "type": "string"
          }
        }
      },
      "TenantApiKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "createdBy": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "expired": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled",
          "expired"
        ]
      },
      "TenantApiKeyToggleRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "TenantDataDeletionRequest": {
        "type": "object",
        "properties": {
          "confirmOrgName": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "confirmOrgName"
        ]
      },
      "TenantDataUsageResponse": {
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenantId": {
            "type": "string"
          },
          "systems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantDataUsageResponse_SystemUsage"
            }
          }
        }
      },
      "TenantDataUsageResponse_LiveStat": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {}
        }
      },
      "TenantDataUsageResponse_SystemUsage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isolationFact": {
            "type": "string"
          },
          "liveStat": {
            "$ref": "#/components/schemas/TenantDataUsageResponse_LiveStat"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "TenantDefaultModelService_DefaultModel": {
        "type": "object",
        "properties": {
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/TenantDefaultModelService_Source"
          },
          "needsAttention": {
            "type": "boolean",
            "default": false
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "needsAttention"
        ]
      },
      "TenantDefaultModelService_Source": {
        "type": "string",
        "enum": [
          "PLATFORM_POOL",
          "WORKING_PROVIDER",
          "ACTIVE_PROVIDER",
          "NONE"
        ]
      },
      "TenantDeletionController_DeleteTenantRequest": {
        "type": "object",
        "properties": {
          "confirmTenantName": {
            "type": "string"
          }
        }
      },
      "TenantFeatureFlagController_FeatureFlagEvaluationResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "variant": {
            "type": "string"
          }
        }
      },
      "TenantPlan": {
        "type": "string",
        "enum": [
          "FREE",
          "PREMIUM",
          "UNLIMITED"
        ]
      },
      "TenantSettingsResponse": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "accountType": {
            "$ref": "#/components/schemas/AccountType"
          },
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "maxUsers": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxAgents": {
            "type": "integer",
            "format": "int32"
          },
          "organizationName": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "maxWorkflows": {
            "type": "integer",
            "format": "int32"
          },
          "usePlatformLlm": {
            "type": "boolean",
            "default": false
          },
          "byokAllowed": {
            "type": "boolean",
            "default": false
          },
          "whatsappAllowed": {
            "type": "boolean",
            "default": false
          },
          "whiteLabel": {
            "type": "boolean",
            "default": false
          },
          "maxKbCollections": {
            "type": "integer",
            "format": "int32"
          },
          "liveVisionAllowed": {
            "type": "boolean",
            "default": false
          },
          "brandDisplayName": {
            "type": "string"
          },
          "brandLogoUrl": {
            "type": "string"
          },
          "freeMode": {
            "type": "boolean",
            "default": false
          },
          "externalChannelsAllowed": {
            "type": "boolean",
            "default": false
          },
          "developerApiAllowed": {
            "type": "boolean",
            "default": false
          },
          "ssoAllowed": {
            "type": "boolean",
            "default": false
          },
          "scimAllowed": {
            "type": "boolean",
            "default": false
          },
          "workflowExportAllowed": {
            "type": "boolean",
            "default": false
          },
          "automationAllowed": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "maxUsers",
          "usePlatformLlm",
          "byokAllowed",
          "whatsappAllowed",
          "whiteLabel",
          "liveVisionAllowed",
          "freeMode",
          "externalChannelsAllowed",
          "developerApiAllowed",
          "ssoAllowed",
          "scimAllowed",
          "workflowExportAllowed",
          "automationAllowed"
        ]
      },
      "TenantSsoConfig_ProviderType": {
        "type": "string",
        "enum": [
          "OIDC",
          "SAML"
        ]
      },
      "TenantSsoController_ScimTokenView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TenantSsoService_TenantSsoStatus": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "default": false
          },
          "providerType": {
            "$ref": "#/components/schemas/TenantSsoConfig_ProviderType"
          },
          "displayName": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "realmEnabled": {
            "type": "boolean"
          },
          "clientSecretSet": {
            "type": "boolean",
            "default": false
          },
          "brokerRedirectUri": {
            "type": "string"
          }
        },
        "required": [
          "configured",
          "clientSecretSet"
        ]
      },
      "TenantSsoUpsertRequest": {
        "type": "object",
        "properties": {
          "providerType": {
            "$ref": "#/components/schemas/TenantSsoConfig_ProviderType"
          },
          "displayName": {
            "type": "string",
            "maxLength": 255
          },
          "enabled": {
            "type": "boolean"
          },
          "oidcDiscoveryUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcAuthorizationUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcTokenUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcUserInfoUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcJwksUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcIssuer": {
            "type": "string",
            "maxLength": 2048
          },
          "oidcClientId": {
            "type": "string",
            "maxLength": 512
          },
          "clientSecret": {
            "type": "string",
            "maxLength": 2048
          },
          "samlEntityId": {
            "type": "string",
            "maxLength": 2048
          },
          "samlSsoUrl": {
            "type": "string",
            "maxLength": 2048
          },
          "samlX509Cert": {
            "type": "string"
          },
          "samlNameIdFormat": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "providerType",
          "displayName"
        ]
      },
      "TenantSubscriptionStatusResponse": {
        "type": "object",
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "subscriptionStatus": {
            "type": "string"
          },
          "cancelScheduled": {
            "type": "boolean",
            "default": false
          },
          "pastDue": {
            "type": "boolean",
            "default": false
          },
          "pastDueSince": {
            "type": "string",
            "format": "date-time"
          },
          "compPlanReason": {
            "type": "string"
          },
          "compPlanExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "cancelScheduled",
          "pastDue"
        ]
      },
      "TenantUpgradeOptionsResponse": {
        "type": "object",
        "properties": {
          "billingEnabled": {
            "type": "boolean",
            "default": false
          },
          "gateway": {
            "type": "string"
          },
          "currencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "annualCurrencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "billingEnabled"
        ]
      },
      "TenantUpgradeRequest": {
        "type": "object",
        "properties": {
          "targetPlan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "gatewayName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "couponCode": {
            "type": "string"
          }
        },
        "required": [
          "targetPlan"
        ]
      },
      "TenantUpgradeResponse": {
        "type": "object",
        "properties": {
          "targetPlan": {
            "$ref": "#/components/schemas/TenantPlan"
          },
          "gatewaySubscriptionId": {
            "type": "string"
          },
          "gatewayPublicKey": {
            "type": "string"
          },
          "checkoutUrl": {
            "type": "string"
          }
        }
      },
      "TenantUsageQuotaResponse": {
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "usesPlatformPool": {
            "type": "boolean",
            "default": false
          },
          "tokensUsedMonth": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "tokensMonthlyLimit": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "limitEnforced": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "usesPlatformPool",
          "tokensUsedMonth",
          "tokensMonthlyLimit",
          "limitEnforced"
        ]
      },
      "TextModelProvider": {
        "type": "string",
        "enum": [
          "ANTHROPIC",
          "OPENAI",
          "GEMINI",
          "GROK",
          "SARVAM",
          "MISTRAL",
          "DEEPSEEK",
          "GROQ",
          "META",
          "OLLAMA",
          "LOCAL_OPENAI",
          "OPENROUTER"
        ]
      },
      "TextSearchConfigCatalog_ConfigOption": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "isDefault"
        ]
      },
      "ToolArgPolicyDtos_Limits": {
        "type": "object",
        "properties": {
          "maxPolicies": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxRulesPerPolicy": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxDocumentChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxPatternLength": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxEnumValues": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxPolicies",
          "maxRulesPerPolicy",
          "maxDocumentChars",
          "maxPatternLength",
          "maxEnumValues"
        ]
      },
      "ToolArgPolicyDtos_PoliciesResponse": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "policies": {},
          "limits": {
            "$ref": "#/components/schemas/ToolArgPolicyDtos_Limits"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "ToolCallCapabilityProbe_ServerKind": {
        "type": "string",
        "enum": [
          "OLLAMA",
          "OLLAMA_WITHOUT_FORMAT",
          "VLLM",
          "LLAMA_CPP",
          "OTHER"
        ]
      },
      "ToolCallGrade": {
        "type": "string",
        "enum": [
          "STRUCTURED",
          "TEXT",
          "NONE"
        ]
      },
      "ToolClassificationController_ToolClassificationListResponse": {
        "type": "object",
        "properties": {
          "enforced": {
            "type": "boolean",
            "default": false
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolClassificationController_ToolClassificationRow"
            }
          }
        },
        "required": [
          "enforced"
        ]
      },
      "ToolClassificationController_ToolClassificationRow": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "serverId": {
            "type": "string"
          },
          "serverName": {
            "type": "string"
          },
          "trust": {
            "type": "string"
          },
          "sensitivity": {
            "type": "string"
          },
          "determinism": {
            "type": "string"
          },
          "irreversible": {
            "type": "boolean",
            "default": false
          },
          "requiredScope": {
            "type": "string"
          },
          "needsToolContext": {
            "type": "boolean",
            "default": false
          },
          "blocked": {
            "type": "boolean",
            "default": false
          },
          "blockedReason": {
            "type": "string"
          },
          "classifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "classifiedBy": {
            "type": "string"
          }
        },
        "required": [
          "irreversible",
          "needsToolContext",
          "blocked"
        ]
      },
      "ToolDescriptor": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ToolRouterMode": {
        "type": "string",
        "enum": [
          "FORMAT",
          "REQUIRED"
        ]
      },
      "TrajectoryEvalDtos_ActualStep": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string"
          },
          "args": {},
          "ok": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "ok"
        ]
      },
      "TrajectoryEvalDtos_ActualTrajectory": {
        "type": "object",
        "properties": {
          "resultId": {
            "type": "string",
            "format": "uuid"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrajectoryEvalDtos_ActualStep"
            }
          },
          "suggestedSpec": {}
        }
      },
      "TrajectoryEvalDtos_CaseTrajectory": {
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "trajectory": {},
          "hasOtherGrader": {
            "type": "boolean",
            "default": false
          },
          "datasetContentHash": {
            "type": "string"
          }
        },
        "required": [
          "hasOtherGrader"
        ]
      },
      "TrajectoryEvalDtos_Config": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "modes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxSteps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxArgsPerStep": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxActualSteps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "enabled",
          "maxSteps",
          "maxArgsPerStep",
          "maxActualSteps"
        ]
      },
      "TrajectoryEvalDtos_RunCaseTrajectory": {
        "type": "object",
        "properties": {
          "resultId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "userMessage": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          },
          "overallScore": {
            "type": "number",
            "format": "double"
          },
          "trajectoryScore": {
            "type": "number",
            "format": "double"
          },
          "report": {}
        },
        "required": [
          "position"
        ]
      },
      "TrajectoryEvalDtos_RunTrajectories": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrajectoryEvalDtos_RunCaseTrajectory"
            }
          }
        }
      },
      "TrajectoryEvalDtos_SetCaseRequest": {
        "type": "object",
        "properties": {
          "trajectory": {}
        }
      },
      "TranscriptView_Entry": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "error"
        ]
      },
      "TranslationJobSettingsResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "cronScheduleDisplay": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "workflowPathHint": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          },
          "lastTriggeredAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastTriggeredBy": {
            "type": "string"
          },
          "lastTriggerStatus": {
            "type": "string"
          },
          "lastTriggerMessage": {
            "type": "string"
          }
        }
      },
      "TranslationJobSettingsUpdateRequest": {
        "type": "object",
        "properties": {
          "cronScheduleDisplay": {
            "type": "string"
          },
          "providerName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "model": {
            "type": "string"
          },
          "workflowPathHint": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "TrialClaimRequest": {
        "type": "object",
        "properties": {
          "trigger": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "[A-Za-z0-9][A-Za-z0-9._-]*"
          }
        },
        "required": [
          "trigger"
        ]
      },
      "TrialStatusResponse": {
        "type": "object",
        "properties": {
          "eligible": {
            "type": "boolean",
            "default": false
          },
          "claimed": {
            "type": "boolean",
            "default": false
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "eligible",
          "claimed"
        ]
      },
      "TrifectaStatusResponse": {
        "type": "object",
        "properties": {
          "privateDataTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "untrustedContentTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "egressTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unclassifiedTools": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lethalTrifecta": {
            "type": "boolean",
            "default": false
          },
          "warning": {
            "type": "string"
          },
          "enforcement": {
            "type": "string"
          },
          "enforced": {
            "type": "boolean",
            "default": false
          },
          "gated": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "lethalTrifecta",
          "enforced",
          "gated"
        ]
      },
      "TrustDtos_EvidenceLine": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "met": {
            "type": "boolean",
            "default": false
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "met"
        ]
      },
      "TrustDtos_TrustChange": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "fromRung": {
            "type": "string"
          },
          "toRung": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "effects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrustDtos_EvidenceLine"
            }
          }
        },
        "required": [
          "version"
        ]
      },
      "TrustDtos_TrustProposal": {
        "type": "object",
        "properties": {
          "eligible": {
            "type": "boolean",
            "default": false
          },
          "currentRung": {
            "type": "string"
          },
          "targetRung": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrustDtos_EvidenceLine"
            }
          },
          "diff": {},
          "effects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "eligible"
        ]
      },
      "TtsModelProvider": {
        "type": "string",
        "enum": [
          "ELEVENLABS",
          "SARVAM"
        ]
      },
      "TuningMode": {
        "type": "string",
        "enum": [
          "SIMPLE",
          "MANUAL"
        ]
      },
      "TurnEvent": {
        "type": "object",
        "properties": {
          "turnId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "seq": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "type": {
            "$ref": "#/components/schemas/TurnEventType"
          },
          "payloadHash": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "prevHash": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "seq"
        ]
      },
      "TurnEventType": {
        "type": "string",
        "enum": [
          "INTAKE",
          "GUARD",
          "MODEL_CALL",
          "TOOL_CALL",
          "APPROVAL",
          "VERIFY",
          "COMMIT"
        ]
      },
      "TurnFeedbackRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "turnRef": {
            "type": "string",
            "minLength": 1
          },
          "signal": {
            "$ref": "#/components/schemas/FeedbackSignal"
          },
          "rating": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 5
          },
          "comment": {
            "type": "string"
          },
          "editedAnswer": {
            "type": "string"
          }
        },
        "required": [
          "turnRef",
          "signal"
        ]
      },
      "TurnJournalService_JournalView": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "turnId": {
            "type": "string",
            "format": "uuid"
          },
          "chainIntact": {
            "type": "boolean",
            "default": false
          },
          "brokenAtSeq": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "verification": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurnEvent"
            }
          }
        },
        "required": [
          "chainIntact",
          "brokenAtSeq"
        ]
      },
      "TurnJournalService_SessionView": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string"
          },
          "turns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurnSummary"
            }
          }
        }
      },
      "TurnSummary": {
        "type": "object",
        "properties": {
          "turnId": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastEventAt": {
            "type": "string",
            "format": "date-time"
          },
          "events": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "events"
        ]
      },
      "TutorDtos_CreatePlanRequest": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_ModuleInput"
            }
          }
        }
      },
      "TutorDtos_DueCardView": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "format": "uuid"
          },
          "planTopic": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "cardId": {
            "type": "string"
          },
          "lessonId": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueAt": {
            "type": "string"
          },
          "reps": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "lapses": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "reps",
          "lapses"
        ]
      },
      "TutorDtos_DueReviews": {
        "type": "object",
        "properties": {
          "cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_DueCardView"
            }
          },
          "totalDue": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "sessionCap": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "totalDue",
          "sessionCap"
        ]
      },
      "TutorDtos_GeneratePlanRequest": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "weeklyMinutes": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TutorDtos_LessonContentInput": {
        "type": "object",
        "properties": {
          "explanation": {
            "type": "string"
          },
          "keyPoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workedExample": {
            "type": "string"
          }
        }
      },
      "TutorDtos_LessonContentView": {
        "type": "object",
        "properties": {
          "explanation": {
            "type": "string"
          },
          "keyPoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workedExample": {
            "type": "string"
          }
        }
      },
      "TutorDtos_LessonInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/TutorDtos_LessonContentInput"
          },
          "quiz": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_QuizInput"
            }
          }
        }
      },
      "TutorDtos_LessonView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "objective": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "generated": {
            "type": "boolean",
            "default": false
          },
          "content": {
            "$ref": "#/components/schemas/TutorDtos_LessonContentView"
          },
          "quiz": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_QuizQuestionView"
            }
          }
        },
        "required": [
          "generated"
        ]
      },
      "TutorDtos_ModuleInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "lessons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_LessonInput"
            }
          }
        }
      },
      "TutorDtos_ModuleView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "lessons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_LessonView"
            }
          }
        }
      },
      "TutorDtos_PlanSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "topic": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalLessons": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "completedLessons": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "dueReviews": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tutorAgentId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "totalLessons",
          "completedLessons",
          "dueReviews"
        ]
      },
      "TutorDtos_PlanView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "topic": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalLessons": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "completedLessons": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "dueReviews": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "tutorAgentId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "modules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TutorDtos_ModuleView"
            }
          }
        },
        "required": [
          "totalLessons",
          "completedLessons",
          "dueReviews"
        ]
      },
      "TutorDtos_QuizAnswerRequest": {
        "type": "object",
        "properties": {
          "questionId": {
            "type": "string"
          },
          "selectedIndex": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TutorDtos_QuizAnswerResult": {
        "type": "object",
        "properties": {
          "questionId": {
            "type": "string"
          },
          "correct": {
            "type": "boolean",
            "default": false
          },
          "selectedIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "correctIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "explanation": {
            "type": "string"
          },
          "addedToReview": {
            "type": "boolean",
            "default": false
          },
          "lessonStatus": {
            "type": "string"
          }
        },
        "required": [
          "correct",
          "selectedIndex",
          "correctIndex",
          "addedToReview"
        ]
      },
      "TutorDtos_QuizInput": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "correctIndex": {
            "type": "integer",
            "format": "int32"
          },
          "explanation": {
            "type": "string"
          }
        }
      },
      "TutorDtos_QuizQuestionView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "answered": {
            "type": "boolean",
            "default": false
          },
          "selectedIndex": {
            "type": "integer",
            "format": "int32"
          },
          "correct": {
            "type": "boolean"
          },
          "correctIndex": {
            "type": "integer",
            "format": "int32"
          },
          "explanation": {
            "type": "string"
          }
        },
        "required": [
          "answered"
        ]
      },
      "TutorDtos_ReviewAnswerRequest": {
        "type": "object",
        "properties": {
          "selectedIndex": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TutorDtos_ReviewAnswerResult": {
        "type": "object",
        "properties": {
          "cardId": {
            "type": "string"
          },
          "correct": {
            "type": "boolean",
            "default": false
          },
          "selectedIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "correctIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "explanation": {
            "type": "string"
          },
          "nextDueAt": {
            "type": "string"
          },
          "intervalDays": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "remainingDue": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "correct",
          "selectedIndex",
          "correctIndex",
          "intervalDays",
          "remainingDue"
        ]
      },
      "TutorDtos_TutorAgentRequest": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "TutorDtos_TutorAgentResponse": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "created": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "created"
        ]
      },
      "TutorDtos_TutorLimits": {
        "type": "object",
        "properties": {
          "maxPlansPerUser": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxLessonsPerPlan": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxTopicChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "reviewSessionCap": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "generationsPerHour": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxPlansPerUser",
          "maxLessonsPerPlan",
          "maxTopicChars",
          "reviewSessionCap",
          "generationsPerHour"
        ]
      },
      "TutorDtos_TutorStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "generationAvailable": {
            "type": "boolean",
            "default": false
          },
          "remindersEnabled": {
            "type": "boolean",
            "default": false
          },
          "limits": {
            "$ref": "#/components/schemas/TutorDtos_TutorLimits"
          }
        },
        "required": [
          "enabled",
          "generationAvailable",
          "remindersEnabled"
        ]
      },
      "TwilioActivationRequest": {
        "type": "object",
        "properties": {
          "accountSid": {
            "type": "string",
            "minLength": 1
          },
          "authToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "apiKeySid": {
            "type": "string"
          },
          "apiKeySecret": {
            "type": "string",
            "maxLength": 4096
          },
          "whatsAppFromNumber": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accountSid",
          "authToken",
          "whatsAppFromNumber"
        ]
      },
      "TwilioCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "accountSid": {
            "type": "string"
          },
          "apiKeySid": {
            "type": "string"
          },
          "usesApiKey": {
            "type": "boolean",
            "default": false
          },
          "whatsAppFromNumber": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TwilioCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastValidatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "usesApiKey"
        ]
      },
      "TwilioCredentialStatus": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "INVALID",
          "DISCONNECTED"
        ]
      },
      "UnknownSenderPolicy": {
        "type": "string",
        "enum": [
          "PAIR",
          "IGNORE"
        ]
      },
      "UpdateAiModelPreferenceRequest": {
        "type": "object",
        "properties": {
          "providerName": {
            "type": "string"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "UpdateCapabilitiesRequest": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 32
          }
        }
      },
      "UpdateExperienceModeRequest": {
        "type": "object",
        "properties": {
          "experienceMode": {
            "$ref": "#/components/schemas/ExperienceMode"
          },
          "usePlatformLlm": {
            "type": "boolean"
          },
          "brandDisplayName": {
            "type": "string",
            "maxLength": 64
          },
          "brandLogoUrl": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "experienceMode"
        ]
      },
      "UpdateFallbackAlertThresholdRequest": {
        "type": "object",
        "properties": {
          "threshold": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "threshold"
        ]
      },
      "UpdatePhoneNumberRequest": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\+[1-9]\\d{7,14}$"
          }
        },
        "required": [
          "phoneNumber"
        ]
      },
      "UserMemoryController_BlockView": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UserMemoryController_ContentRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          }
        }
      },
      "UserMemoryController_FactCreateRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserMemoryController_FactView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "useCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "useCount"
        ]
      },
      "UserMemoryController_ForgetAllResult": {
        "type": "object",
        "properties": {
          "agentFacts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "sharedAndBlocks": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "graphEntities": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "graphErased": {
            "type": "boolean",
            "default": false
          },
          "agentErased": {
            "type": "boolean",
            "default": false
          },
          "sharedErased": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "agentFacts",
          "sharedAndBlocks",
          "graphEntities",
          "graphErased",
          "agentErased",
          "sharedErased"
        ]
      },
      "UserMemoryController_Limits": {
        "type": "object",
        "properties": {
          "maxCharsPerBlock": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxProjectBlocks": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxFactChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "maxCharsPerBlock",
          "maxProjectBlocks",
          "maxFactChars"
        ]
      },
      "UserMemoryController_MemoryExport": {
        "type": "object",
        "properties": {
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMemoryController_BlockView"
            }
          },
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMemoryController_FactView"
            }
          }
        }
      },
      "UserMemoryController_MemoryOverview": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "blocksEnabled": {
            "type": "boolean",
            "default": false
          },
          "limits": {
            "$ref": "#/components/schemas/UserMemoryController_Limits"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMemoryController_BlockView"
            }
          },
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserMemoryController_FactView"
            }
          },
          "selfServiceEnabled": {
            "type": "boolean",
            "default": false
          },
          "activeProjectEnabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "available",
          "blocksEnabled",
          "selfServiceEnabled",
          "activeProjectEnabled"
        ]
      },
      "UserToolScriptRequest": {
        "type": "object",
        "properties": {
          "toolName": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "expression": {
            "type": "string",
            "minLength": 1
          },
          "inputSchemaJson": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "expression"
        ]
      },
      "UserToolScriptResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "toolName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "expression": {
            "type": "string"
          },
          "inputSchemaJson": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "UserToolScriptTestRequest": {
        "type": "object",
        "properties": {
          "expression": {
            "type": "string",
            "minLength": 1
          },
          "sampleInputJson": {
            "type": "string"
          }
        },
        "required": [
          "expression"
        ]
      },
      "ValidationResult": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "valid"
        ]
      },
      "VersionLabel": {
        "type": "string",
        "enum": [
          "STAGING",
          "PRODUCTION"
        ]
      },
      "VideoGenerationController_VideoGenerationRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 60,
            "default": 0
          },
          "imageBase64": {
            "type": "string",
            "maxLength": 12000000
          },
          "imageMimeType": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "prompt",
          "durationSeconds"
        ]
      },
      "VideoGenerationJobResponse": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/VideoGenerationJobStatus"
          },
          "prompt": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "videoUrl": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "durationSeconds"
        ]
      },
      "VideoGenerationJobStatus": {
        "type": "string",
        "enum": [
          "QUEUED",
          "PROCESSING",
          "COMPLETE",
          "FAILED"
        ]
      },
      "VideoModelProvider": {
        "type": "string",
        "enum": [
          "OPENAI_WHISPER_VIDEO",
          "SIDECAR_WHISPER_VIDEO",
          "SARVAM_VIDEO",
          "VERTEX_VIDEO",
          "CUSTOM_CV_MODEL"
        ]
      },
      "VisionSessionController_VisionSessionEndResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "framesAnalyzed": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "framesAnalyzed",
          "durationSeconds"
        ]
      },
      "VisionSessionController_VisionSessionStartRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "$ref": "#/components/schemas/VisionSessionMode"
          },
          "source": {
            "$ref": "#/components/schemas/VisionSource"
          }
        },
        "required": [
          "agentId",
          "mode",
          "source"
        ]
      },
      "VisionSessionController_VisionSessionStartResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/VisionSessionMode"
          },
          "source": {
            "$ref": "#/components/schemas/VisionSource"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "frameAllowanceRemaining": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        },
        "required": [
          "frameAllowanceRemaining"
        ]
      },
      "VisionSessionMode": {
        "type": "string",
        "enum": [
          "SNAPSHOT",
          "WATCH",
          "LIVE"
        ]
      },
      "VisionSource": {
        "type": "string",
        "enum": [
          "CAMERA",
          "SCREEN"
        ]
      },
      "VoiceDtmfMappingResponse": {
        "type": "object",
        "properties": {
          "digit": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "VoiceDtmfMappingUpsertRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "agentId"
        ]
      },
      "VoiceModelProvider": {
        "type": "string",
        "enum": [
          "SIDECAR_WHISPER",
          "SARVAM",
          "ELEVENLABS",
          "VIDEO_PROVIDER_RESERVED_1"
        ]
      },
      "VoiceNumberAgentResponse": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "agentName": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "VoiceNumberAgentUpsertRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "agentId"
        ]
      },
      "VoiceTokenRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "ttsVoice": {
            "type": "string"
          },
          "ttsVoiceProvider": {
            "type": "string"
          }
        }
      },
      "VoiceTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "identity": {
            "type": "string"
          }
        }
      },
      "WalletDtos_CreditRequest": {
        "type": "object",
        "properties": {
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "note": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "amountMinor",
          "idempotencyKey"
        ]
      },
      "WalletDtos_LedgerEntryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "walletId": {
            "type": "string",
            "format": "uuid"
          },
          "entryKind": {
            "type": "string"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "balanceAfter": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "idempotencyKey": {
            "type": "string"
          },
          "referenceType": {
            "type": "string"
          },
          "referenceId": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amountMinor",
          "balanceAfter"
        ]
      },
      "WalletDtos_OpenWalletRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          }
        },
        "required": [
          "agentId",
          "currency"
        ]
      },
      "WalletDtos_WalletResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "currency": {
            "type": "string"
          },
          "balanceMinor": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "balanceMinor"
        ]
      },
      "WebSearchProviderRegistry_ProviderStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "role": {
            "type": "string"
          },
          "fallbackPosition": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "dailyCap": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "usedToday": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "active": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "configured",
          "fallbackPosition",
          "dailyCap",
          "usedToday",
          "active"
        ]
      },
      "WebSearchProviderRegistry_Status": {
        "type": "object",
        "properties": {
          "multiProviderActive": {
            "type": "boolean",
            "default": false
          },
          "primary": {
            "type": "string"
          },
          "fallback": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "activeNow": {
            "type": "string"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebSearchProviderRegistry_ProviderStatus"
            }
          }
        },
        "required": [
          "multiProviderActive"
        ]
      },
      "WebhookAuthMode": {
        "type": "string",
        "enum": [
          "SHARED_SECRET",
          "OAUTH2"
        ]
      },
      "WebhookEventCatalog_Entry": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "WebhookSignatureMode": {
        "type": "string",
        "enum": [
          "NONE",
          "GITHUB",
          "STRIPE",
          "SLACK",
          "HMAC_SHA256"
        ]
      },
      "WebhookSignatureRequest": {
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/WebhookSignatureMode"
          },
          "secret": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "mode"
        ]
      },
      "WebhookSignatureResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/WebhookSignatureMode"
          },
          "configured": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "configured"
        ]
      },
      "WebhookSubscriptionController_CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        },
        "required": [
          "name",
          "url",
          "eventTypes"
        ]
      },
      "WebhookSubscriptionController_DeliveryView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "attemptCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "responseCode": {
            "type": "integer",
            "format": "int32"
          },
          "lastError": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMs": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "attemptCount"
        ]
      },
      "WebhookSubscriptionController_UpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "WebhookSubscriptionService_SubscriptionView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "consecutiveFailures": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "autoDisabledReason": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "consecutiveFailures"
        ]
      },
      "WeeklyLearningSummary": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "approved": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "approvedByKind": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "tidied": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "pending": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "approved",
          "tidied",
          "pending"
        ]
      },
      "WhatsAppPolicyController_OptInListItemResponse": {
        "type": "object",
        "properties": {
          "phoneDigits": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "default": false
          },
          "consentedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "active"
        ]
      },
      "WhatsAppPolicyController_OptInRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 1
          },
          "source": {
            "type": "string",
            "minLength": 1
          },
          "evidence": {
            "type": "string"
          }
        },
        "required": [
          "phone",
          "source"
        ]
      },
      "WhatsAppPolicyController_OptInResponse": {
        "type": "object",
        "properties": {
          "phoneDigits": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "active"
        ]
      },
      "WhatsAppPolicyController_QualityResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "qualityRating": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "available"
        ]
      },
      "WhatsAppQrController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "WhatsAppQrController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "WhatsAppQrStatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "bridgeStatus": {
            "type": "string"
          },
          "qr": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "configured"
        ]
      },
      "WhatsAppSendController_WhatsAppDefaultAgentRequest": {
        "type": "object",
        "properties": {
          "agentId": {
            "type": "string",
            "format": "uuid"
          },
          "task": {
            "type": "string"
          },
          "acknowledgeOpenEnded": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "agentId",
          "acknowledgeOpenEnded"
        ]
      },
      "WhatsAppSendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "message"
        ]
      },
      "WhatsAppSendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingApprovalId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      },
      "WhatsAppTemplateController_WhatsAppTemplateResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "bodyParamCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "preview": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "bodyParamCount"
        ]
      },
      "WorkflowCommentService_Anchor": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "WorkflowCommentService_CommentView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "nodeId": {
            "type": "string"
          },
          "anchor": {
            "$ref": "#/components/schemas/WorkflowCommentService_Anchor"
          },
          "body": {
            "type": "string"
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowCommentService_Person"
            }
          },
          "author": {
            "$ref": "#/components/schemas/WorkflowCommentService_Person"
          },
          "resolved": {
            "type": "boolean",
            "default": false
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deleted": {
            "type": "boolean",
            "default": false
          },
          "orphaned": {
            "type": "boolean",
            "default": false
          },
          "canEdit": {
            "type": "boolean",
            "default": false
          },
          "canResolve": {
            "type": "boolean",
            "default": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowCommentService_CommentView"
            }
          }
        },
        "required": [
          "resolved",
          "deleted",
          "orphaned",
          "canEdit",
          "canResolve"
        ]
      },
      "WorkflowCommentService_CreateRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WorkflowCommentService_Person": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "WorkflowCommentService_UpdateRequest": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resolved": {
            "type": "boolean"
          }
        }
      },
      "WorkflowController_LintRequest": {
        "type": "object",
        "properties": {
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          }
        }
      },
      "WorkflowCostRoutingUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "economyProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "economyModel": {
            "type": "string"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "WorkflowCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string"
          },
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          }
        },
        "required": [
          "name",
          "graph"
        ]
      },
      "WorkflowDiagramResponse": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string"
          },
          "workflowName": {
            "type": "string"
          },
          "format": {
            "$ref": "#/components/schemas/DiagramFormat"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "WorkflowEdgeDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "sourceHandle": {
            "type": "string"
          },
          "targetHandle": {
            "type": "string"
          }
        }
      },
      "WorkflowEvent": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "workflowId": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "version"
        ]
      },
      "WorkflowExecutionLimitsUpdateRequest": {
        "type": "object",
        "properties": {
          "maxStepsPerRun": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 200
          },
          "stepTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 300
          },
          "maxRetryAttempts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 5
          }
        }
      },
      "WorkflowExpressionApi_EvaluateError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "end": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "WorkflowExpressionApi_EvaluateRequest": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "dataSource": {
            "type": "string"
          },
          "supplied": {
            "$ref": "#/components/schemas/WorkflowExpressionApi_Supplied"
          }
        }
      },
      "WorkflowExpressionApi_EvaluateResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "default": false
          },
          "value": {},
          "type": {
            "type": "string"
          },
          "rendered": {
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/WorkflowExpressionApi_EvaluateError"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "ok"
        ]
      },
      "WorkflowExpressionApi_FunctionDoc": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "doc": {
            "type": "string"
          },
          "example": {
            "type": "string"
          }
        }
      },
      "WorkflowExpressionApi_LintDiagnostic": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "end": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "WorkflowExpressionApi_LintItem": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "template": {
            "type": "string"
          }
        }
      },
      "WorkflowExpressionApi_LintRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowExpressionApi_LintItem"
            }
          }
        }
      },
      "WorkflowExpressionApi_LintResponse": {
        "type": "object",
        "properties": {
          "diagnostics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowExpressionApi_LintDiagnostic"
            }
          }
        }
      },
      "WorkflowExpressionApi_SchemaNode": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "paths": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowExpressionApi_SchemaPath"
            }
          }
        }
      },
      "WorkflowExpressionApi_SchemaPath": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "sample": {
            "type": "string"
          }
        }
      },
      "WorkflowExpressionApi_Supplied": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "nodes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "WorkflowExpressionApi_UpstreamSchemaResponse": {
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowExpressionApi_SchemaNode"
            }
          }
        }
      },
      "WorkflowGraphDto": {
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowNodeDto"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowEdgeDto"
            }
          }
        }
      },
      "WorkflowInputRequestController_InputRequestView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "workflowId": {
            "type": "string",
            "format": "uuid"
          },
          "workflowName": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "nodeLabel": {
            "type": "string"
          },
          "formSchema": {},
          "status": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "submittedValues": {},
          "submittedBy": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkflowInputRequestController_SubmitRequest": {
        "type": "object",
        "properties": {
          "values": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "WorkflowInputRequestStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "SUBMITTED"
        ]
      },
      "WorkflowLintService_LintIssue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "nodeId": {
            "type": "string"
          },
          "edgeId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "fix": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "WorkflowLintService_LintResult": {
        "type": "object",
        "properties": {
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowLintService_LintIssue"
            }
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "WorkflowNodeDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "position": {
            "type": "object",
            "additionalProperties": true
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "WorkflowNodeTestRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "pinnedInputs": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "WorkflowPinRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceRunId": {
            "type": "string"
          },
          "configHash": {
            "type": "string"
          }
        }
      },
      "WorkflowPinResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceRunId": {
            "type": "string"
          },
          "pinnedBy": {
            "type": "string"
          },
          "pinnedAt": {
            "type": "string"
          },
          "sizeChars": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "configHash": {
            "type": "string"
          },
          "data": {
            "type": "string"
          }
        },
        "required": [
          "sizeChars"
        ]
      },
      "WorkflowPollTriggerRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "method": {
            "type": "string",
            "maxLength": 8
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "intervalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "itemsPath": {
            "type": "string",
            "maxLength": 256
          },
          "idPath": {
            "type": "string",
            "maxLength": 256
          },
          "seedOnEnable": {
            "type": "boolean"
          }
        },
        "required": [
          "url"
        ]
      },
      "WorkflowPollTriggerResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "configured": {
            "type": "boolean",
            "default": false
          },
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "intervalSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "itemsPath": {
            "type": "string"
          },
          "idPath": {
            "type": "string"
          },
          "seedOnEnable": {
            "type": "boolean",
            "default": false
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "headersConfigured": {
            "type": "boolean",
            "default": false
          },
          "nextPollAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastPolledAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastStatus": {
            "type": "string"
          },
          "consecutiveFailures": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        },
        "required": [
          "configured",
          "seedOnEnable",
          "enabled",
          "headersConfigured",
          "consecutiveFailures"
        ]
      },
      "WorkflowReasoningDepthUpdateRequest": {
        "type": "object",
        "properties": {
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          }
        },
        "required": [
          "reasoningDepth"
        ]
      },
      "WorkflowResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus"
          },
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "editable": {
            "type": "boolean",
            "default": false
          },
          "reasoningDepth": {
            "$ref": "#/components/schemas/ReasoningDepth"
          },
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          },
          "stepCachingEnabled": {
            "type": "boolean",
            "default": false
          },
          "costRoutingEnabled": {
            "type": "boolean",
            "default": false
          },
          "economyProviderName": {
            "$ref": "#/components/schemas/ProviderName"
          },
          "economyModel": {
            "type": "string"
          },
          "maxStepsPerRun": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "stepTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "maxRetryAttempts": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "accessLevel": {
            "type": "string"
          }
        },
        "required": [
          "editable",
          "stepCachingEnabled",
          "costRoutingEnabled",
          "maxStepsPerRun",
          "stepTimeoutSeconds",
          "maxRetryAttempts"
        ]
      },
      "WorkflowRunRequest": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "clientRunId": {
            "type": "string",
            "format": "uuid"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatInlineAttachment"
            }
          },
          "background": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "simulateSends": {
            "type": "boolean"
          },
          "comment": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "WorkflowRunResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "workflowId": {
            "type": "string",
            "format": "uuid"
          },
          "workflowName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowRunStatus"
          },
          "requestedBy": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "trace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeTraceEntry"
            }
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "outputFileName": {
            "type": "string"
          },
          "workflowVersion": {
            "type": "integer",
            "format": "int32"
          },
          "mode": {
            "type": "string"
          },
          "pinnedNodeCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "comment": {
            "type": "string"
          },
          "warningCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "cancelRequested": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "pinnedNodeCount",
          "warningCount",
          "cancelRequested"
        ]
      },
      "WorkflowRunStatus": {
        "type": "string",
        "enum": [
          "RUNNING",
          "COMPLETED",
          "FAILED",
          "AWAITING_APPROVAL",
          "CANCELLED",
          "PAUSED",
          "AWAITING_INPUT",
          "AWAITING_VOICE_INPUT"
        ]
      },
      "WorkflowScheduleRequest": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "cron"
        ]
      },
      "WorkflowScheduleResponse": {
        "type": "object",
        "properties": {
          "cron": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "nextRunAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "enabled"
        ]
      },
      "WorkflowShareController_ShareReportRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        }
      },
      "WorkflowShareController_ShareRunRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "WorkflowShareOwnerController_ShareStatusResponse": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "default": false
          },
          "shareId": {
            "type": "string"
          },
          "shareUrl": {
            "type": "string"
          },
          "viewerCount": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "reportCount": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedReason": {
            "type": "string"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "active",
          "viewerCount",
          "reportCount"
        ]
      },
      "WorkflowStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "ACTIVE",
          "ARCHIVED"
        ]
      },
      "WorkflowStepCachingUpdateRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "WorkflowTriggerChannel": {
        "type": "string",
        "enum": [
          "WEBHOOK",
          "WHATSAPP",
          "TELEGRAM",
          "SMS",
          "CALL",
          "MESSENGER",
          "INSTAGRAM",
          "SLACK",
          "DISCORD",
          "X",
          "EMAIL",
          "TEAMS"
        ]
      },
      "WorkflowTriggerChannelRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/WorkflowTriggerChannel"
          },
          "webhookAuthMode": {
            "$ref": "#/components/schemas/WebhookAuthMode"
          }
        },
        "required": [
          "channel"
        ]
      },
      "WorkflowTriggerChannelResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/WorkflowTriggerChannel"
          },
          "webhookAuthMode": {
            "$ref": "#/components/schemas/WebhookAuthMode"
          },
          "oidcTriggerPath": {
            "type": "string"
          }
        }
      },
      "WorkflowTuningModeUpdateRequest": {
        "type": "object",
        "properties": {
          "tuningMode": {
            "$ref": "#/components/schemas/TuningMode"
          }
        },
        "required": [
          "tuningMode"
        ]
      },
      "WorkflowUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string"
          },
          "graph": {
            "$ref": "#/components/schemas/WorkflowGraphDto"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus"
          }
        },
        "required": [
          "name",
          "graph",
          "status"
        ]
      },
      "WorkflowVersionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "workflowName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/WorkflowStatus"
          },
          "changeSummary": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "$ref": "#/components/schemas/VersionLabel"
          }
        },
        "required": [
          "versionNumber"
        ]
      },
      "WorkflowWaitService_WaitView": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "wakeAt": {
            "type": "string",
            "format": "date-time"
          },
          "resumeUrl": {
            "type": "string"
          }
        }
      },
      "WorkflowWebhookResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "tokenSuffix": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "enabled"
        ]
      },
      "WorkspaceFolderController_CreateFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "WorkspaceFolderController_Folder": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkspaceFolderController_PreviewEntry": {
        "type": "object",
        "properties": {
          "port": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "folder": {
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "running": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "port",
          "running"
        ]
      },
      "WorkspaceFolderController_WorkspaceResponse": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "default": false
          },
          "terminal": {
            "type": "boolean",
            "default": false
          },
          "root": {
            "type": "string"
          },
          "hostPath": {
            "type": "string"
          },
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceFolderController_Folder"
            }
          }
        },
        "required": [
          "available",
          "terminal"
        ]
      },
      "X402OfferController_CreateOfferRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 1,
            "pattern": "[a-z0-9][a-z0-9-]{0,62}"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "priceMinor": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0,
            "default": 0
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "walletId": {
            "type": "string",
            "format": "uuid"
          },
          "evmPriceAtomic": {
            "type": "integer",
            "format": "int64",
            "exclusiveMinimum": 0
          },
          "evmAsset": {
            "type": "string",
            "maxLength": 64
          },
          "evmNetwork": {
            "type": "string",
            "maxLength": 32
          },
          "evmAssetName": {
            "type": "string",
            "maxLength": 64
          },
          "evmAssetVersion": {
            "type": "string",
            "maxLength": 16
          },
          "payTo": {
            "type": "string",
            "maxLength": 256
          },
          "resourcePayload": {
            "type": "string",
            "maxLength": 65536
          }
        },
        "required": [
          "slug",
          "title",
          "priceMinor",
          "currency"
        ]
      },
      "XAppRegistrationRequest": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "minLength": 1
          },
          "clientSecret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          }
        },
        "required": [
          "clientId",
          "clientSecret"
        ]
      },
      "XConnectionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "clientId": {
            "type": "string"
          },
          "xUsername": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/XCredentialStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastPolledAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "XCredentialStatus": {
        "type": "string",
        "enum": [
          "APP_REGISTERED",
          "ACTIVE",
          "REVOKED"
        ]
      },
      "XOAuthController_AuthorizeUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "XSendController_SendRequest": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "XSendController_SendResult": {
        "type": "object",
        "properties": {
          "approved": {
            "type": "boolean",
            "default": false
          },
          "pendingRequestId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "approved"
        ]
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "vmcp_ grant key",
        "description": "Long-lived grant key (prefix vmcp_) issued under /api/mcpserver/grants: Authorization: Bearer vmcp_..."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Keycloak-issued access token: Authorization: Bearer <jwt>."
      },
      "tenantApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "vdak_ tenant API key",
        "description": "Tenant REST API key (prefix vdak_) minted at /api/tenant/api-keys for server-to-server use: Authorization: Bearer vdak_... The key's stored PERM_* scopes are its authority set, so a route still answers 403 when the key lacks the permission."
      }
    }
  }
}
