# event-emission domain contract v0.1.0 # # Async event protocol for integration mode participants. # Subject namespace is provided by the caller via cabling — NOT declared here. # This avoids cross-Mode collisions and lets the caller control its NATS namespace. # # Subjects follow the pattern: . # where subject_prefix is resolved from the cabling context at runtime. # # Subjects: # .requested — participant signals work start # .progress — intermediate progress update (optional, may repeat) # .completed — participant signals successful completion # .failed — participant signals failure let _EventEnvelope = { correlation_id | String | doc "Opaque identifier linking request and response events. Caller provides; participant echoes.", timestamp | String | doc "RFC 3339 timestamp of event emission", schema_version | String | default = "0.1.0", payload | { _ | Dyn } | doc "Event-specific payload; structure is subject-dependent", } in # Input schema: caller must supply subject_prefix via cabling context. let _EventEmissionInputs = { subject_prefix | String | doc "NATS subject prefix injected from cabling — e.g. 'ws.libre-wuji.build.lian-build'", nats_url | String | optional | doc "NATS server URL override; defaults to provisioning instance NATS", } in { EventEnvelope = _EventEnvelope, EventEmissionInputs = _EventEmissionInputs, }