{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mcpcensus-com/json-schema/mcpcensus-com-preflight-result-schema.json",
  "title": "PreflightResult",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mcpcensus-com-openapi.json#/components/schemas/PreflightResult",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "ok",
    "decision",
    "decision_scope",
    "meaning",
    "server_name",
    "policy",
    "reasons",
    "facts",
    "facts_digest",
    "decision_input_digest",
    "engine_version",
    "evaluated_at",
    "valid_until",
    "audit_id",
    "audit_signed",
    "limitations"
  ],
  "properties": {
    "ok": {
      "const": true
    },
    "decision": {
      "type": "string",
      "enum": [
        "PASS",
        "REVIEW",
        "BLOCK"
      ]
    },
    "decision_scope": {
      "const": "public_evidence_policy"
    },
    "meaning": {
      "type": "string"
    },
    "server_name": {
      "type": "string"
    },
    "policy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "digest"
      ],
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "builtin:baseline",
            "builtin:first-party",
            "builtin:strict"
          ]
        },
        "revision": {
          "const": 1
        },
        "digest": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        }
      }
    },
    "reasons": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PreflightReason"
      }
    },
    "facts": {
      "type": "object"
    },
    "facts_digest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "decision_input_digest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "engine_version": {
      "type": "string"
    },
    "evaluated_at": {
      "type": "string",
      "format": "date-time"
    },
    "valid_until": {
      "type": "string",
      "format": "date-time"
    },
    "audit_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "audit_signed": {
      "const": false
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "PreflightEvidence": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "value": {},
        "observed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "attempted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "freshness_enforced": {
          "type": "boolean"
        },
        "canonical_evidence_id": {
          "type": "string"
        }
      }
    },
    "PreflightReason": {
      "type": "object",
      "required": [
        "code",
        "result",
        "summary",
        "evidence"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "result": {
          "type": "string",
          "enum": [
            "pass",
            "review",
            "block",
            "context",
            "not_applicable",
            "unknown"
          ]
        },
        "summary": {
          "type": "string"
        },
        "ecosystem": {
          "type": "string"
        },
        "artifact_id": {
          "type": "string"
        },
        "evidence": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PreflightEvidence"
          }
        }
      }
    }
  }
}