pub struct CodexProvider;Expand description
Codex CLI provider.
State detection uses PTY idle heuristic (no useful hooks for per-turn detection). Context tracking reads Codex’s JSONL session files.
Trait Implementations§
Source§impl Provider for CodexProvider
impl Provider for CodexProvider
Source§fn build_command(
&self,
dir: &Path,
args: &[String],
resume_session: Option<&str>,
prompt: Option<&str>,
) -> Command
fn build_command( &self, dir: &Path, args: &[String], resume_session: Option<&str>, prompt: Option<&str>, ) -> Command
Build the command to launch the agent in a directory.
Source§fn detect_state_from_output(
&self,
_recent_output: &[u8],
idle_duration: Duration,
) -> Option<AgentState>
fn detect_state_from_output( &self, _recent_output: &[u8], idle_duration: Duration, ) -> Option<AgentState>
Analyze agent state from recent PTY output and time since last output.
Returns
None if this provider doesn’t do output-based detection (e.g. uses hooks).Source§fn map_hook_event(&self, _event: &str) -> Option<AgentState>
fn map_hook_event(&self, _event: &str) -> Option<AgentState>
Map a hook event name to an agent state.
Returns
None if this provider doesn’t handle hooks or doesn’t recognize the event.Source§fn context_usage(&self, _pid: u32, dir: &Path) -> Option<ContextUsage>
fn context_usage(&self, _pid: u32, dir: &Path) -> Option<ContextUsage>
Read context window usage for an agent. Returns
None if not supported
or if the data isn’t available.Auto Trait Implementations§
impl Freeze for CodexProvider
impl RefUnwindSafe for CodexProvider
impl Send for CodexProvider
impl Sync for CodexProvider
impl Unpin for CodexProvider
impl UnsafeUnpin for CodexProvider
impl UnwindSafe for CodexProvider
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