{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.caracal.run/schemas/caracal-audit-exporter-manifest-2026-05-21.schema.json",
  "title": "Caracal Audit Exporter Manifest",
  "description": "Offline compatibility metadata for audit event exporters.",
  "type": "object",
  "required": ["schema_version", "name", "version", "event_schema_version", "destinations", "delivery", "redaction", "replay"],
  "properties": {
    "schema_version": {
      "const": "2026-05-21"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "event_schema_version": {
      "const": "2026-05-21"
    },
    "destinations": {
      "type": "array",
      "items": {
        "enum": ["otel_logs", "splunk_hec", "datadog_logs", "clickhouse", "s3", "webhook"]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "delivery": {
      "type": "object",
      "required": ["mode", "retry", "ordering"],
      "properties": {
        "mode": {
          "enum": ["stream", "batch"]
        },
        "retry": {
          "enum": ["at_least_once", "none"]
        },
        "ordering": {
          "enum": ["ledger_order", "best_effort"]
        }
      },
      "additionalProperties": false
    },
    "redaction": {
      "type": "object",
      "required": ["forbidden_fields"],
      "properties": {
        "forbidden_fields": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "replay": {
      "type": "object",
      "required": ["supported"],
      "properties": {
        "supported": {
          "type": "boolean"
        },
        "cursor": {
          "enum": ["ledger_sequence", "occurred_at", "none"]
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
