Raxol.AgentClientProtocol.Ext.Schema (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

Wire schema structs for the reattach extension's _raxol/* notification vocabulary.

These are the RECEIVER-side decode structs for the frames the reattach subscriber emits. The sender (Raxol.AgentClientProtocol.Ext.Reattach) builds JSON-safe string-keyed maps directly on the notify path — the stamp-location rule is: fields on _raxol/* frames are FIRST-CLASS (our vocabulary), while riders on core-protocol frames travel in _meta["raxol.io"]. An offset-aware client decodes these structs; a stock client drops the _raxol/* notifications as unknown (legal).

Every struct follows the package convention: a total from_json/1 ({:ok, t} | {:error, reason}, never raises), a to_json/1, and a Jason.Encoder impl. All fields are grow-only (add optional-with-default; never rename/retype/reorder/narrow) — a reader that meets an unknown field folds it into _meta and passes it through.