pub struct OpencodeExecutor { /* private fields */ }Expand description
OpenCode executor — connects to OpenCode HTTP server.
Implementations§
Source§impl OpencodeExecutor
impl OpencodeExecutor
pub fn new() -> OpencodeExecutor
pub fn with_base_url(base_url: impl Into<String>) -> OpencodeExecutor
pub fn with_api_key(self, api_key: impl Into<String>) -> OpencodeExecutor
Trait Implementations§
Source§impl AgentExecutor for OpencodeExecutor
impl AgentExecutor for OpencodeExecutor
Source§fn executor_type(&self) -> ExecutorType
fn executor_type(&self) -> ExecutorType
Which provider this executor implements.
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, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
OpencodeExecutor: '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, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
OpencodeExecutor: 'async_trait,
Create a new session and send the first prompt.
Source§fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
session_id: &'life2 str,
prompt: &'life3 str,
config: &'life4 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
OpencodeExecutor: 'async_trait,
fn resume<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
working_dir: &'life1 Path,
session_id: &'life2 str,
prompt: &'life3 str,
config: &'life4 SpawnConfig,
) -> Pin<Box<dyn Future<Output = Result<AgentSession, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
OpencodeExecutor: 'async_trait,
Resume an existing session with a follow-up prompt.
Source§fn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Static capability flags.
Source§fn availability(&self) -> AvailabilityStatus
fn availability(&self) -> AvailabilityStatus
Check if the runtime dependency (CLI, server) is available.
Source§impl Default for OpencodeExecutor
impl Default for OpencodeExecutor
Source§fn default() -> OpencodeExecutor
fn default() -> OpencodeExecutor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpencodeExecutor
impl RefUnwindSafe for OpencodeExecutor
impl Send for OpencodeExecutor
impl Sync for OpencodeExecutor
impl Unpin for OpencodeExecutor
impl UnsafeUnpin for OpencodeExecutor
impl UnwindSafe for OpencodeExecutor
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