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

Copy Markdown View Source

Pure GUI adapter encoder for the agent chat surface (gui_agent_chat, 0x78).

Encodes the gui_agent_chat (0x78) chrome fields of a Minga.RenderModel.UI.AgentChat semantic model into the sectioned wire format and gates on a :erlang.phash2/1 chrome fingerprint stored in Minga.Frontend.Adapter.GUI.Caches. Depends only on the model, the protocol opcodes, and the caches struct; it touches no processes and references no product module.

This encoder owns only the small chrome transport for the agent chat surface. Resident transcript entries ride the dedicated gui_agent_transcript (0x86) stream via Minga.Frontend.Adapter.GUI.AgentTranscriptEncoder, which uses Minga.Frontend.Adapter.GUI.AgentChatMessageCodec for the per-message bodies containing AgentChat.ToolCallView, AgentChat.ApprovalView, and AgentChat.Usage.

Summary

Functions

encode(model, caches)

@spec encode(
  Minga.RenderModel.UI.AgentChat.t(),
  Minga.Frontend.Adapter.GUI.Caches.t()
) ::
  {binary() | nil, Minga.Frontend.Adapter.GUI.Caches.t()}