pub struct SubprocessAgentDelegate { /* private fields */ }Implementations§
Source§impl SubprocessAgentDelegate
impl SubprocessAgentDelegate
pub fn new(config: SubprocessAgentConfig) -> Self
Sourcepub fn render_prompt(task: &AgentTask) -> String
pub fn render_prompt(task: &AgentTask) -> String
The prompt we’d hand to the underlying binary. Exposed so tests (and other crates wiring custom delegates) can reuse the format.
Trait Implementations§
Source§impl AgentDelegate for SubprocessAgentDelegate
impl AgentDelegate for SubprocessAgentDelegate
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Probe by running the configured version_args with a short
timeout. Confirms the binary is installed and runnable without
consuming task quota. Returns true when no version_args are
configured (caller opted out of probing).
Source§fn capabilities(&self) -> AgentCapabilities
fn capabilities(&self) -> AgentCapabilities
Declared capabilities — used by the orchestrator to pick a delegate.
Source§fn delegate<'life0, 'async_trait>(
&'life0 self,
task: AgentTask,
) -> Pin<Box<dyn Future<Output = Result<AgentResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delegate<'life0, 'async_trait>(
&'life0 self,
task: AgentTask,
) -> Pin<Box<dyn Future<Output = Result<AgentResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Hand off a task. Blocks until the delegate finishes, fails, or
hits
task.timeout_secs.Source§fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Best-effort cancellation. Default is no-op.
Source§fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AgentTaskStatus, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
_task_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<AgentTaskStatus, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Best-effort status poll. Most implementations don’t keep per-task
state and return
Running during delegate via other channels.Auto Trait Implementations§
impl Freeze for SubprocessAgentDelegate
impl RefUnwindSafe for SubprocessAgentDelegate
impl Send for SubprocessAgentDelegate
impl Sync for SubprocessAgentDelegate
impl Unpin for SubprocessAgentDelegate
impl UnsafeUnpin for SubprocessAgentDelegate
impl UnwindSafe for SubprocessAgentDelegate
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