{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/provenance-envelope.schema.json",
  "title": "IARPG Non-Authenticating Provenance Envelope",
  "type": "object",
  "required": [
    "envelope_id",
    "envelope_version",
    "artifact_id",
    "artifact_digest",
    "parent_artifacts",
    "workflow_action",
    "tool_build",
    "event_utc",
    "declared_local_role_label",
    "reason_code",
    "applicable_standards",
    "preserved_extensions",
    "authenticity_limitation"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "envelope_id": {
      "type": "string"
    },
    "envelope_version": {
      "const": "1.0.0"
    },
    "artifact_id": {
      "type": "string"
    },
    "artifact_digest": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "parent_artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "artifact_id",
          "artifact_digest"
        ],
        "properties": {
          "artifact_id": {
            "type": "string"
          },
          "artifact_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "additionalProperties": false
      }
    },
    "workflow_action": {
      "enum": [
        "create",
        "merge",
        "migrate",
        "replay",
        "publication-preview",
        "recover",
        "review"
      ]
    },
    "tool_build": {
      "type": "string"
    },
    "event_utc": {
      "type": "string",
      "pattern": "Z$"
    },
    "declared_local_role_label": {
      "type": "string"
    },
    "reason_code": {
      "type": "string"
    },
    "applicable_standards": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "preserved_extensions": {
      "type": "object"
    },
    "authenticity_limitation": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
