{
  "openapi": "3.1.0",
  "info": {
    "title": "ScreenCommand site for agents",
    "version": "1.0.0",
    "description": "Read the ScreenCommand site as markdown and ask its rule-based agent. No sign-in or API key.",
    "contact": { "name": "ScreenCommand", "email": "support\u0040screencommand.app", "url": "https://screencommand.app/" }
  },
  "servers": [{ "url": "https://screencommand.app" }],
  "paths": {
    "/{page}": {
      "get": {
        "operationId": "readPage",
        "summary": "Read a page as markdown",
        "description": "Works for every page in /sitemap.xml, including ones with more path segments such as /es/faq. Send Accept: text/markdown; without it the same URL returns HTML.",
        "parameters": [
          { "name": "page", "in": "path", "required": true, "schema": { "type": "string" }, "example": "faq" },
          { "name": "Accept", "in": "header", "required": true, "schema": { "type": "string", "const": "text/markdown" } }
        ],
        "responses": {
          "200": { "description": "The page as markdown", "content": { "text/markdown": { "schema": { "type": "string" } } } },
          "404": { "description": "No such page" }
        }
      }
    },
    "/api/a2a": {
      "post": {
        "operationId": "askAgent",
        "summary": "A2A agent over JSON-RPC 2.0",
        "description": "Described in /.well-known/agent-card.json. Rule-based: any message gets the product summary and links.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["jsonrpc", "method"],
                "properties": {
                  "jsonrpc": { "type": "string", "const": "2.0" },
                  "id": {},
                  "method": { "type": "string", "enum": ["SendMessage", "message/send"] },
                  "params": { "type": "object" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "A JSON-RPC response", "content": { "application/json": { "schema": { "type": "object" } } } },
          "400": { "description": "The body is not one JSON-RPC 2.0 request" }
        }
      }
    }
  }
}
