{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://visuals.thegr0ve.com/schemas/public-asset-index.schema.json",
  "title": "Visual Commons Public Asset Index",
  "description": "Flat machine-readable index of every downloadable Visual Atom asset variant exposed on the public LLM-traversable Visual Commons surface.",
  "type": "object",
  "required": [
    "schema_version",
    "public_data_version",
    "generated_surface",
    "canonical_base_url",
    "robots_policy",
    "download_policy",
    "rights_boundary",
    "asset_count",
    "assets"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "schema_version": {
      "type": "string"
    },
    "public_data_version": {
      "type": "string"
    },
    "generated_surface": {
      "const": "visuals_public_asset_index"
    },
    "commons_name": {
      "type": "string"
    },
    "canonical_base_url": {
      "type": "string",
      "format": "uri"
    },
    "robots_policy": {
      "type": "string"
    },
    "noindex": {
      "type": "boolean"
    },
    "indexing_policy": {
      "type": "string"
    },
    "download_policy": {
      "type": "string"
    },
    "rights_boundary": {
      "type": "string"
    },
    "asset_count": {
      "type": "integer"
    },
    "reuse_approved_asset_count": {
      "type": "integer"
    },
    "blocked_asset_count": {
      "type": "integer"
    },
    "source_atom_count": {
      "type": "integer"
    },
    "metrics_snapshot": {
      "type": "object"
    },
    "public_data_endpoints": {
      "type": "object"
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "asset_id",
          "variant_id",
          "atom_id",
          "atom_slug",
          "atom_title",
          "variant_type",
          "download_url",
          "absolute_download_url",
          "width",
          "height",
          "format",
          "file_size_bytes",
          "checksum",
          "download_access_state",
          "reuse_approved",
          "rights_boundary"
        ],
        "properties": {
          "asset_id": {
            "type": "string"
          },
          "variant_id": {
            "type": "string"
          },
          "atom_id": {
            "type": "string"
          },
          "atom_slug": {
            "type": "string"
          },
          "atom_title": {
            "type": "string"
          },
          "atom_canonical_url": {
            "type": "string",
            "format": "uri"
          },
          "atom_preview_path": {
            "type": "string"
          },
          "atom_absolute_preview_url": {
            "type": "string",
            "format": "uri"
          },
          "variant_type": {
            "type": "string"
          },
          "download_label": {
            "type": "string"
          },
          "download_url": {
            "type": "string"
          },
          "absolute_download_url": {
            "type": "string",
            "format": "uri"
          },
          "content_url": {
            "type": "string",
            "format": "uri"
          },
          "file_path": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "format": {
            "type": "string"
          },
          "encoding_format": {
            "type": "string"
          },
          "file_size_bytes": {
            "type": "integer"
          },
          "checksum": {
            "type": "string"
          },
          "quality_status": {
            "type": "string"
          },
          "technical_download_available": {
            "type": "boolean"
          },
          "download_access_state": {
            "enum": [
              "public_download",
              "reuse_approved",
              "blocked"
            ]
          },
          "reuse_approved": {
            "type": "boolean"
          },
          "license": {
            "type": "string"
          },
          "license_label": {
            "type": "string"
          },
          "provenance_state": {
            "type": "string"
          },
          "third_party_rights_risk": {
            "type": "string"
          },
          "rights_boundary": {
            "type": "string"
          },
          "primary_totem": {
            "type": "object"
          },
          "secondary_totems": {
            "type": "array"
          },
          "visual_family": {
            "type": "string"
          },
          "orientation": {
            "type": "string"
          },
          "phi": {
            "type": "number"
          },
          "phi_role": {
            "type": "string"
          },
          "site_index_state": {
            "type": "string"
          },
          "machine_tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string"
          },
          "llm_access_policy": {
            "type": "string"
          },
          "commons_access_statement": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "llm_access_policy": {
      "type": "string"
    },
    "commons_access_statement": {
      "type": "string"
    },
    "public_download_asset_count": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}
