pub trait AgentAdapter: Send {
Show 13 methods
// Required methods
fn slot(&self) -> RosterSlot;
fn capabilities(&self) -> AgentCapabilities;
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_prompt<'life0, 'async_trait>(
&'life0 mut self,
prompt: String,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn answer_permission<'life0, 'async_trait>(
&'life0 mut self,
request_id: String,
answer: PermissionAnswer,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_mode<'life0, 'async_trait>(
&'life0 mut self,
mode: String,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<AdapterResult<AgentEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn display_name(&self) -> String { ... }
fn session_id(&self) -> Option<String> { ... }
fn protocol(&self) -> &'static str { ... }
}Expand description
Uniform control plane for ACP and custom command-line adapters.
Required Methods§
fn slot(&self) -> RosterSlot
fn capabilities(&self) -> AgentCapabilities
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_prompt<'life0, 'async_trait>(
&'life0 mut self,
prompt: String,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn answer_permission<'life0, 'async_trait>(
&'life0 mut self,
request_id: String,
answer: PermissionAnswer,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_mode<'life0, 'async_trait>(
&'life0 mut self,
mode: String,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<AdapterResult<AgentEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn display_name(&self) -> String
fn display_name(&self) -> String
Human-readable adapter identity used in the first-turn roster context. Catalog-backed launchers can override this with their display name; direct command adapters still get a deterministic fallback.
Sourcefn session_id(&self) -> Option<String>
fn session_id(&self) -> Option<String>
Return the protocol session handle when this adapter has one. Custom adapters may omit it; runtime metadata then still preserves roster identity without claiming the session is resumable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".