{
  "openapi": "3.0.3",
  "info": {
    "title": "Eventium API",
    "version": "2026-08-11",
    "description": "Current Eventium control-plane API for identity and sessions, entitlements, chat and runtime orchestration, API keys, webhooks, hosted MCP, skills, rules, documents, media, marketplace, guest lifecycle, and workspace operations."
  },
  "servers": [
    {
      "url": "https://api.eventium.ai",
      "description": "Eventium production API gateway"
    }
  ],
  "tags": [
    {
      "name": "Gateway",
      "description": "Health and public runtime configuration routes."
    },
    {
      "name": "Authentication",
      "description": "API-owned HttpOnly browser sessions, PKCE and recovery."
    },
    {
      "name": "API Keys",
      "description": "Create and manage long-lived API keys."
    },
    {
      "name": "Webhooks",
      "description": "Webhook event types, endpoints, deliveries, and test runs."
    },
    {
      "name": "MCP",
      "description": "List, install, and invoke MCP tools."
    },
    {
      "name": "Skills",
      "description": "List and install skills."
    },
    {
      "name": "Rules",
      "description": "Rules templates and governance helpers."
    },
    {
      "name": "Documents",
      "description": "Document intake and queue-style validation routes."
    },
    {
      "name": "Unified Chat",
      "description": "Normalized thread, request and event contracts."
    },
    {
      "name": "Capabilities",
      "description": "One-scope product entitlement decisions."
    },
    {
      "name": "Runtime",
      "description": "Server-managed Atlas runtime context."
    },
    {
      "name": "Media",
      "description": "Authenticated facade to the durable private X media runtime."
    },
    {
      "name": "Marketplace",
      "description": "Versioned catalog and installation ledger."
    },
    {
      "name": "Billing",
      "description": "Product-plan billing subjects, checkout, portal and webhook ledger."
    },
    {
      "name": "00 - Command Bus",
      "description": "Canonical one-URL D20k transport."
    },
    {
      "name": "01 - User",
      "description": "User authentication and lifecycle."
    },
    {
      "name": "02 - Agent",
      "description": "Agent lifecycle, selection, memory, and context."
    },
    {
      "name": "03 - Domain",
      "description": "Domain lifecycle and membership."
    },
    {
      "name": "04 - Zone",
      "description": "Zone lifecycle, selection, and membership."
    },
    {
      "name": "05 - Bank",
      "description": "Memory-bank lifecycle, persistence, and reads."
    },
    {
      "name": "06 - Context and State",
      "description": "Context-neighbour and administrator state operations."
    }
  ],
  "paths": {
    "/demo/v1/Metis/tps": {
      "post": {
        "operationId": "post_metis_tps",
        "tags": [
          "00 - Command Bus"
        ],
        "summary": "Atlas D20k command bus",
        "description": "Canonical Eventium gateway URL for Atlas D20k. Send one top-level `service`, the documented `vx`/`target`/`access` groups, and only the service-specific top-level scalars. Reuse one opaque Session-Id through logon, selection, bank access, chat, and reconnect replay.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "user_logon": {
                  "summary": "Log on an existing user",
                  "value": {
                    "service": "US_LogOn",
                    "target": {
                      "user": "user_demo"
                    },
                    "vx": {
                      "passcode": "secret"
                    }
                  }
                },
                "memory_recall": {
                  "summary": "Recall; sources return in context[][]",
                  "value": {
                    "service": "AP_Chat",
                    "content": "What did Hana eat?",
                    "write": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/create": {
      "post": {
        "operationId": "post_metis_tps_us_create_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_Create",
        "description": "Create a new user. Do not call during reconnect unless US_LogOn returned exact internal_code 138 and provisioning is explicitly allowed.\n\nDocumentation alias. Eventium fixes service to `US_Create` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_Create",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "create": {
                  "summary": "Create a new user",
                  "value": {
                    "service": "US_Create",
                    "vx": {
                      "name": "user_demo",
                      "description": "demo user",
                      "access": "public",
                      "passcode": "secret",
                      "confirm-passcode": "secret"
                    },
                    "identity": "user_demo"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/logon": {
      "post": {
        "operationId": "post_metis_tps_us_logon_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_LogOn",
        "description": "Bind the stable Session-Id to an existing user. This is the first user call on reconnect.\n\nDocumentation alias. Eventium fixes service to `US_LogOn` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_LogOn",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "logon": {
                  "summary": "Log on an existing user",
                  "value": {
                    "service": "US_LogOn",
                    "target": {
                      "user": "user_demo"
                    },
                    "vx": {
                      "passcode": "secret"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/logoff": {
      "post": {
        "operationId": "post_metis_tps_us_logoff_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_LogOff",
        "description": "Log off the user bound to the current Session-Id.\n\nDocumentation alias. Eventium fixes service to `US_LogOff` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_LogOff",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "logoff": {
                  "summary": "Log off current user",
                  "value": {
                    "service": "US_LogOff"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/read": {
      "post": {
        "operationId": "post_metis_tps_us_read_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_Read",
        "description": "Read a user or list the user's registered banks with access.category=bank.\n\nDocumentation alias. Eventium fixes service to `US_Read` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_Read",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "read_user": {
                  "summary": "Read user",
                  "value": {
                    "service": "US_Read",
                    "target": {
                      "user": "user_demo"
                    }
                  }
                },
                "list_banks": {
                  "summary": "List registered banks",
                  "value": {
                    "service": "US_Read",
                    "target": {
                      "user": "user_demo"
                    },
                    "access": {
                      "category": "bank",
                      "max_results": 50
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "header": {
                    "service": "US_Read"
                  },
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not obtain or verify a native US_Read envelope. The response remains unwrapped and fail-closed; internal_code is null because no native result may be invented.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "header": {
                    "service": "US_Read",
                    "source": "eventium_gateway",
                    "contract": "eventium-us-read-gateway-v1"
                  },
                  "status": {
                    "success": false,
                    "internal_code": null,
                    "http_code": 502,
                    "note": "Atlas US_Read response could not be verified."
                  },
                  "evidence": {
                    "request_sha256": "<sha256>",
                    "response_sha256": "<sha256-or-empty>"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/update": {
      "post": {
        "operationId": "post_metis_tps_us_update_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_Update",
        "description": "Update the logged-on user's VX fields.\n\nDocumentation alias. Eventium fixes service to `US_Update` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_Update",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "update": {
                  "summary": "Update user",
                  "value": {
                    "service": "US_Update",
                    "vx": {
                      "name": "user_demo",
                      "description": "updated user"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/user/destroy": {
      "post": {
        "operationId": "post_metis_tps_us_destroy_alias",
        "tags": [
          "01 - User"
        ],
        "summary": "01 - User / US_Destroy",
        "description": "Destroy a user.\n\nDocumentation alias. Eventium fixes service to `US_Destroy` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "US_Destroy",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "destroy": {
                  "summary": "Destroy user",
                  "value": {
                    "service": "US_Destroy",
                    "target": {
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/create": {
      "post": {
        "operationId": "post_metis_tps_ap_create_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Create",
        "description": "Create an agent under the logged-on user. Normal reconnect calls AP_LogOn first and creates only after exact internal_code 120.\n\nDocumentation alias. Eventium fixes service to `AP_Create` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Create",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "create": {
                  "summary": "Create agent",
                  "value": {
                    "service": "AP_Create",
                    "vx": {
                      "name": "Assistant_demo",
                      "description": "a helpful assistant",
                      "access": "public"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/logon": {
      "post": {
        "operationId": "post_metis_tps_ap_logon_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_LogOn",
        "description": "Bring an existing agent online. This is the first agent call on reconnect.\n\nDocumentation alias. Eventium fixes service to `AP_LogOn` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_LogOn",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "logon": {
                  "summary": "Log on agent",
                  "value": {
                    "service": "AP_LogOn",
                    "target": {
                      "agent": "Assistant_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/select": {
      "post": {
        "operationId": "post_metis_tps_ap_select_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Select",
        "description": "Make the online agent active for this Session-Id. FOUND (internal_code 0, HTTP 302) is a successful selection result.\n\nDocumentation alias. Eventium fixes service to `AP_Select` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Select",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "select": {
                  "summary": "Select agent",
                  "value": {
                    "service": "AP_Select",
                    "target": {
                      "agent": "Assistant_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/logoff": {
      "post": {
        "operationId": "post_metis_tps_ap_logoff_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_LogOff",
        "description": "Take an agent offline.\n\nDocumentation alias. Eventium fixes service to `AP_LogOff` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_LogOff",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "logoff": {
                  "summary": "Log off agent",
                  "value": {
                    "service": "AP_LogOff",
                    "target": {
                      "agent": "Assistant_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/read": {
      "post": {
        "operationId": "post_metis_tps_ap_read_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Read",
        "description": "Read an agent.\n\nDocumentation alias. Eventium fixes service to `AP_Read` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Read",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "read": {
                  "summary": "Read agent",
                  "value": {
                    "service": "AP_Read",
                    "target": {
                      "agent": "Assistant_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/update": {
      "post": {
        "operationId": "post_metis_tps_ap_update_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Update",
        "description": "Update an agent's VX fields.\n\nDocumentation alias. Eventium fixes service to `AP_Update` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Update",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "update": {
                  "summary": "Update agent",
                  "value": {
                    "service": "AP_Update",
                    "vx": {
                      "name": "Assistant_demo",
                      "description": "updated assistant"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/destroy": {
      "post": {
        "operationId": "post_metis_tps_ap_destroy_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Destroy",
        "description": "Destroy an agent.\n\nDocumentation alias. Eventium fixes service to `AP_Destroy` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Destroy",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "destroy": {
                  "summary": "Destroy agent",
                  "value": {
                    "service": "AP_Destroy",
                    "target": {
                      "agent": "Assistant_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/chat": {
      "post": {
        "operationId": "post_metis_tps_ap_chat_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_Chat",
        "description": "Write verbatim episodic memory, recall memory, or author a rule. Regular stored content is never prefixed, translated, paraphrased, or replaced by metadata.\n\nDocumentation alias. Eventium fixes service to `AP_Chat` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_Chat",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "store": {
                  "summary": "Store one verbatim memory; rephrases are index-only",
                  "value": {
                    "service": "AP_Chat",
                    "content": "Hana ate 2 apples",
                    "write": 1,
                    "payload": {
                      "source": "chat"
                    },
                    "index_phrasings": [
                      "Hana consumed two apples"
                    ]
                  }
                },
                "recall": {
                  "summary": "Recall; sources return in context[][]",
                  "value": {
                    "service": "AP_Chat",
                    "content": "What did Hana eat?",
                    "write": 0
                  }
                },
                "author_rule": {
                  "summary": "Author a rule; no write or payload field",
                  "value": {
                    "service": "AP_Chat",
                    "target": {
                      "agent": "Assistant_demo",
                      "mode": "rule"
                    },
                    "content": "A request phrasing that should trigger the rule",
                    "rule": "The directive to apply",
                    "breadth": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/agent/get-context": {
      "post": {
        "operationId": "post_metis_tps_ap_getcontext_alias",
        "tags": [
          "02 - Agent"
        ],
        "summary": "02 - Agent / AP_GetContext",
        "description": "Return the newest-first write-bank tail under top-level content[]. target is optional and defaults to the selected agent.\n\nDocumentation alias. Eventium fixes service to `AP_GetContext` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "AP_GetContext",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "context": {
                  "summary": "Get recent context",
                  "value": {
                    "service": "AP_GetContext",
                    "target": {
                      "agent": "Assistant_demo"
                    },
                    "count": 5
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/create": {
      "post": {
        "operationId": "post_metis_tps_dm_create_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Create",
        "description": "Create a domain for the selected agent. Read first; create only after exact internal_code 120.\n\nDocumentation alias. Eventium fixes service to `DM_Create` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Create",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "create": {
                  "summary": "Create domain",
                  "value": {
                    "service": "DM_Create",
                    "vx": {
                      "name": "World_demo",
                      "description": "demo world"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/read": {
      "post": {
        "operationId": "post_metis_tps_dm_read_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Read",
        "description": "Read a domain. This is the first domain call during restore/reconnect.\n\nDocumentation alias. Eventium fixes service to `DM_Read` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Read",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "read": {
                  "summary": "Read domain",
                  "value": {
                    "service": "DM_Read",
                    "target": {
                      "domain": "World_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/update": {
      "post": {
        "operationId": "post_metis_tps_dm_update_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Update",
        "description": "Update a domain's VX fields.\n\nDocumentation alias. Eventium fixes service to `DM_Update` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Update",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "update": {
                  "summary": "Update domain",
                  "value": {
                    "service": "DM_Update",
                    "vx": {
                      "name": "World_demo",
                      "description": "updated world"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/destroy": {
      "post": {
        "operationId": "post_metis_tps_dm_destroy_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Destroy",
        "description": "Destroy a domain.\n\nDocumentation alias. Eventium fixes service to `DM_Destroy` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Destroy",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "destroy": {
                  "summary": "Destroy domain",
                  "value": {
                    "service": "DM_Destroy",
                    "target": {
                      "domain": "World_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/invite": {
      "post": {
        "operationId": "post_metis_tps_dm_invite_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Invite",
        "description": "Invite an agent for a domain. Domain membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `DM_Invite` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Invite",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "invite": {
                  "summary": "Invite domain member",
                  "value": {
                    "service": "DM_Invite",
                    "target": {
                      "domain": "World_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/kick": {
      "post": {
        "operationId": "post_metis_tps_dm_kick_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Kick",
        "description": "Kick an agent for a domain. Domain membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `DM_Kick` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Kick",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "kick": {
                  "summary": "Kick domain member",
                  "value": {
                    "service": "DM_Kick",
                    "target": {
                      "domain": "World_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/ban": {
      "post": {
        "operationId": "post_metis_tps_dm_ban_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Ban",
        "description": "Ban an agent for a domain. Domain membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `DM_Ban` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Ban",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "ban": {
                  "summary": "Ban domain member",
                  "value": {
                    "service": "DM_Ban",
                    "target": {
                      "domain": "World_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/domain/unban": {
      "post": {
        "operationId": "post_metis_tps_dm_unban_alias",
        "tags": [
          "03 - Domain"
        ],
        "summary": "03 - Domain / DM_Unban",
        "description": "Unban an agent for a domain. Domain membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `DM_Unban` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "DM_Unban",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "unban": {
                  "summary": "Unban domain member",
                  "value": {
                    "service": "DM_Unban",
                    "target": {
                      "domain": "World_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/create": {
      "post": {
        "operationId": "post_metis_tps_zn_create_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Create",
        "description": "Create a zone under an existing domain. Read first; create only after exact internal_code 120.\n\nDocumentation alias. Eventium fixes service to `ZN_Create` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Create",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "create": {
                  "summary": "Create zone",
                  "value": {
                    "service": "ZN_Create",
                    "target": {
                      "domain": "World_demo"
                    },
                    "vx": {
                      "name": "Lobby_demo",
                      "description": "demo lobby",
                      "access": "public"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/read": {
      "post": {
        "operationId": "post_metis_tps_zn_read_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Read",
        "description": "Read a zone or its agent roster. This is the first zone call during restore/reconnect.\n\nDocumentation alias. Eventium fixes service to `ZN_Read` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Read",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "read": {
                  "summary": "Read zone",
                  "value": {
                    "service": "ZN_Read",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo"
                    }
                  }
                },
                "roster": {
                  "summary": "Read zone roster",
                  "value": {
                    "service": "ZN_Read",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo"
                    },
                    "access": {
                      "category": "agent",
                      "max_results": 50
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/update": {
      "post": {
        "operationId": "post_metis_tps_zn_update_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Update",
        "description": "Update a zone's VX fields.\n\nDocumentation alias. Eventium fixes service to `ZN_Update` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Update",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "update": {
                  "summary": "Update zone",
                  "value": {
                    "service": "ZN_Update",
                    "target": {
                      "domain": "World_demo"
                    },
                    "vx": {
                      "name": "Lobby_demo",
                      "description": "updated lobby"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/destroy": {
      "post": {
        "operationId": "post_metis_tps_zn_destroy_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Destroy",
        "description": "Destroy a zone.\n\nDocumentation alias. Eventium fixes service to `ZN_Destroy` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Destroy",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "destroy": {
                  "summary": "Destroy zone",
                  "value": {
                    "service": "ZN_Destroy",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/select": {
      "post": {
        "operationId": "post_metis_tps_zn_select_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Select",
        "description": "Place the selected agent in the zone; required for same-zone cross-agent visibility.\n\nDocumentation alias. Eventium fixes service to `ZN_Select` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Select",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "select": {
                  "summary": "Select zone",
                  "value": {
                    "service": "ZN_Select",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/invite": {
      "post": {
        "operationId": "post_metis_tps_zn_invite_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Invite",
        "description": "Invite an agent for a zone. Zone membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `ZN_Invite` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Invite",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "invite": {
                  "summary": "Invite zone member",
                  "value": {
                    "service": "ZN_Invite",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/kick": {
      "post": {
        "operationId": "post_metis_tps_zn_kick_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Kick",
        "description": "Kick an agent for a zone. Zone membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `ZN_Kick` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Kick",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "kick": {
                  "summary": "Kick zone member",
                  "value": {
                    "service": "ZN_Kick",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/ban": {
      "post": {
        "operationId": "post_metis_tps_zn_ban_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Ban",
        "description": "Ban an agent for a zone. Zone membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `ZN_Ban` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Ban",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "ban": {
                  "summary": "Ban zone member",
                  "value": {
                    "service": "ZN_Ban",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/zone/unban": {
      "post": {
        "operationId": "post_metis_tps_zn_unban_alias",
        "tags": [
          "04 - Zone"
        ],
        "summary": "04 - Zone / ZN_Unban",
        "description": "Unban an agent for a zone. Zone membership operations are owner-only.\n\nDocumentation alias. Eventium fixes service to `ZN_Unban` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "ZN_Unban",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "unban": {
                  "summary": "Unban zone member",
                  "value": {
                    "service": "ZN_Unban",
                    "target": {
                      "domain": "World_demo",
                      "zone": "Lobby_demo",
                      "agent": "Assistant_demo",
                      "user": "user_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/create": {
      "post": {
        "operationId": "post_metis_tps_mb_create_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Create",
        "description": "Create the selected agent's write bank. Load first during reconnect; create only after exact internal_code 120. A successful create already selects the new write bank, so do not immediately MB_Load it.\n\nDocumentation alias. Eventium fixes service to `MB_Create` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Create",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "episodic": {
                  "summary": "Create episodic bank",
                  "value": {
                    "service": "MB_Create",
                    "vx": {
                      "name": "Notes_demo"
                    },
                    "name": "Notes_demo",
                    "bank_size": 1048576
                  }
                },
                "rules": {
                  "summary": "Create rules bank",
                  "value": {
                    "service": "MB_Create",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Rules_demo",
                      "mode": "rule"
                    },
                    "vx": {
                      "name": "Rules_demo"
                    },
                    "name": "Rules_demo",
                    "bank_size": 1048576
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/read": {
      "post": {
        "operationId": "post_metis_tps_mb_read_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Read",
        "description": "Read bank metadata, conversations, or newest-first sentence rows. Sentence rows return under content[].\n\nDocumentation alias. Eventium fixes service to `MB_Read` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Read",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "sentences": {
                  "summary": "Read bank sentences",
                  "value": {
                    "service": "MB_Read",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo",
                      "conversation": 0
                    },
                    "access": {
                      "category": "sentence",
                      "max_results": 16
                    }
                  }
                },
                "bank": {
                  "summary": "Read bank metadata",
                  "value": {
                    "service": "MB_Read",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    },
                    "access": {
                      "category": "bank"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/update": {
      "post": {
        "operationId": "post_metis_tps_mb_update_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Update",
        "description": "Update a bank row. Save after an edit when persistence is required.\n\nDocumentation alias. Eventium fixes service to `MB_Update` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Update",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "sentence_access": {
                  "summary": "Set sentence access",
                  "value": {
                    "service": "MB_Update",
                    "vx": {
                      "name": "Notes_demo",
                      "description": "Notes_demo",
                      "access": "agent"
                    },
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo",
                      "conversation": 0,
                      "sentence": "0"
                    },
                    "access": {
                      "category": "sentence",
                      "min": 0,
                      "max": 0,
                      "max_results": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/save": {
      "post": {
        "operationId": "post_metis_tps_mb_save_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Save",
        "description": "Persist the bank to disk and register it.\n\nDocumentation alias. Eventium fixes service to `MB_Save` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Save",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "save": {
                  "summary": "Save bank",
                  "value": {
                    "service": "MB_Save",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/load": {
      "post": {
        "operationId": "post_metis_tps_mb_load_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Load",
        "description": "Load an existing registered bank. This is the first bank call during restore/reconnect.\n\nDocumentation alias. Eventium fixes service to `MB_Load` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Load",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "load": {
                  "summary": "Load bank",
                  "value": {
                    "service": "MB_Load",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/unload": {
      "post": {
        "operationId": "post_metis_tps_mb_unload_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Unload",
        "description": "Unload a bank; unsaved changes are discarded.\n\nDocumentation alias. Eventium fixes service to `MB_Unload` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Unload",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "unload": {
                  "summary": "Unload bank",
                  "value": {
                    "service": "MB_Unload",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/bank/destroy": {
      "post": {
        "operationId": "post_metis_tps_mb_destroy_alias",
        "tags": [
          "05 - Bank"
        ],
        "summary": "05 - Bank / MB_Destroy",
        "description": "Destroy a bank.\n\nDocumentation alias. Eventium fixes service to `MB_Destroy` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "MB_Destroy",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "destroy": {
                  "summary": "Destroy bank",
                  "value": {
                    "service": "MB_Destroy",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/context/bank": {
      "post": {
        "operationId": "post_metis_tps_bankcontext_alias",
        "tags": [
          "06 - Context and State"
        ],
        "summary": "06 - Context and State / _BankContext",
        "description": "Read neighbouring sentences across a bank.\n\nDocumentation alias. Eventium fixes service to `_BankContext` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "_BankContext",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "context": {
                  "summary": "Read bank context",
                  "value": {
                    "service": "_BankContext",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    },
                    "sentence": "132804000000000000",
                    "count": 5,
                    "dir": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/context/bin": {
      "post": {
        "operationId": "post_metis_tps_bincontext_alias",
        "tags": [
          "06 - Context and State"
        ],
        "summary": "06 - Context and State / _BinContext",
        "description": "Read neighbouring sentences within a leaf bin.\n\nDocumentation alias. Eventium fixes service to `_BinContext` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "_BinContext",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "context": {
                  "summary": "Read bin context",
                  "value": {
                    "service": "_BinContext",
                    "target": {
                      "agent": "Assistant_demo",
                      "bank": "Notes_demo"
                    },
                    "sentence": "132804000000000000",
                    "bin": 1026,
                    "count": 5,
                    "dir": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/state/save": {
      "post": {
        "operationId": "post_metis_tps_savestate_alias",
        "tags": [
          "06 - Context and State"
        ],
        "summary": "06 - Context and State / _SaveState",
        "description": "Persist the Atlas VX entity registry. Requires the Atlas server admin passcode.\n\nDocumentation alias. Eventium fixes service to `_SaveState` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "_SaveState",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "save": {
                  "summary": "Save Atlas state",
                  "value": {
                    "service": "_SaveState",
                    "passcode": "REPLACE_WITH_ADMIN_PASSCODE"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/demo/v1/Metis/tps/state/load": {
      "post": {
        "operationId": "post_metis_tps_loadstate_alias",
        "tags": [
          "06 - Context and State"
        ],
        "summary": "06 - Context and State / _LoadState",
        "description": "Restore the Atlas VX entity registry after restart, before US_LogOn. Requires the Atlas server admin passcode.\n\nDocumentation alias. Eventium fixes service to `_LoadState` and forwards the same D20k envelope to `POST /demo/v1/Metis/tps`. Atlas itself is a one-URL command bus.",
        "x-service": "_LoadState",
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TPSRequest"
              },
              "examples": {
                "load": {
                  "summary": "Load Atlas state",
                  "value": {
                    "service": "_LoadState",
                    "passcode": "REPLACE_WITH_ADMIN_PASSCODE"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "D20k command response. status.success is authoritative; normal OK is internal_code 100 / http_code 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TPSResponse"
                },
                "example": {
                  "status": {
                    "success": true,
                    "internal_code": 100,
                    "http_code": 200,
                    "note": null
                  }
                }
              }
            }
          },
          "206": {
            "description": "D20k INVALID_INPUT (internal_code 102)."
          },
          "207": {
            "description": "D20k DATA_MISMATCH (internal_code 116)."
          },
          "208": {
            "description": "D20k ALREADY_INITIALIZED (internal_code 137)."
          },
          "302": {
            "description": "D20k FOUND (internal_code 0), including successful AP_Select."
          },
          "401": {
            "description": "Gateway authentication failure, INVALID_CREDENTIALS (138), or USER_NOT_AUTHORIZED (146)."
          },
          "422": {
            "description": "D20k AGENT_OFFLINE (internal_code 141)."
          },
          "429": {
            "description": "Eventium gateway rate limit."
          },
          "500": {
            "description": "D20k/internal failure; RESOURCE_NOT_FOUND (120) currently maps to HTTP 500."
          },
          "501": {
            "description": "D20k NOT_SUPPORTED (internal_code 114)."
          },
          "502": {
            "description": "Eventium gateway could not reach Atlas."
          }
        }
      }
    },
    "/api/auth/session": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Bootstrap or resume the canonical browser session and rotate CSRF",
        "security": [
          {},
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current actor and one newly rotated in-memory CSRF token",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "private, no-store"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthSessionResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamUnavailable"
          }
        }
      }
    },
    "/api/auth/password/sign-in": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Verify a password and rotate pre-auth or guest state into a web session",
        "security": [
          {
            "PreauthCookie": []
          },
          {
            "GuestCookie": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CsrfToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignInRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authenticated HttpOnly session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordSignInResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/CsrfInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamUnavailable"
          }
        }
      }
    },
    "/api/auth/password/sign-up": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Create a verification-required password identity",
        "security": [
          {
            "PreauthCookie": []
          },
          {
            "GuestCookie": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CsrfToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignUpRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Verification required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordSignUpResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CsrfInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamUnavailable"
          }
        }
      }
    },
    "/api/auth/password/reset": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Start a browser-bound PKCE password-recovery flow",
        "security": [
          {
            "PreauthCookie": []
          },
          {
            "GuestCookie": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CsrfToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Recovery request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordResetResponse"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/CsrfInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamUnavailable"
          }
        }
      }
    },
    "/api/auth/password/recovery/callback": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Consume a one-time PKCE recovery code and issue a recovery-only cookie",
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect to https://chat.eventium.ai/reset-password"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          }
        }
      }
    },
    "/api/auth/password/recovery/confirm": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Consume the recovery-only session, update the password and revoke web sessions",
        "security": [
          {
            "RecoveryCookie": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CsrfToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Password updated; recovery state consumed"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/CsrfInvalid"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          }
        }
      }
    },
    "/api/auth/oauth/google/start": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Start browser-bound Google OAuth with server-held PKCE",
        "security": [
          {
            "PreauthCookie": []
          },
          {
            "GuestCookie": []
          }
        ],
        "parameters": [
          {
            "name": "return_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Allowlisted relative Chat path only"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the configured Supabase Google authorization URL"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "503": {
            "$ref": "#/components/responses/UpstreamUnavailable"
          }
        }
      }
    },
    "/api/auth/oauth/callback": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Consume the Google PKCE code and issue a canonical web session",
        "security": [
          {}
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect to the stored allowlisted Chat path"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Revoke the server web session and clear canonical cookies",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CsrfToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "maxProperties": 0
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Session revoked"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationRequired"
          },
          "403": {
            "$ref": "#/components/responses/CsrfInvalid"
          }
        }
      }
    },
    "/api/me/capabilities": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "Resolve the selected personal or workspace capability document",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One-scope CapabilityDocumentV1"
          },
          "404": {
            "description": "Unknown or unowned scope"
          },
          "503": {
            "description": "Entitlement authority unavailable; fails closed"
          }
        }
      }
    },
    "/api/me/scopes": {
      "get": {
        "tags": [
          "Capabilities"
        ],
        "summary": "List authorized product-safe scopes",
        "responses": {
          "200": {
            "description": "Scope page"
          }
        }
      }
    },
    "/api/chat/threads": {
      "get": {
        "tags": [
          "Unified Chat"
        ],
        "summary": "List owner-scoped threads",
        "responses": {
          "200": {
            "description": "Thread page"
          }
        }
      },
      "post": {
        "tags": [
          "Unified Chat"
        ],
        "summary": "Create a normalized thread",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema_version",
                  "client_thread_id",
                  "mode"
                ],
                "properties": {
                  "schema_version": {
                    "const": "1.0"
                  },
                  "client_thread_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "mode": {
                    "enum": [
                      "single",
                      "multi"
                    ]
                  },
                  "workspace_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "project_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "channel_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Authorized channel context; cannot also select a project."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "ThreadV1, including nullable channel_id for canonical channel context."
          }
        }
      }
    },
    "/api/chat/stream": {
      "post": {
        "tags": [
          "Unified Chat"
        ],
        "summary": "Run an Atlas-backed chat request and stream canonical events",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "schema_version",
                  "thread_id",
                  "client_request_id",
                  "message",
                  "mode"
                ],
                "properties": {
                  "schema_version": {
                    "const": "1.0"
                  },
                  "thread_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "client_request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "message": {
                    "type": "object",
                    "required": [
                      "id",
                      "content"
                    ]
                  },
                  "mode": {
                    "enum": [
                      "auto",
                      "write",
                      "rule"
                    ]
                  },
                  "attachment_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "context": {
                    "type": "object"
                  },
                  "rule": {
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "eventium.chat.event.v1 NDJSON stream",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/runtime/status": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "Read server-managed Atlas runtime readiness",
        "responses": {
          "200": {
            "description": "RuntimeStatusV1"
          }
        }
      }
    },
    "/api/runtime/context": {
      "get": {
        "tags": [
          "Runtime"
        ],
        "summary": "Read the current safe runtime selection",
        "responses": {
          "200": {
            "description": "RuntimeContextV1"
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/agent-selection": {
      "post": {
        "tags": [
          "Runtime"
        ],
        "summary": "Select an existing agent without implicit creation",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_id"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Runtime selection plus native status tuple"
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/memory-selection": {
      "post": {
        "tags": [
          "Runtime"
        ],
        "summary": "Select an existing domain, zone and bank",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_id",
                  "domain_id",
                  "zone_id",
                  "bank_id"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "domain_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "zone_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bank_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Runtime selection plus native status tuple"
          }
        }
      }
    },
    "/api/marketplace/listings": {
      "get": {
        "tags": [
          "Marketplace"
        ],
        "summary": "List visible versioned listings",
        "responses": {
          "200": {
            "description": "MarketplaceListingV1 page"
          }
        }
      },
      "post": {
        "tags": [
          "Marketplace"
        ],
        "summary": "Create a seller-owned versioned listing",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "MarketplaceListingV1"
          }
        }
      }
    },
    "/api/marketplace/listings/{listing_id}/install": {
      "post": {
        "tags": [
          "Marketplace"
        ],
        "summary": "Queue a licensed/free server-side installation",
        "parameters": [
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Pending installation ledger"
          }
        }
      }
    },
    "/api/billing/create-portal-session": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Create an authorized Stripe billing portal session",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Short-lived portal URL"
          }
        }
      }
    },
    "/api/media/uploads/init": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Owner-authenticated X multipart initialization facade",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Exact private media runtime DTO"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Health",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/health/deps": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Dependency health",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepsHealthResponse"
                }
              }
            }
          },
          "503": {
            "description": "Dependencies unavailable"
          }
        }
      }
    },
    "/api/public-config": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Public runtime config",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicConfigResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/dev/sandbox-key": {
      "post": {
        "tags": [
          "Gateway"
        ],
        "summary": "Create sandbox API key (docs/testing)",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Sandbox keys disabled"
          },
          "503": {
            "description": "Service unavailable"
          }
        }
      }
    },
    "/api/api-keys": {
      "get": {
        "tags": [
          "API Keys"
        ],
        "summary": "List API keys (metadata only)",
        "responses": {
          "200": {
            "description": "Keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "API Keys"
        ],
        "summary": "Create API key (returns raw key once)",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden (plan/entitlement)"
          }
        }
      }
    },
    "/api/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "API Keys"
        ],
        "summary": "Revoke API key",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List supported webhook event types",
        "responses": {
          "200": {
            "description": "Events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/webhooks/endpoints": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "responses": {
          "200": {
            "description": "Endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create webhook endpoint (returns secret once)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/webhooks/endpoints/{endpoint_id}": {
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update webhook endpoint",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Disable webhook endpoint (or hard-delete with ?hard=true)",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hard",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted/disabled"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/webhooks/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook deliveries",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveriesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/webhooks/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Queue a test webhook event delivery",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTestRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/mcp/tools": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "List MCP tools available to the user",
        "responses": {
          "200": {
            "description": "Tools",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/mcp/tools/install": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Install/claim an MCP tool template",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolInstallRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Installed"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/mcp/tools/invoke": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Invoke an MCP tool implementation by name",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpToolInvokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invocation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/skills": {
      "get": {
        "tags": [
          "Skills"
        ],
        "summary": "List skills (published by default)",
        "responses": {
          "200": {
            "description": "Skills",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/skills/install": {
      "post": {
        "tags": [
          "Skills"
        ],
        "summary": "Install/enable a skill (toggle)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillInstallRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Installed/enabled"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    },
    "/api/rules": {
      "get": {
        "tags": [
          "Rules"
        ],
        "summary": "List rules (placeholder)",
        "responses": {
          "501": {
            "description": "Not implemented"
          }
        }
      },
      "post": {
        "tags": [
          "Rules"
        ],
        "summary": "Create a rule (placeholder)",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuleCreateRequest"
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not implemented"
          }
        }
      }
    },
    "/api/rules/apply": {
      "post": {
        "tags": [
          "Rules"
        ],
        "summary": "Apply a rule (placeholder)",
        "responses": {
          "501": {
            "description": "Not implemented"
          }
        }
      }
    },
    "/api/documents/ingest": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Ingest a document (mock queue)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentsIngestRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentsIngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "SessionId": {
        "name": "Session-Id",
        "in": "header",
        "required": true,
        "description": "Opaque stable identifier reused for one logical Atlas session.",
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "example": "client-7f6144c48cb1"
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": "Stable key for one logical actor + method + canonical-path mutation."
      },
      "CsrfToken": {
        "name": "X-CSRF-Token",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "description": "Raw in-memory token returned by GET /api/auth/session; the server stores only its SHA-256 hash."
      }
    },
    "schemas": {
      "TPSService": {
        "type": "string",
        "enum": [
          "US_Create",
          "US_LogOn",
          "US_LogOff",
          "US_Read",
          "US_Update",
          "US_Destroy",
          "AP_Create",
          "AP_LogOn",
          "AP_Select",
          "AP_LogOff",
          "AP_Read",
          "AP_Update",
          "AP_Destroy",
          "AP_Chat",
          "AP_GetContext",
          "DM_Create",
          "DM_Read",
          "DM_Update",
          "DM_Destroy",
          "DM_Invite",
          "DM_Kick",
          "DM_Ban",
          "DM_Unban",
          "ZN_Create",
          "ZN_Read",
          "ZN_Update",
          "ZN_Destroy",
          "ZN_Select",
          "ZN_Invite",
          "ZN_Kick",
          "ZN_Ban",
          "ZN_Unban",
          "MB_Create",
          "MB_Read",
          "MB_Update",
          "MB_Save",
          "MB_Load",
          "MB_Unload",
          "MB_Destroy",
          "_BankContext",
          "_BinContext",
          "_SaveState",
          "_LoadState"
        ]
      },
      "VX": {
        "type": "object",
        "description": "Create/update identity group. Send only fields used by the selected service.",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 63
          },
          "description": {
            "type": "string",
            "maxLength": 255
          },
          "access": {
            "type": "string",
            "enum": [
              "public",
              "visible",
              "user",
              "agent",
              "domain",
              "zone",
              "bank"
            ]
          },
          "passcode": {
            "type": "string",
            "maxLength": 31
          },
          "confirm-passcode": {
            "type": "string",
            "maxLength": 31
          },
          "profile": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Target": {
        "type": "object",
        "description": "Existing-entity address. Field names are lowercase.",
        "properties": {
          "user": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "zone": {
            "type": "string"
          },
          "bank": {
            "type": "string"
          },
          "conversation": {
            "type": "integer",
            "minimum": 0
          },
          "sentence": {
            "type": "string",
            "pattern": "^[0-9]+$"
          },
          "event": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "rule"
            ]
          }
        },
        "additionalProperties": false
      },
      "Access": {
        "type": "object",
        "description": "Read filters.",
        "properties": {
          "category": {
            "type": "string"
          },
          "filter": {
            "type": "string"
          },
          "max_results": {
            "type": "integer",
            "minimum": 1
          },
          "select": {
            "type": "string"
          },
          "min": {
            "type": "integer",
            "minimum": 0
          },
          "max": {
            "type": "integer",
            "minimum": 0
          },
          "level": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TPSRequest": {
        "type": "object",
        "required": [
          "service"
        ],
        "properties": {
          "service": {
            "$ref": "#/components/schemas/TPSService"
          },
          "vx": {
            "$ref": "#/components/schemas/VX"
          },
          "target": {
            "$ref": "#/components/schemas/Target"
          },
          "access": {
            "$ref": "#/components/schemas/Access"
          },
          "identity": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "write": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "enum": [
                  0,
                  1
                ]
              }
            ]
          },
          "rule": {
            "type": "string"
          },
          "payload": {},
          "index_phrasings": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "type": "string"
            },
            "description": "Faithful index-only rephrasings; stored content remains verbatim."
          },
          "rules_path": {
            "type": "boolean"
          },
          "breadth": {
            "type": "integer",
            "minimum": 0
          },
          "count": {
            "type": "integer",
            "minimum": 1
          },
          "sentence": {
            "type": "string",
            "pattern": "^[0-9]+$"
          },
          "bin": {
            "type": "integer",
            "minimum": 0,
            "maximum": 32767
          },
          "dir": {
            "type": "integer",
            "enum": [
              -1,
              0,
              1
            ]
          },
          "bank_size": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "type": "string"
          },
          "epi": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              }
            ]
          },
          "passcode": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TPSHeader": {
        "type": "object",
        "required": [
          "service"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "description": "Present only for an Eventium gateway-authored failure envelope."
          },
          "contract": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "TPSStatus": {
        "type": "object",
        "required": [
          "success",
          "internal_code",
          "http_code"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Authoritative pass/fail value."
          },
          "internal_code": {
            "type": "integer",
            "nullable": true,
            "description": "Native D20k code. Null only when the Eventium gateway cannot verify a native response and therefore must not invent one."
          },
          "http_code": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": true
      },
      "MemoryRow": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "rule": {
            "type": "string"
          },
          "payload": {},
          "sentence": {
            "type": "string"
          },
          "bin": {
            "type": "integer"
          },
          "bin_id": {
            "type": "integer"
          },
          "agent": {
            "type": "string"
          },
          "user": {
            "type": "string"
          },
          "bank": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "timestamp": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "TPSResponse": {
        "type": "object",
        "required": [
          "header",
          "status"
        ],
        "description": "Unwrapped D20k response envelope. For a gateway-authored US_Read contract failure, the same top-level header/status shape is retained and status.internal_code is null rather than fabricated. AP_Chat recall uses context[][]; AP_GetContext and MB_Read use content[].",
        "properties": {
          "header": {
            "$ref": "#/components/schemas/TPSHeader"
          },
          "status": {
            "$ref": "#/components/schemas/TPSStatus"
          },
          "evidence": {
            "type": "object",
            "description": "Value-free correlation hashes emitted only for an Eventium gateway-authored contract failure.",
            "properties": {
              "request_sha256": {
                "type": "string"
              },
              "response_sha256": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "profile": {
            "type": "object",
            "additionalProperties": true
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryRow"
            }
          },
          "context": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/MemoryRow"
              }
            }
          },
          "route_score": {
            "type": "number"
          },
          "ood": {
            "type": "boolean",
            "description": "Coverage signal, not proof that no answer exists."
          },
          "top_score": {
            "type": "number"
          },
          "answer_absent": {
            "type": "boolean",
            "description": "Answer-presence signal."
          },
          "rules_score": {
            "type": "number"
          },
          "rules_ood": {
            "type": "boolean"
          },
          "no_rule": {
            "type": "boolean"
          },
          "rule": {
            "type": "string"
          },
          "rule_node": {}
        },
        "additionalProperties": true
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "schema_version",
              "code",
              "message",
              "retryable",
              "request_id",
              "details"
            ],
            "properties": {
              "schema_version": {
                "type": "string",
                "enum": [
                  "eventium.error.v1"
                ]
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "request_id": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "additionalProperties": true
              },
              "capability": {
                "type": "string"
              }
            }
          }
        }
      },
      "AuthUser": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "email"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "AuthSessionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "authenticated",
          "actor_type",
          "user",
          "csrf_token"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": [
              "1.0"
            ]
          },
          "authenticated": {
            "type": "boolean"
          },
          "actor_type": {
            "type": "string",
            "enum": [
              "user",
              "guest",
              "preauth",
              "recovery"
            ]
          },
          "user": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/AuthUser"
              }
            ]
          },
          "csrf_token": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "PasswordSignInRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 1024
          }
        }
      },
      "PasswordSignInResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "user",
          "csrf_token",
          "capabilities_url"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": [
              "1.0"
            ]
          },
          "user": {
            "$ref": "#/components/schemas/AuthUser"
          },
          "csrf_token": {
            "type": "string",
            "minLength": 1
          },
          "capabilities_url": {
            "type": "string",
            "enum": [
              "/api/me/capabilities"
            ]
          }
        }
      },
      "PasswordSignUpRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email",
          "password",
          "profile",
          "retain_guest_data"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 1024
          },
          "profile": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "username",
              "first_name",
              "last_name",
              "full_name"
            ],
            "properties": {
              "username": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "first_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "last_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "full_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              }
            }
          },
          "retain_guest_data": {
            "type": "boolean"
          }
        }
      },
      "PasswordSignUpResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "verification_required",
          "user_id",
          "guest_claim"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": [
              "1.0"
            ]
          },
          "verification_required": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "guest_claim": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
          }
        }
      },
      "PasswordResetRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          }
        }
      },
      "PasswordResetResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "accepted"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "enum": [
              "1.0"
            ]
          },
          "accepted": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "RecoveryConfirmRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "new_password"
        ],
        "properties": {
          "new_password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 1024
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "ok"
          }
        },
        "required": [
          "status"
        ]
      },
      "DepsHealthResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "deps": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "ok",
          "deps"
        ]
      },
      "PublicConfigResponse": {
        "type": "object",
        "properties": {
          "mcp_hub_url": {
            "type": "string",
            "nullable": true
          },
          "skills_hub_url": {
            "type": "string",
            "nullable": true
          },
          "exchange_v2_only_mode": {
            "type": "boolean"
          },
          "feature_flags": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SandboxKeyRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "usecase": {
            "type": "string"
          },
          "user_id": {
            "type": "string",
            "description": "Optional Supabase user id (uuid) for hosted flows."
          }
        },
        "required": [
          "email",
          "usecase"
        ]
      },
      "SandboxKeyResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "TITAN-XXXXXXXXXXXXXXXXXXXXXXXX"
          }
        },
        "required": [
          "key"
        ]
      },
      "ApiKeyMeta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "ApiKeyListResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyMeta"
            }
          }
        }
      },
      "ApiKeyCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional label for the key."
          }
        }
      },
      "ApiKeyCreateResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          }
        },
        "required": [
          "key"
        ]
      },
      "WebhookEventsResponse": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "secret": {
            "type": "string",
            "description": "Only returned when created or rotated.",
            "nullable": true
          }
        }
      },
      "WebhookEndpointsResponse": {
        "type": "object",
        "properties": {
          "endpoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          }
        }
      },
      "WebhookEndpointCreateRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Must be https://..."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "url"
        ]
      },
      "WebhookEndpointCreateResponse": {
        "type": "object",
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          }
        },
        "required": [
          "endpoint"
        ]
      },
      "WebhookEndpointUpdateRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "type": "boolean"
          },
          "rotate_secret": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "WebhookEndpointUpdateResponse": {
        "type": "object",
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          }
        },
        "required": [
          "endpoint"
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "endpoint_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "attempt_count": {
            "type": "integer"
          },
          "next_attempt_at": {
            "type": "string"
          },
          "last_attempt_at": {
            "type": "string",
            "nullable": true
          },
          "last_http_status": {
            "type": "integer",
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "WebhookDeliveriesResponse": {
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          }
        }
      },
      "WebhookTestRequest": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string",
            "example": "webhook.test"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "WebhookTestResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "queued"
          },
          "event_id": {
            "type": "string"
          },
          "deliveries": {
            "type": "integer"
          }
        }
      },
      "McpToolsResponse": {
        "type": "object",
        "properties": {
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "McpToolInstallRequest": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string"
          },
          "tool_id": {
            "type": "string",
            "description": "Alias for template_id (accepted for compatibility)."
          }
        }
      },
      "McpToolInvokeRequest": {
        "type": "object",
        "properties": {
          "tool_name": {
            "type": "string"
          },
          "tool_id": {
            "type": "string",
            "description": "Alias for tool_name (accepted for compatibility)."
          },
          "input": {
            "type": "object",
            "additionalProperties": true
          },
          "context": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "SkillInstallRequest": {
        "type": "object",
        "properties": {
          "skill_name": {
            "type": "string"
          },
          "skill_id": {
            "type": "string",
            "description": "Alias for skill_name."
          }
        }
      },
      "RuleCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputs": {
            "type": "object",
            "additionalProperties": true
          },
          "actions": {
            "type": "object",
            "additionalProperties": true
          },
          "scope": {
            "type": "string",
            "example": "agent"
          }
        }
      },
      "DocumentsIngestRequest": {
        "type": "object",
        "properties": {
          "source_type": {
            "type": "string",
            "enum": [
              "url",
              "text"
            ],
            "default": "url"
          },
          "url": {
            "type": "string",
            "description": "Required when source_type=url"
          },
          "text": {
            "type": "string",
            "description": "Required when source_type=text"
          }
        },
        "required": [
          "source_type"
        ]
      },
      "DocumentsIngestResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "queued"
          },
          "document_id": {
            "type": "string",
            "example": "doc_0123456789"
          }
        },
        "required": [
          "status",
          "document_id"
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "SessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-eventium_session"
      },
      "PreauthCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-eventium_preauth"
      },
      "RecoveryCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-eventium_recovery"
      },
      "GuestCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-eventium_guest"
      }
    },
    "responses": {
      "AuthenticationRequired": {
        "description": "Missing, expired, revoked or wrong-purpose actor session",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "CsrfInvalid": {
        "description": "Origin, Fetch Metadata or CSRF token rejected",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "Request contract validation failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "UpstreamUnavailable": {
        "description": "Authentication provider or session store unavailable",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "requestBodies": {}
  },
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Gateway",
      "tags": [
        "Gateway",
        "Authentication",
        "API Keys",
        "Webhooks",
        "MCP",
        "Skills",
        "Rules",
        "Documents",
        "Unified Chat",
        "Capabilities",
        "Runtime",
        "Media",
        "Marketplace",
        "Billing"
      ]
    },
    {
      "name": "Atlas D20k",
      "tags": [
        "00 - Command Bus",
        "01 - User",
        "02 - Agent",
        "03 - Domain",
        "04 - Zone",
        "05 - Bank",
        "06 - Context and State"
      ]
    }
  ]
}
