{
  "openapi": "3.1.0",
  "info": {
    "title": "Project Warden — Manifest Transparency Log API",
    "version": "1.0.0",
    "description": "Machine-first Manifest Transparency Log (MTL), cloaking verification, and ShareLock split-payload deterministic scanning API for remote MCP servers."
  },
  "paths": {
    "/v1/check": {
      "get": {
        "summary": "Check MCP server integrity and stability",
        "parameters": [
          {
            "name": "server",
            "in": "query",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": { "description": "Server reputation and RFC 8785 manifest hash" },
          "402": { "description": "x402 V2 USDC micropayment required header" },
          "404": { "description": "Endpoint not yet indexed" }
        }
      }
    },
    "/v1/log/{id}": {
      "get": {
        "summary": "Retrieve append-only Manifest Transparency Log snapshots for a server",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Ordered snapshot hash chain and unified diffs" }
        }
      }
    },
    "/v1/sth": {
      "get": {
        "summary": "Retrieve current RFC 6962 Ed25519 Signed Tree Head (STH) checkpoint",
        "responses": {
          "200": { "description": "Signed Tree Head with treeSize, rootHashSha256, ed25519Signature, and publicKeyJwk" }
        }
      }
    },
    "/v1/consistency": {
      "get": {
        "summary": "Retrieve RFC 6962 append-only Merkle consistency proof between two tree sizes",
        "parameters": [
          { "name": "from", "in": "query", "required": true, "schema": { "type": "integer" } },
          { "name": "to", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": { "description": "Consistency proof hashes and current Signed Tree Head" }
        }
      }
    },
    "/v1/proof/{id}": {
      "get": {
        "summary": "Retrieve O(log N) RFC 6962 Merkle inclusion proof and STH for a snapshot or server ID",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Merkle inclusion proof and Ed25519 Signed Tree Head" },
          "404": { "description": "Snapshot or server not found" }
        }
      }
    },
    "/v1/scan": {
      "post": {
        "summary": "Stateless deterministic scan across Layers A, B (ShareLock), and C",
        "responses": {
          "200": { "description": "Deterministic WardenScanReport with rule hits and byte offsets" }
        }
      }
    },
    "/v1/scan-skill": {
      "post": {
        "summary": "Stateless deterministic security scan for Agent SKILL.md specifications",
        "responses": {
          "200": { "description": "Deterministic SkillScanReport with skill_sha256 and ruleHits (Cache-Control: no-store)" }
        }
      }
    },
    "/v1/verify-manifest": {
      "post": {
        "summary": "Cross-check client-observed manifest_sha256 and capability_skeleton_sha256 against Transparency Log & Witness Cohort",
        "responses": {
          "200": { "description": "Cloaking & Split-View equivocation verification verdict" }
        }
      }
    },
    "/v1/witness/sighting": {
      "get": {
        "summary": "Retrieve aggregated zero-knowledge Split-View witness cohort summary for a server target",
        "parameters": [
          { "name": "server", "in": "query", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Aggregated hash sighting cohort counts" } }
      },
      "post": {
        "summary": "Submit an anonymous <300-byte zero-knowledge hash sighting (zero raw tools/secrets accepted)",
        "responses": {
          "200": { "description": "Split-View cohort consensus verdict" },
          "400": { "description": "Rejected raw tool schema or credential payload" }
        }
      }
    },
    "/security": {
      "get": {
        "summary": "Public Zero-Retention Security Architecture, Ed25519 STH, and Stewardship Trust Sheet",
        "responses": { "200": { "description": "HTML or JSON trust specification" } }
      }
    },
    "/server/{id}": {
      "get": {
        "summary": "Indexable SSR server provenance page with SHA-256 lockfile pin, Merkle proof, and drift history",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "HTML provenance page" }, "404": { "description": "Server not indexed" } }
      }
    },
    "/v1/badge/{id}.svg": {
      "get": {
        "summary": "Dynamic SVG integrity badge for GitHub READMEs",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "SVG badge image" }
        }
      }
    },
    "/v1/advisories": {
      "get": {
        "summary": "List WDN-YYYY-NNNN security advisories",
        "responses": { "200": { "description": "Structured advisories array" } }
      }
    },
    "/v1/pricing": {
      "get": {
        "summary": "Retrieve machine-readable x402 V2 and Polar subscription tiers",
        "responses": { "200": { "description": "Pricing and autonomous payment descriptors" } }
      }
    },
    "/v1/verify-now": {
      "post": {
        "summary": "Maintainer self-serve re-verification or CI/CD pre-flight manifest check",
        "responses": { "200": { "description": "Verification status and rule report" } }
      }
    },
    "/v1/attest/oidc": {
      "post": {
        "summary": "Keyless GitHub Actions OIDC provenance attestation for stdio or OAuth-gated MCP servers",
        "responses": {
          "201": { "description": "OIDC JWT verified against GitHub JWKS and recorded in Transparency Log with Merkle inclusion proof" },
          "401": { "description": "OIDC JWT verification failed" }
        }
      }
    },
    "/v1/audit-config": {
      "post": {
        "summary": "Stateless Shadow MCP and client configuration readiness audit (.cursor/mcp.json, claude_desktop_config.json)",
        "responses": { "200": { "description": "Fleet readiness score, per-server posture, and pinned lockfile config" } }
      }
    },
    "/v1/firehose/blocklist": {
      "get": {
        "summary": "Enterprise Gateway Threat Firehose emitting signed blocklist and verified SHA-256 allowlist pins",
        "responses": { "200": { "description": "Cryptographically hashed blocklist and verified pin catalog" } }
      }
    },
    "/v1/ecosystem/stats": {
      "get": {
        "summary": "Aggregated empirical State of MCP Supply Chain telemetry from the Transparency Log",
        "responses": { "200": { "description": "Status breakdown, transport split, stability distribution, and top rule hits" } }
      }
    },
    "/v1/dispute": {
      "get": {
        "summary": "Retrieve Legal Safe-Harbor Factual Disclosure Policy and dispute SLA",
        "responses": { "200": { "description": "Safe-harbor policy and supported dispute categories" } }
      },
      "post": {
        "summary": "Submit a maintainer false-positive appeal, missed-sample feedback, or opt-out request",
        "responses": { "201": { "description": "Dispute ticket created with DSP-2026-XXXX tracking ID" } }
      }
    },
    "/v1/webhooks/polar": {
      "post": {
        "summary": "Polar Merchant of Record webhook for automatic API key provisioning/revocation",
        "responses": { "200": { "description": "Provisioning confirmation" } }
      }
    },
    "/mcp": {
      "post": {
        "summary": "Native Project Warden MCP JSON-RPC 2.0 endpoint",
        "responses": { "200": { "description": "MCP JSON-RPC response" } }
      }
    }
  }
}

