{
  "openapi": "3.1.0",
  "info": {
    "title": "Aria OS Public API",
    "version": "1.0.0",
    "summary": "Public agent-facing surface for Aria OS by TrivianEdge.",
    "description": "Aria OS by TrivianEdge — HR platform. This document advertises public endpoints and payable operations for AI agents, including MPP (Machine Payment Protocol) payment metadata via x-payment-info.",
    "contact": { "name": "TrivianEdge", "url": "https://www.trivian-aria.com", "email": "support@trivian-aria.com" },
    "license": { "name": "Proprietary", "url": "https://www.trivian-aria.com/terms" }
  },
  "servers": [
    { "url": "https://www.trivian-aria.com", "description": "Marketing + public API" },
    { "url": "https://xqwrejhveadzblwpvgfk.supabase.co/functions/v1", "description": "Edge functions (protected APIs, MCP)" }
  ],
  "externalDocs": {
    "description": "Agent discovery hub",
    "url": "https://www.trivian-aria.com/answers"
  },
  "security": [{ "oauth2": [] }, {}],
  "paths": {
    "/facts": {
      "get": {
        "summary": "Canonical facts about Aria OS",
        "description": "Structured, cite-ready facts for AI answer engines.",
        "operationId": "getFacts",
        "security": [{}],
        "responses": { "200": { "description": "HTML page of canonical facts." } }
      }
    },
    "/answers": {
      "get": {
        "summary": "Answers hub",
        "description": "Question-based canonical answers covering HR, payroll, compliance, and Aria OS features.",
        "operationId": "listAnswers",
        "security": [{}],
        "responses": { "200": { "description": "Answers hub HTML." } }
      }
    },
    "/llms-full.txt": {
      "get": {
        "summary": "Full LLM-optimized site index",
        "operationId": "getLlmsFull",
        "security": [{}],
        "responses": { "200": { "description": "Plain-text LLM index.", "content": { "text/plain": {} } } }
      }
    },
    "/functions/v1/mcp": {
      "post": {
        "summary": "Aria OS MCP endpoint (Streamable HTTP)",
        "description": "Model Context Protocol endpoint. See /.well-known/mcp/server-card.json for the server card and /.well-known/oauth-protected-resource for auth.",
        "operationId": "mcpInvoke",
        "responses": { "200": { "description": "MCP JSON-RPC response." }, "401": { "description": "Missing or invalid bearer token." } }
      }
    },
    "/checkout": {
      "post": {
        "summary": "Create a subscription checkout session",
        "description": "Starts a paid checkout for an Aria OS plan. Payable via Paddle (merchant of record) or MPP-supported rails.",
        "operationId": "createCheckout",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["plan"],
                "properties": {
                  "plan": { "type": "string", "enum": ["starter", "growth", "scale", "enterprise"] },
                  "billingCycle": { "type": "string", "enum": ["monthly", "annual"], "default": "monthly" },
                  "seats": { "type": "integer", "minimum": 1, "default": 1 }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Checkout session created." },
          "402": { "description": "Payment required." }
        },
        "x-payment-info": {
          "intent": "session",
          "method": ["stripe", "card", "tempo"],
          "amount": "dynamic",
          "currency": "USD",
          "provider": "paddle",
          "description": "Aria OS subscription checkout",
          "session": {
            "endpoint": "https://www.trivian-aria.com/checkout",
            "returnUrl": "https://www.trivian-aria.com/checkout/success",
            "cancelUrl": "https://www.trivian-aria.com/pricing"
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "summary": "Public pricing page",
        "operationId": "getPricing",
        "security": [{}],
        "responses": { "200": { "description": "Pricing HTML." } },
        "x-payment-info": {
          "intent": "session",
          "method": ["stripe", "card"],
          "amount": "dynamic",
          "currency": "USD",
          "provider": "paddle",
          "description": "Aria OS plan selection"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 with PKCE against the Aria OS authorization server. See /.well-known/oauth-authorization-server.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://xqwrejhveadzblwpvgfk.supabase.co/auth/v1/authorize",
            "tokenUrl": "https://xqwrejhveadzblwpvgfk.supabase.co/auth/v1/token",
            "refreshUrl": "https://xqwrejhveadzblwpvgfk.supabase.co/auth/v1/token",
            "scopes": {
              "openid": "OpenID Connect identity",
              "profile": "Basic profile",
              "email": "Email address",
              "offline_access": "Refresh tokens"
            }
          }
        }
      }
    }
  },
  "x-mpp": {
    "version": "0.1",
    "discovery": "https://www.trivian-aria.com/.well-known/api-catalog",
    "supportedMethods": ["stripe", "card", "tempo"],
    "contact": "billing@trivian-aria.com"
  }
}