{
  "openapi": "3.1.0",
  "info": {
    "title": "Systemores AI Agent Auditor API",
    "version": "1.1.0",
    "summary": "Enterprise AI agent psychometric, regulatory compliance, MCP 2026 schema audit, and sub-250ms System One live turn circuit-breaker API.",
    "description": "Programmatic REST JSON (`/api/v1/*`, `/api/audit`) and stateless Streamable HTTP MCP 2026 (`/api/mcp`) access to Systemores AI Agent Auditor.\n\n### Versioning, Deprecation & Sunset Policy\nMajor versions are scoped in the URL path (`/api/v1`) and echoed in the `X-API-Version` and `API-Version` response headers. Non-breaking additive fields may be introduced within `v1`. Before retiring any versioned endpoint, Systemores provides at least a **180-day notice window** using RFC 9745 `Deprecation` (`@<unix-timestamp>`), RFC 8594 `Sunset` (HTTP-date), and `Link: <https://audit.systemores.com/developers/deprecation>; rel=\"deprecation\"` headers.\n\n### Rate Limits & Typed Problem Errors\nAll public API and error responses include RFC `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy`, and `RateLimit` headers (plus `Retry-After` on HTTP `429`). Every `4xx` and `5xx` error returns structured RFC 9457 Problem Details JSON containing machine-readable `code`, human-readable `message` / `detail`, and an actionable `resolution` hint.",
    "contact": {
      "name": "Systemores LLC",
      "url": "https://audit.systemores.com/contact"
    },
    "license": {
      "name": "Proprietary — Public Free & Commercial Pro/Team Tiers",
      "url": "https://audit.systemores.com/terms"
    }
  },
  "x-deprecation-policy": {
    "url": "https://audit.systemores.com/developers/deprecation",
    "minimum_sunset_days": 180,
    "deprecation_header": "Deprecation",
    "sunset_header": "Sunset"
  },
  "servers": [
    {
      "url": "https://audit.systemores.com",
      "description": "Production REST API & Streamable HTTP MCP 2026 Server"
    }
  ],
  "x-mcp-server": {
    "transport": "streamable-http",
    "endpoint": "https://audit.systemores.com/api/mcp",
    "alias": "https://audit.systemores.com/mcp",
    "discovery": "https://audit.systemores.com/.well-known/mcp.json",
    "stateless": true,
    "tools": [
      "systemores_stress_test_agent",
      "systemores_evaluate_drift",
      "systemores_assess_bias",
      "systemores_measure_drag",
      "systemores_tool_integrity",
      "systemores_audit_tool_integrity",
      "systemores_audit_agent_graph",
      "systemores_generate_cohort",
      "systemores_inject_environment_fault",
      "systemores_analyze_trace_telemetry",
      "systemores_export_dossier",
      "systemores_audit_turn_live"
    ]
  },
  "tags": [
    {
      "name": "Discovery",
      "description": "API service index, MCP tool catalog, and operational health checks."
    },
    {
      "name": "Auditing",
      "description": "Pre-deployment behavioral psychometrics, bias testing, and live turn circuit breaking."
    },
    {
      "name": "Intelligence",
      "description": "Real-world AI agent incident feed and platform audit statistics."
    },
    {
      "name": "MCP",
      "description": "Stateless Streamable HTTP Model Context Protocol 2026 endpoint."
    }
  ],
  "paths": {
    "/api": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getApiIndex",
        "summary": "Get root API discovery index",
        "description": "Returns canonical links to the versioned REST API v1 root, OpenAPI 3.1 specification, RFC 9727 API catalog, MCP discovery document, deprecation policy, and health check.",
        "responses": {
          "200": {
            "description": "Root API service discovery metadata.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiDiscoveryIndex"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getApiV1Index",
        "summary": "Get REST API v1 discovery index and lifecycle policy",
        "description": "Returns REST API v1 endpoints, sliding-window rate limits per plan tier, URL-path versioning strategy, and the 180-day minimum sunset notice policy.",
        "responses": {
          "200": {
            "description": "API v1 endpoint index and lifecycle policy.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiV1Index"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "listMcpTools",
        "summary": "List all 12 MCP 2026 diagnostic tools and schemas",
        "description": "Returns the complete machine-readable catalog of all 12 Systemores MCP diagnostic tools, including JSON Schema inputSchema/outputSchema, MCP annotations, and plan tier metadata. Supports optional filtering by tier.",
        "parameters": [
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "free",
                "pro",
                "team"
              ]
            },
            "example": "free",
            "description": "Optional filter to return only tools belonging to free, pro, or team tiers."
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog of Systemores MCP diagnostic tools.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpToolCatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "operationId": "getApiHealth",
        "summary": "Check API and backing subsystem health",
        "description": "Returns real-time operational health status for Gemini Decision Engine, Systemores Core API, Redis rate-limiting store, and trial token verification without exposing sensitive secrets.",
        "responses": {
          "200": {
            "description": "Operational health status.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/incidents": {
      "get": {
        "tags": [
          "Intelligence"
        ],
        "operationId": "listAiIncidents",
        "summary": "List curated autonomous AI agent incidents",
        "description": "Returns filtered public AI incident reports relevant to autonomous agents, prompt injection, hallucinated actions, and unauthorized execution.",
        "responses": {
          "200": {
            "description": "AI agent incident feed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentFeedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/stats": {
      "get": {
        "tags": [
          "Intelligence"
        ],
        "operationId": "getAuditStats",
        "summary": "Get aggregate platform audit and share telemetry counters",
        "description": "Returns aggregate telemetry counts for completed behavioral audits and shared diagnostic reports across audit.systemores.com.",
        "responses": {
          "200": {
            "description": "Aggregate audit and share counters.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit": {
      "post": {
        "tags": [
          "Auditing"
        ],
        "operationId": "runAgentBehavioralAudit",
        "summary": "Run a pre-deployment behavioral audit or System One live turn check",
        "description": "Executes one of six diagnostic modules against an agent system prompt or live conversation turn: stress_test (Murray Needs-Press), evaluate_drift, assess_bias, measure_drag, tool_integrity, or audit_turn_live (sub-250ms System One circuit breaker).",
        "requestBody": {
          "required": true,
          "description": "Diagnostic module selection and target prompt/turn inputs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagnostic psychometric, compliance, or circuit-breaker evaluation result.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    },
    "/api/mcp": {
      "post": {
        "tags": [
          "MCP"
        ],
        "operationId": "invokeMcpStreamableHttp",
        "summary": "Invoke stateless Streamable HTTP MCP 2026 JSON-RPC endpoint",
        "description": "Stateless Model Context Protocol (MCP 2026) JSON-RPC 2.0 endpoint supporting initialize, notifications/initialized, tools/list, and tools/call across all 12 diagnostic tools. Authenticate via Authorization Bearer token for Pro and Team tools; 3 static auditors run without a token.",
        "security": [
          {},
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Standard JSON-RPC 2.0 MCP request envelope.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpJsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 MCP response containing content and structuredContent.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpJsonRpcResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or malformed payload.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Bearer API token for gated Pro/Team tools.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "404": {
            "description": "Requested endpoint or resource was not found.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "429": {
            "description": "Sliding-window or daily rate limit exceeded.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error while executing request.",
            "headers": {
              "X-API-Version": {
                "$ref": "#/components/headers/X-API-Version"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Systemores Pro/Team/Trial Token",
        "description": "Optional Bearer token from https://audit.systemores.com/pricing unlocking Pro and Team MCP tools."
      }
    },
    "headers": {
      "X-API-Version": {
        "description": "Semantic version of the Systemores Agent Auditor public API.",
        "schema": {
          "type": "string",
          "example": "1.1.0"
        }
      },
      "RateLimit-Limit": {
        "description": "Maximum requests permitted in the current 60-second window.",
        "schema": {
          "type": "integer",
          "example": 60
        }
      },
      "RateLimit-Remaining": {
        "description": "Remaining requests in the current 60-second window.",
        "schema": {
          "type": "integer",
          "example": 59
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the current sliding rate-limit window resets.",
        "schema": {
          "type": "integer",
          "example": 60
        }
      },
      "RateLimit-Policy": {
        "description": "Structured rate-limit quota policy header (`<limit>;w=<window_seconds>`).",
        "schema": {
          "type": "string",
          "example": "60;w=60"
        }
      },
      "Retry-After": {
        "description": "Number of seconds to wait before retrying after HTTP 429.",
        "schema": {
          "type": "integer",
          "example": 60
        }
      }
    },
    "schemas": {
      "ProblemError": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code",
          "message",
          "resolution"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://audit.systemores.com/developers#error-endpoint_not_found"
          },
          "title": {
            "type": "string",
            "example": "ENDPOINT_NOT_FOUND"
          },
          "status": {
            "type": "integer",
            "example": 404
          },
          "detail": {
            "type": "string",
            "example": "No API endpoint exists at /api/unknown."
          },
          "code": {
            "type": "string",
            "example": "ENDPOINT_NOT_FOUND"
          },
          "message": {
            "type": "string",
            "example": "No API endpoint exists at /api/unknown."
          },
          "resolution": {
            "type": "string",
            "example": "Consult https://audit.systemores.com/openapi.json or GET /api/v1 for valid endpoints."
          },
          "docs_url": {
            "type": "string",
            "format": "uri",
            "example": "https://audit.systemores.com/developers"
          },
          "openapi_url": {
            "type": "string",
            "format": "uri",
            "example": "https://audit.systemores.com/openapi.json"
          }
        }
      },
      "ApiDiscoveryIndex": {
        "type": "object",
        "required": [
          "service",
          "version",
          "status",
          "openapi_url",
          "v1_url",
          "mcp_endpoint"
        ],
        "properties": {
          "service": {
            "type": "string",
            "example": "Systemores AI Agent Auditor API"
          },
          "version": {
            "type": "string",
            "example": "1.1.0"
          },
          "status": {
            "type": "string",
            "example": "ok"
          },
          "documentation_url": {
            "type": "string",
            "format": "uri"
          },
          "openapi_url": {
            "type": "string",
            "format": "uri"
          },
          "api_catalog_url": {
            "type": "string",
            "format": "uri"
          },
          "mcp_discovery_url": {
            "type": "string",
            "format": "uri"
          },
          "deprecation_policy_url": {
            "type": "string",
            "format": "uri"
          },
          "v1_url": {
            "type": "string",
            "format": "uri"
          },
          "tools_url": {
            "type": "string",
            "format": "uri"
          },
          "health_url": {
            "type": "string",
            "format": "uri"
          },
          "incidents_url": {
            "type": "string",
            "format": "uri"
          },
          "stats_url": {
            "type": "string",
            "format": "uri"
          },
          "audit_url": {
            "type": "string",
            "format": "uri"
          },
          "mcp_endpoint": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ApiV1Index": {
        "type": "object",
        "required": [
          "service",
          "api_version",
          "spec_version",
          "status",
          "versioning",
          "rate_limits",
          "endpoints"
        ],
        "properties": {
          "service": {
            "type": "string"
          },
          "api_version": {
            "type": "string",
            "example": "v1"
          },
          "spec_version": {
            "type": "string",
            "example": "1.1.0"
          },
          "status": {
            "type": "string",
            "example": "active"
          },
          "versioning": {
            "type": "object",
            "properties": {
              "strategy": {
                "type": "string",
                "example": "url-path"
              },
              "current": {
                "type": "string",
                "example": "v1"
              },
              "minimum_sunset_notice_days": {
                "type": "integer",
                "example": 180
              },
              "deprecation_policy_url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "rate_limits": {
            "type": "object",
            "properties": {
              "public_discovery_per_minute": {
                "type": "integer",
                "example": 60
              },
              "public_audit_per_minute": {
                "type": "integer",
                "example": 10
              },
              "public_audit_per_day": {
                "type": "integer",
                "example": 60
              },
              "mcp_free_per_minute": {
                "type": "integer",
                "example": 20
              },
              "trial_per_minute": {
                "type": "integer",
                "example": 30
              },
              "pro_mcp_per_minute": {
                "type": "integer",
                "example": 60
              },
              "team_mcp_per_minute": {
                "type": "integer",
                "example": 120
              }
            }
          },
          "endpoints": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      },
      "McpToolCatalogResponse": {
        "type": "object",
        "required": [
          "version",
          "total",
          "tier_filter",
          "mcp_endpoint",
          "tools"
        ],
        "properties": {
          "version": {
            "type": "string",
            "example": "1.1.0"
          },
          "total": {
            "type": "integer",
            "example": 12
          },
          "tier_filter": {
            "type": "string",
            "example": "all"
          },
          "mcp_endpoint": {
            "type": "string",
            "format": "uri"
          },
          "mcp_alias": {
            "type": "string",
            "format": "uri"
          },
          "openapi_url": {
            "type": "string",
            "format": "uri"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "title",
                "description",
                "annotations",
                "inputSchema",
                "tier"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "tier": {
                  "type": "string",
                  "enum": [
                    "free",
                    "pro",
                    "team"
                  ]
                },
                "annotations": {
                  "type": "object"
                },
                "inputSchema": {
                  "type": "object"
                },
                "outputSchema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "HealthStatus": {
        "type": "object",
        "required": [
          "service",
          "version",
          "status",
          "timestamp",
          "mode",
          "services"
        ],
        "properties": {
          "service": {
            "type": "string",
            "example": "Systemores AI Agent Auditor API"
          },
          "version": {
            "type": "string",
            "example": "1.1.0"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ],
            "example": "ok"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "gemini-only",
              "fallback"
            ]
          },
          "services": {
            "type": "object",
            "properties": {
              "gemini": {
                "type": "string"
              },
              "systemores": {
                "type": "string"
              },
              "redis": {
                "type": "string",
                "enum": [
                  "connected",
                  "env-missing",
                  "error"
                ]
              },
              "trial_tokens": {
                "type": "string"
              }
            }
          }
        }
      },
      "IncidentFeedResponse": {
        "type": "object",
        "properties": {
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "report_number": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "source_domain": {
                  "type": "string"
                },
                "epoch_date_submitted": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "AuditStatsResponse": {
        "type": "object",
        "required": [
          "audits",
          "shares"
        ],
        "properties": {
          "audits": {
            "type": "integer",
            "example": 1428
          },
          "shares": {
            "type": "integer",
            "example": 388
          }
        }
      },
      "AuditRequest": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "stress_test",
              "evaluate_drift",
              "assess_bias",
              "measure_drag",
              "tool_integrity",
              "audit_turn_live"
            ],
            "description": "Audit diagnostic module to execute."
          },
          "systemPrompt": {
            "type": "string",
            "maxLength": 8000,
            "description": "Target agent system prompt (required for all actions except measure_drag)."
          },
          "role": {
            "type": "string",
            "enum": [
              "customer_support",
              "financial_underwriter",
              "medical_assistant",
              "general_developer"
            ],
            "description": "Agent role when action is stress_test."
          },
          "pressIntensity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "description": "Adversarial press intensity when action is stress_test."
          },
          "turns": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10,
            "description": "Conversation turn horizon when action is evaluate_drift."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 1.5,
            "default": 0.7,
            "description": "Sampling temperature when action is evaluate_drift."
          },
          "complianceDomain": {
            "type": "string",
            "enum": [
              "employment_eeoc",
              "housing_fair",
              "lending_ecoa",
              "children_coppa"
            ],
            "description": "Regulatory domain when action is assess_bias."
          },
          "promptLength": {
            "type": "integer",
            "minimum": 0,
            "description": "Character count of prompt input for measure_drag."
          },
          "responseLength": {
            "type": "integer",
            "minimum": 0,
            "description": "Character count of model response for measure_drag."
          },
          "latencyMs": {
            "type": "integer",
            "minimum": 1,
            "description": "Observed model inference latency in milliseconds for measure_drag."
          },
          "toolContext": {
            "type": "string",
            "enum": [
              "api_calls",
              "database",
              "filesystem",
              "code_execution"
            ],
            "default": "api_calls",
            "description": "Execution environment when action is tool_integrity."
          },
          "userMessage": {
            "type": "string",
            "maxLength": 8000,
            "description": "End-user message for audit_turn_live."
          },
          "agentResponse": {
            "type": "string",
            "maxLength": 8000,
            "description": "Proposed assistant text response for audit_turn_live."
          },
          "proposedToolCall": {
            "type": "string",
            "maxLength": 8000,
            "description": "Optional serialized tool invocation proposed by the agent for audit_turn_live."
          }
        }
      },
      "AuditResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "PASSED"
          },
          "recommendation": {
            "type": "string"
          },
          "metrics": {
            "type": "object"
          },
          "rawScores": {
            "type": "object"
          },
          "adjectives": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "derivedPsychometrics": {
            "type": "object"
          },
          "circuitBreakerAction": {
            "type": "string",
            "enum": [
              "DISPATCH",
              "INTERCEPT",
              "QUARANTINE",
              "STRIP_TOOL"
            ]
          }
        }
      },
      "McpJsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "notifications/initialized",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "McpJsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}