Reference
Socket Event Protocol
Look up syntax, contracts, layouts, algorithms, and exact behavior.
The callback bridge can be reconstructed as a small message protocol. The client sends renderer identity, active page identity, callback identity, event name, and a serialized event payload. The server validates the renderer/page pair, looks up the callback, invokes it, and decides whether to rerender.
{
"type": "callback",
"rendererId": "renderer-7",
"pageId": "inbox",
"callbackId": "cb-42",
"eventName": "click",
"payload": {
"value": "Send",
"clientX": 144,
"clientY": 220
}
}receive message | v validate rendererId -> user/session | v validate pageId == active page | v lookup callbackId in page callback table | v invoke callback with payload | +-- state changed -> rerender and emit shell patch/full shell +-- no change -> acknowledge