pub struct ClaudeCodeExecutor { /* private fields */ }Expand description
Executor adapter backed by claude_code::ClaudeSdkClient.
§Examples
use unified_agent_sdk::{AgentExecutor, ClaudeCodeExecutor, executor::SpawnConfig};
let executor = ClaudeCodeExecutor::new();
let cwd = std::env::current_dir()?;
let _session = executor
.spawn(&cwd, "Review this project architecture.", &SpawnConfig::default())
.await?;Implementations§
Source§impl ClaudeCodeExecutor
impl ClaudeCodeExecutor
Sourcepub fn with_options(options: ClaudeAgentOptions) -> Self
pub fn with_options(options: ClaudeAgentOptions) -> Self
Creates an executor with pre-configured Claude SDK options.
Per-session settings from SpawnConfig still take precedence at runtime.
Trait Implementations§
Source§impl AgentExecutor for ClaudeCodeExecutor
impl AgentExecutor for ClaudeCodeExecutor
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 ClaudeCodeExecutor
impl Clone for ClaudeCodeExecutor
Source§fn clone(&self) -> ClaudeCodeExecutor
fn clone(&self) -> ClaudeCodeExecutor
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 moreAuto Trait Implementations§
impl Freeze for ClaudeCodeExecutor
impl !RefUnwindSafe for ClaudeCodeExecutor
impl Send for ClaudeCodeExecutor
impl Sync for ClaudeCodeExecutor
impl Unpin for ClaudeCodeExecutor
impl UnsafeUnpin for ClaudeCodeExecutor
impl !UnwindSafe for ClaudeCodeExecutor
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