Event Contract

Harmovela Event Contract

> Status: draft. Language-neutral contract boundary.

Ownership

Event owns envelope validation, registry lookup, session lifecycle, subscription matching, routing, and transport contracts.

The existing specifications define the behavior within those responsibilities: envelope and conformance rules, event registry governance, session lifecycle, subscription model, and the transport binding specifications in this directory. This contract assigns ownership without duplicating their wire fields or transport binding details.

Event Registry Ownership

Event owns only the control entries needed to establish, route, and end an Event interaction. The registry is not a catalog of domain events.

Control areaEvent registry entriesOwnership boundary
EnvelopeNo event type; the envelope fields and validation rulesEvent validates envelopes before registry lookup or routing.
Sessionsession.opened, session.ready, session.heartbeat, session.closed, session.errorSession lifecycle and negotiation control.
Capability negotiationcapabilities.requested, capabilities.declared, capabilities.changedSession and transport capability control.
Subscriptionsubscription.requested, subscription.created, subscription.rejected, subscription.cancelled, subscription.expiredSubscription creation, confirmation, rejection, and termination.
RoutingThe session and subscription control entries aboveRouting uses envelope targets, topics, and subscription filters; it introduces no separate domain event family.
Transport controlThe session and capability entries aboveTransport bindings carry Event envelopes but do not add transport-specific registry entries.

Task, State, Context/Memory, Delegation, Recovery, and Governance types are owned by their respective dimension modules. They are not Event registry entries. In particular, Recovery owns delivery and replay control types; Event routing must not claim them as Event-owned entries.

Public Contracts

Consumers may validate envelopes, negotiate sessions, create or cancel subscriptions, route envelopes, and use declared transport bindings. Consumers must not import Event implementation internals.

Event exposes these capabilities as public contracts so dimension modules can depend on the boundary rather than a language-specific implementation.

Dependencies

Event has no dimension-module dependency.