Skip to content

Schema: event envelope

Immutable event with causal metadata for distributed conflict detection. Timestamp semantics ------------------- The ``timestamp`` field is the producer-assigned wall-clock occurrence time of the modelled event. Consumers (SaaS ingestion, dashboards, audit, sync drains, projections, scorecards) MUST preserve this value end-to-end and MUST NOT substitute server-receipt, import, drain, or replay time for it. Consumer-side receipt/import time, if persisted, MUST be stored under a distinct field name — the recommended name is ``received_at``. See ``kitty-specs/teamspace-event-contract-foundation-01KQHDE4/data-model.md`` (Timestamp Semantics: Rules R-T-01, R-T-02, R-T-03) for the authoritative rules, and ``spec_kitty_events.conformance.assert_producer_occurrence_preserved`` for an executable consumer-side conformance helper.

Normative envelope 3.0.0. The on-wire envelope every event family rides in. The CloudEvents write profile and read profile of the producer contract are non-normative until 12.0.0.

Generated from src/spec_kitty_events/schemas/event.schema.json by scripts/schema_pages.py; never hand-edit (C-001).

Family

Listed on the The envelope hub.

Diagram

EventStructure of the JSON Schema Event.$idspec-kitty-events/event$schemahttps://json-schema.org/draft/2020-12/schemadescriptionImmutable event with causal metadata for distributed conflict detection. Timestamp semantics------- The ``timestamp`` field is the producer-assigned wall-clock occurrence time of the modelled event. Consumers (SaaS ingestion, dashboards, audit, sync drains, projections, scorecards) MUST preserve this value end-to-end and MUST NOT substitute server-receipt, import, drain, or replay time for it. Consumer-side receipt/import time, if persisted, MUST be stored under a distinct field name — the recommended name is ``received_at``. See ``kitty-specs/teamspace-event-contract-found ation-01KQHDE4/data-model.md`` (Timestamp Semantics: Rules R-T-01, R-T-02, R-T-03) for the authoritative rules, and ``spec_kitty_events.con formance.assert_producer_occurrence_preserved`` for an executable consumer-side conformance helper.properties   required   titleEventtypeobjectaggregate_id   build_id   causation_id   correlation_id   data_tier   event_id   event_type   lamport_clock   node_id   payload   project_slug   project_uuid   schema_version   timestamp   descriptionIdentifier of the entity this event modifiesminLength1titleAggregate IdtypestringdescriptionCanonical checkout or worktree identity that produced this eventminLength1titleBuild IdtypestringanyOf   default␀descriptionEvent ID of the parent event (26-char ULID or UUID accepted, None for root events)pattern^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$|^[0-9a-fA- F]{32}$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA- F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$titleCausation Id      maxLength36minLength26typestringtypenulldescriptionCorrelation identifier (26-char ULID or UUID accepted)maxLength36minLength26pattern^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$|^[0-9a-fA- F]{32}$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA- F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$titleCorrelation Idtypestringdefault0descriptionProgressive data sharing tier (0=local, 4=telemetry)maximum4minimum0titleData TiertypeintegerdescriptionUnique event identifier (26-char ULID or UUID accepted)maxLength36minLength26pattern^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$|^[0-9a-fA- F]{32}$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA- F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$titleEvent IdtypestringdescriptionEvent type identifier (e.g., 'WPStatusChanged', 'TagAdded')minLength1titleEvent TypetypestringanyOf   default␀descriptionOptional Lamport logical clock value (monotonically increasing). An envelope without it is unclocked and orders before clocked ones.titleLamport Clock      minimum0typeintegertypenulldescriptionRequired causal emitter identity used for Lamport ordering and deterministic tie-breakingminLength1titleNode IdtypestringadditionalProperties☑ truedescriptionEvent-specific data (opaque to library)titlePayloadtypeobjectanyOf   default␀descriptionHuman-readable project identifier (optional)titleProject Slug      typestringtypenulldescriptionUUID of the project this event belongs toformatuuidtitleProject Uuidtypestringdefault3.0.0descriptionEnvelope schema version (semver)pattern^\d+\.\d+\.\d+$titleSchema VersiontypestringdescriptionProducer-assigned wall-clock occurrence time (ISO-8601 UTC). Records when the modelled event actually happened on the producing system (CLI machine, runtime worker, tracker subsystem). Consumers MUST preserve this value through ingestion, persistence, projection, reduction, and serialization, and MUST NOT substitute receipt/import/server time for this field. Consumer receipt time, if persisted, MUST be stored under a distinct field (recommended: 'received_at'). Not used for ordering — Lamport clock and node_id own ordering.formatdate-timetitleTimestamptypestringevent_idevent_typeaggregate_idtimestampbuild_idnode_idproject_uuidcorrelation_id
Structure of the JSON Schema Event.

Properties

  • aggregate_id (string, required): Identifier of the entity this event modifies
  • build_id (string, required): Canonical checkout or worktree identity that produced this event
  • causation_id (string | null): Event ID of the parent event (26-char ULID or UUID accepted, None for root events)
  • correlation_id (string, required): Correlation identifier (26-char ULID or UUID accepted)
  • data_tier (integer): Progressive data sharing tier (0=local, 4=telemetry)
  • event_id (string, required): Unique event identifier (26-char ULID or UUID accepted)
  • event_type (string, required): Event type identifier (e.g., 'WPStatusChanged', 'TagAdded')
  • lamport_clock (integer | null): Optional Lamport logical clock value (monotonically increasing). An envelope without it is unclocked and orders before clocked ones.
  • node_id (string, required): Required causal emitter identity used for Lamport ordering and deterministic tie-breaking
  • payload (object): Event-specific data (opaque to library)
  • project_slug (string | null): Human-readable project identifier (optional)
  • project_uuid (string, required): UUID of the project this event belongs to
  • schema_version (string): Envelope schema version (semver)
  • timestamp (string, required): Producer-assigned wall-clock occurrence time (ISO-8601 UTC). Records when the modelled event actually happened on the producing system (CLI machine, runtime worker, tracker subsystem). Consumers MUST preserve this value through ingestion, persistence, projection, reduction, and serialization, and MUST NOT substitute receipt/import/server time for this field. Consumer receipt time, if persisted, MUST be stored under a distinct field (recommended: 'received_at'). Not used for ordering — Lamport clock and node_id own ordering.

Source

Schema file: schemas/event.schema.json