{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://synavistra.ai/schemas/compliance/v1.json",
  "title": "Synavistra Compliance Block",
  "description": "JSON Schema for the manifest.compliance block in Synavistra .snv.zip exports. Defines machine-readable EU AI Act Article 50(2) marking.",
  "type": "object",
  "required": [
    "schemaVersion",
    "schemaUrl",
    "regulation",
    "riskClassification",
    "operatorRole",
    "operator",
    "disclosures",
    "complianceDoc",
    "complianceDocIntegrity",
    "publicStatementUrl"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "1.0",
      "description": "Schema version. Bumped when the Commission finalises the Code of Practice on marking AI-generated content (Art. 50(7))."
    },
    "schemaUrl": {
      "type": "string",
      "format": "uri",
      "const": "https://synavistra.ai/schemas/compliance/v1.json"
    },
    "regulation": {
      "type": "string",
      "const": "Regulation (EU) 2024/1689",
      "description": "The EU AI Act regulation this compliance block covers."
    },
    "riskClassification": {
      "type": "string",
      "enum": ["minimal", "limited", "high", "unacceptable"],
      "description": "Risk tier under the AI Act. 'limited' = Art. 50 transparency obligations apply."
    },
    "operatorRole": {
      "type": "string",
      "enum": ["provider", "deployer", "importer", "distributor"],
      "description": "Role under Regulation (EU) 2024/1689 Art. 3 (provider, deployer, importer, or distributor)."
    },
    "operator": {
      "type": "string",
      "description": "Legal name of the operator/provider."
    },
    "disclosures": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "in-app-banner",
          "per-output-badge",
          "zip-compliance-doc",
          "pdf-footer",
          "html-meta-tags"
        ]
      },
      "uniqueItems": true,
      "description": "Disclosure mechanisms deployed for Art. 50(2) compliance."
    },
    "complianceDoc": {
      "type": "string",
      "description": "Filename of the full compliance declaration within the .snv.zip archive."
    },
    "complianceDocIntegrity": {
      "type": "string",
      "pattern": "^sha256 [0-9a-f]{64}$",
      "description": "SHA-256 hash of the COMPLIANCE.md file. Format: 'sha256 <hex>'. Allows offline verification of document integrity."
    },
    "publicStatementUrl": {
      "type": "string",
      "format": "uri",
      "description": "Canonical URL of the public compliance statement page."
    }
  },
  "additionalProperties": false
}
