CodexEx.AppServer.ThreadItem (codex_ex v0.1.0)

Copy Markdown View Source

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

result()

@type result() :: {:ok, t()} | {:error, {:invalid_thread_item, term()}}

t()

@type t() ::
  CodexEx.AppServer.ThreadItem.AgentMessage.t()
  | CodexEx.AppServer.ThreadItem.Generic.t()

Functions

from_protocol(item)

@spec from_protocol(term()) ::
  {:ok,
   CodexEx.AppServer.ThreadItem.AgentMessage.t()
   | CodexEx.AppServer.ThreadItem.Generic.t()}
  | {:error, {:invalid_thread_item, term()}}

id(arg1)

@spec id(term()) :: binary() | nil

text(arg1)

@spec text(term()) :: binary() | nil

type(arg1)

@spec type(term()) :: binary() | nil