Typed app-level representation of thread items.
The protocol currently surfaces several item unions as plain maps in generated Elixir modules. This module normalizes the known public shapes into stable structs and keeps a typed generic fallback for unsupported item variants.
Summary
Types
@type t() :: CodexEx.AppServer.ThreadItem.AgentMessage.t() | CodexEx.AppServer.ThreadItem.Generic.t()
Functions
@spec from_protocol(term()) :: {:ok, CodexEx.AppServer.ThreadItem.AgentMessage.t() | CodexEx.AppServer.ThreadItem.Generic.t()} | {:error, {:invalid_thread_item, term()}}