Minga.Frontend.Adapter.GUI.AgentChatMessageCodec (Minga v0.1.0)

Copy Markdown View Source

Shared wire codec for a single agent-chat transcript message body.

The resident gui_agent_transcript (0x86) stream uses this codec, so every data-derived bounded field is validated before it is written. Invalid values raise an encoding error rather than being truncated, dropped, or downgraded.

Summary

Functions

Stable uint32 id for a message, or 0 for a bare (unwrapped) body.

Returns the 0x86 byte cost of one resident transcript entry.

Functions

encode_message_body(arg)

@spec encode_message_body(Minga.RenderModel.UI.AgentChat.message_body()) :: binary()

message_id(arg1)

Stable uint32 id for a message, or 0 for a bare (unwrapped) body.

resident_entry_size(body)

@spec resident_entry_size(Minga.RenderModel.UI.AgentChat.message()) :: pos_integer()

Returns the 0x86 byte cost of one resident transcript entry.