{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sakibshuvo.github.io/Entroping/schemas/report-artifact-manifest.v1.schema.json",
  "title": "Entroping Report Artifact Manifest v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "summary",
    "artifacts",
    "missing_artifacts"
  ],
  "properties": {
    "schema_version": {
      "const": "entroping.report-artifact-manifest.v1"
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["total_expected", "total_present", "total_missing"],
      "properties": {
        "total_expected": {"type": "integer", "minimum": 0},
        "total_present": {"type": "integer", "minimum": 0},
        "total_missing": {"type": "integer", "minimum": 0}
      }
    },
    "artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["kind", "path", "schema_version", "size_bytes", "sha256"],
        "properties": {
          "kind": {
            "enum": [
              "run_json",
              "run_plan",
              "junit",
              "run_html",
              "drift_json",
              "agent_bundle",
              "sarif",
              "review_summary"
            ]
          },
          "path": {"type": "string"},
          "schema_version": {"type": ["string", "null"]},
          "size_bytes": {"type": "integer", "minimum": 0},
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      }
    },
    "missing_artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["kind", "path"],
        "properties": {
          "kind": {
            "enum": [
              "run_json",
              "run_plan",
              "junit",
              "run_html",
              "drift_json",
              "agent_bundle",
              "sarif",
              "review_summary"
            ]
          },
          "path": {"type": "string"}
        }
      }
    }
  }
}
