The node's runtime is its modules' bus: it binds each module's consumer and hands its events to the bundle (hq ADR 0198) #41

Merged
mesh-admin merged 2 commits from feat/0198-the-runtime-is-the-bus into main 2026-10-03 21:18:34 +00:00
Contributor

hq ADR 0198, design 38 WP4c, runtime side (SDK 0.1.6 = mesh-sdk #15; grants = mesh-controller #246).

The Go runtime answers a launched bundle's mesh/subscribe {pattern} by binding that module's own durable consumer (EVENTS / <node>_<module>, by name, never created — the same consumer the module's container runtime bound, so nothing is lost or replayed), delivers each event as mesh/event {envelope} to every child of the module that subscribed, and acks only when all answered; a failure or a dead child is nak'd with a 5 s delay; an unparseable message is terminated. mesh/ask {key, body} calls a tool as the module. Every launched bundle is restarted on exit with backoff (500 ms → 30 s); a child dying in its own handshake is not. package.json requires SDK ^0.1.6.

Merged with main (discovery #39, fix #40). Tests: Go -p 1 all packages pass (incl. events acked once, redelivered after failure and crash, ask, long-running restart); TS 37/37 — with SDK 0.1.6 from the registry.

hq ADR 0198, design 38 WP4c, runtime side (SDK 0.1.6 = mesh-sdk #15; grants = mesh-controller #246). The Go runtime answers a launched bundle's `mesh/subscribe {pattern}` by binding that module's own durable consumer (`EVENTS` / `<node>_<module>`, by name, never created — the same consumer the module's container runtime bound, so nothing is lost or replayed), delivers each event as `mesh/event {envelope}` to every child of the module that subscribed, and acks only when all answered; a failure or a dead child is nak'd with a 5 s delay; an unparseable message is terminated. `mesh/ask {key, body}` calls a tool as the module. Every launched bundle is restarted on exit with backoff (500 ms → 30 s); a child dying in its own handshake is not. `package.json` requires SDK ^0.1.6. Merged with main (discovery #39, fix #40). Tests: Go `-p 1` all packages pass (incl. events acked once, redelivered after failure and crash, ask, long-running restart); TS 37/37 — with SDK 0.1.6 from the registry.
mesh-admin added 2 commits 2026-10-03 21:18:30 +00:00
A launched bundle's mesh/subscribe binds the module's own durable consumer — EVENTS, <node>_<module>,
by name as the module's own runtime bound it, so nothing is lost or replayed in the move — and every
event goes to each child of the module that subscribed as mesh/event, acknowledged only when all
answered, negatively acknowledged after a short delay when one failed or died, terminated when it is
not an event. mesh/ask calls a tool as the module. Every launched bundle is started again when it
exits, with backoff, since long-running code waits for no call. Requires SDK 0.1.6.
mesh-admin merged commit 6e425a000f into main 2026-10-03 21:18:34 +00:00
mesh-admin deleted branch feat/0198-the-runtime-is-the-bus 2026-10-03 21:18:34 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#41