module OpenUI::Rails::Message

Ruby implementation of the upstream OpenUI message protocol (‘buildMessage` / `parseMessage` from `@openuidev/react-lang` and `@openuidev/lang-core`).

A stored message is the response text wrapped in marker lines that start with ‘]]>openui:`. The browser `Renderer` reads the whole stored message and ignores the context; the host app is responsible for restoring form state from the context as `initialState`. Markers must never reach the model: strip them with {.strip} (i.e. `parseMessage(content)`).

This is *message framing*, not an OpenUI Lang parser.

Constants

CONTENT_MARKER
CONTEXT_MARKER
END_MARKER
MARKERS
MARKER_PREFIX
Parsed

Result of {.parse}. ‘finished` maps to the upstream `end` field.