{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-docs-draft/0.1",
      "description": "Draft discriminator. This value is not OWP v0.4 conformance or an alpha wire profile."
    },
    "id": {
      "type": "string",
      "pattern": "^evt_[A-Za-z0-9]{8,64}$",
      "description": "Source defines the prefix; this draft chooses an 8–64 character alphanumeric suffix."
    },
    "sequence_id": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Coordinator order. Draft bounds JSON integers for JavaScript interoperability."
    },
    "event_type": {
      "type": "string",
      "enum": [
        "job.posted",
        "grant.issued",
        "job.settled",
        "agent.deactivated",
        "reputation.override",
        "heartbeat.received"
      ],
      "description": "Only event names explicitly present in source examples; incomplete event catalog."
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    },
    "payload": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "description": "Opaque event-specific data. An event-specific schema and verified signer policy are also required."
    },
    "previous_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256, lowercase hexadecimal. Encoding is a draft choice."
    },
    "hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256, lowercase hexadecimal. Encoding is a draft choice."
    }
  },
  "required": [
    "profile",
    "id",
    "sequence_id",
    "event_type",
    "timestamp",
    "payload",
    "previous_hash",
    "hash"
  ],
  "additionalProperties": false,
  "description": "§17 event structure, not a signed webhook envelope. Byte framing, genesis and signature envelopes remain unresolved.",
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "title": "Event",
  "$comment": "owp-docs-draft/0.1: proposed documentation shape only. Source: https://app.notion.com/p/338ed9cb3201819d96e9fc7b8e88594a §17.1. No production conformance claim."
}
