Helpers for inspecting Codex CLI session files and replaying recorded changes.
Summary
Functions
Applies a unified diff or file_change items to the local working tree.
Lists known sessions by scanning the sessions directory.
Restores the working tree using a ghost snapshot item.
Types
Functions
@spec apply( String.t() | list(), keyword() ) :: {:ok, apply_result()} | {:error, term()}
Applies a unified diff or file_change items to the local working tree.
Accepts either a diff string or a list of %Codex.Items.FileChange{} structs
(or raw change maps with path, kind, and diff fields).
@spec list_sessions(keyword()) :: {:ok, [session_entry()]} | {:error, term()}
Lists known sessions by scanning the sessions directory.
Options
:sessions_dir- Override the default session directory.
Restores the working tree using a ghost snapshot item.
Accepts a %Codex.Items.GhostSnapshot{} struct, a raw response item map, or a
ghost commit map with id and preexisting untracked fields.