Codex.Items (Codex SDK v0.3.0)

View Source

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.

Converts a typed item struct back into its JSON-serialisable map representation.

Types

Functions

parse!(map)

@spec parse!(map()) :: t()

Parses a JSON-decoded map into a typed thread item struct.

to_map(item)

@spec to_map(t()) :: map()

Converts a typed item struct back into its JSON-serialisable map representation.