Typed representations of thread items emitted by the Codex runtime.
This module provides helpers to convert JSON-style maps (with string keys) into structs and back, keeping status fields normalised as atoms.
Summary
Functions
Parses a JSON-decoded map into a typed thread item struct.
Parses a raw response item (snake_case response output) into a typed struct.
Converts a typed item struct back into its JSON-serialisable map representation.
Types
@type t() :: Codex.Items.AgentMessage.t() | Codex.Items.Reasoning.t() | Codex.Items.CommandExecution.t() | Codex.Items.FileChange.t() | Codex.Items.UserMessage.t() | Codex.Items.ImageView.t() | Codex.Items.ReviewMode.t() | Codex.Items.McpToolCall.t() | Codex.Items.WebSearch.t() | Codex.Items.TodoList.t() | Codex.Items.Error.t() | Codex.Items.GhostSnapshot.t() | Codex.Items.Compaction.t() | Codex.Items.RawResponseItem.t()
Functions
Parses a JSON-decoded map into a typed thread item struct.
Parses a raw response item (snake_case response output) into a typed struct.
Converts a typed item struct back into its JSON-serialisable map representation.