The application's message union; must have a
kind discriminator string.
The graph subtype.
Record of handlers keyed by Msg['kind'],
each receiving the narrowed message variant for its tag.
Map from message tag to a handler that issues
graph.commit(...).
An Update runner that dispatches to the matching handler.
Each handler is responsible for issuing graph.commit(...) itself.
Handlers return void — the engine's commit is a side-effecting
method on the graph handle, so the runner is imperative by design.
The exhaustiveness of the Handlers type is enforced by the
mapped-type constraint on Msg['kind'] — adding a new tag to Msg
without a handler is a compile error at the call site.
Construct a typed Update from a discriminator key plus a record of per-tag handlers.