pub struct CodexExecutor { /* private fields */ }Expand description
Adapter that maps codex::Codex to the unified AgentExecutor interface.
§Examples
use unified_agent_sdk::{AgentExecutor, CodexExecutor, executor::SpawnConfig};
let executor = CodexExecutor::default();
let cwd = std::env::current_dir()?;
let _session = executor
.spawn(&cwd, "List the top 3 refactor opportunities.", &SpawnConfig::default())
.await?;Implementations§
Source§impl CodexExecutor
impl CodexExecutor
Sourcepub fn new(options: Option<CodexOptions>) -> Self
pub fn new(options: Option<CodexOptions>) -> Self
Creates a new executor with optional base Codex client options.
Values from SpawnConfig are merged at runtime for each session.
Trait Implementations§
Source§impl AgentExecutor for CodexExecutor
impl AgentExecutor for CodexExecutor
Source§fn executor_type(&self) -> ExecutorType
fn executor_type(&self) -> ExecutorType
Returns the provider type implemented by this executor.
Source§fn spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
config: &'life3 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn spawn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
config: &'life3 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Starts a fresh session and sends
prompt as the first turn. Read moreSource§fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
session_id: &'life3 str,
reset_to: Option<&'life4 str>,
config: &'life5 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
prompt: &'life2 str,
session_id: &'life3 str,
reset_to: Option<&'life4 str>,
config: &'life5 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Resumes a previously created session and sends a follow-up
prompt. Read moreSource§fn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Returns static capability flags for this executor implementation.
Source§fn availability(&self) -> AvailabilityStatus
fn availability(&self) -> AvailabilityStatus
Performs a lightweight availability check for required runtime dependencies.
Source§impl Clone for CodexExecutor
impl Clone for CodexExecutor
Source§fn clone(&self) -> CodexExecutor
fn clone(&self) -> CodexExecutor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodexExecutor
impl Debug for CodexExecutor
Source§impl Default for CodexExecutor
impl Default for CodexExecutor
Source§fn default() -> CodexExecutor
fn default() -> CodexExecutor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodexExecutor
impl RefUnwindSafe for CodexExecutor
impl Send for CodexExecutor
impl Sync for CodexExecutor
impl Unpin for CodexExecutor
impl UnsafeUnpin for CodexExecutor
impl UnwindSafe for CodexExecutor
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