Codex.Events (Codex SDK v0.3.0)

View Source

Typed event structs emitted during Codex turn execution.

Provides helpers to parse JSON-decoded maps into strongly typed structs and to convert structs back into protocol maps for encoding.

Summary

Functions

Parses a JSON-decoded map into a typed event struct, raising on unknown event types.

Converts a typed event struct back into the JSON-serializable map representation.

Types

Functions

parse!(map)

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

Parses a JSON-decoded map into a typed event struct, raising on unknown event types.

to_map(event)

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

Converts a typed event struct back into the JSON-serializable map representation.