From 2c06c0d66358cc5f877840a4bb5ea415373a4695 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 3 Sep 2026 23:44:30 +0200 Subject: [PATCH] =?UTF-8?q?manifest:=20emits=20and=20consumes=20=E2=80=94?= =?UTF-8?q?=20the=20event=20relationship?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A module declares the event types it emits and the patterns it consumes, parallel to provides/requires (novox/hq ADR 0046). Events span module.*, mesh.* and node.* sources; a consumes for an event nothing emits is a dangling edge. Fields only here; the dangling-edge check and the runtime wiring follow. Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF --- internal/catalogue/manifest.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/catalogue/manifest.go b/internal/catalogue/manifest.go index aab61d2..94abd4e 100644 --- a/internal/catalogue/manifest.go +++ b/internal/catalogue/manifest.go @@ -126,6 +126,17 @@ type Manifest struct { // Requires are names that must be provided by something assigned to the same node. Requires []string `json:"requires,omitempty"` + // Emits are the event types this module publishes onto the broker — dotted topic keys, e.g. + // "module.umami.site.created". Declared so the mesh knows the event graph; events are + // provisioning's lighter sibling — 1:many and broadcast, no credential (novox/hq ADR 0046). + Emits []string `json:"emits,omitempty"` + + // Consumes are the event patterns this module subscribes to — topic patterns over module, + // mesh and node events alike, e.g. "node.*.joined" or "#" (the audit logger). The runtime + // wires the subscription; the module ships the handler. A Consumes for an event nothing on + // the mesh Emits is a dangling edge. + Consumes []string `json:"consumes,omitempty"` + // Claims are singular resources. Two modules claiming one thing within a scope cannot both // be assigned there — which is how exclusivity is expressed, rather than as a list of rivals // that every new module would force its predecessors to update.