Expand description
Message protocol — the unit of communication between nodes.
Mirrors ~/src/graphrefly-ts/src/core/messages.ts and GRAPHREFLY-SPEC.md §1
under the handle-protocol cleaving plane: payload-bearing variants
(Data, Error) carry a HandleId rather than a raw user value.
The Core never sees T; the binding-side registry resolves handles to values.
§Tier table (per canonical spec R1.3.7.b, post-13.6.A lock)
| Tier | Variants | Purpose |
|---|---|---|
| 0 | Message::Start | Subscribe handshake |
| 1 | Message::Dirty | Phase 1 control |
| 2 | Message::Pause, Message::Resume | Pause coord |
| 3 | Message::Data, Message::Resolved | Value delivery |
| 4 | Message::Invalidate | Cache clear |
| 5 | Message::Complete, Message::Error | Termination |
| 6 | Message::Teardown | Permanent destruction |
Tier ordering is enforced globally during dispatch (R1.3.1.b two-phase push, R1.3.7 batch coalescing) — DIRTY drains system-wide before tier-3, etc.
§Open type set (R1.2.2)
The canonical spec allows custom message types. M1 first-slice ships only
the 10 built-ins; custom types arrive as a follow-up via a registry shape
mirroring MessageTypeRegistration in messages.ts.
Enums§
- Message
- A protocol message.
Type Aliases§
- Messages
- A batch of messages delivered as one wire emission.