pub struct Codex { /* private fields */ }Expand description
Codex CLI stores one JSONL rollout per session under
~/.codex/sessions/YYYY/MM/DD/rollout-<ts>-<uuid>.jsonl.
Lines carry a type plus a payload; the schema has shifted across
versions, so both response_item and event_msg shapes are handled.
Codex::default() reads the stock ~/.codex install. An embedder that
runs several Codex installs in different homes builds one adapter per
install with Codex::in_home.
Implementations§
Trait Implementations§
Source§impl Adapter for Codex
impl Adapter for Codex
Source§fn reconcile_scope(&self) -> Option<String>
fn reconcile_scope(&self) -> Option<String>
An explicit install speaks only for the rows under its own root; the stock adapter speaks for every Codex row, as before.
fn name(&self) -> &'static str
Source§fn root(&self) -> Option<PathBuf>
fn root(&self) -> Option<PathBuf>
Store root, e.g. ~/.claude/projects. May not exist on this machine.
Source§fn discover(&self) -> Discovered
fn discover(&self) -> Discovered
All session files under the root, with a partial-walk flag the indexer
uses to protect deletion reconciliation (see
Discovered).Source§fn parse(&self, path: &Path) -> Result<Session>
fn parse(&self, path: &Path) -> Result<Session>
Parse one session file. Must never panic on malformed input;
skip bad lines and return what could be read.
Auto Trait Implementations§
impl Freeze for Codex
impl RefUnwindSafe for Codex
impl Send for Codex
impl Sync for Codex
impl Unpin for Codex
impl UnsafeUnpin for Codex
impl UnwindSafe for Codex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more