Skip to main content

AcpAdapter

Struct AcpAdapter 

Source
pub struct AcpAdapter { /* private fields */ }
Expand description

Stdio ACP transport. Protocol-specific response handling belongs here, keeping JSON-RPC framing outside the core and terminal renderer.

Implementations§

Source§

impl AcpAdapter

Source

pub fn new( slot: RosterSlot, cwd: PathBuf, program: impl Into<String>, args: Vec<String>, ) -> Self

Source

pub fn with_session_id( slot: RosterSlot, cwd: PathBuf, program: impl Into<String>, args: Vec<String>, session_id: impl Into<String>, ) -> Self

Trait Implementations§

Source§

impl AgentAdapter for AcpAdapter

Source§

fn slot(&self) -> RosterSlot

Source§

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.
Source§

fn protocol(&self) -> &'static str

Stable protocol label recorded in the runtime session snapshot. Custom adapters may override this when they expose a resumable protocol distinct from the built-in native and ACP bridges.
Source§

fn capabilities(&self) -> AgentCapabilities

Source§

fn start<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn set_model<'life0, 'async_trait>( &'life0 mut self, model: String, ) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn reload<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn stop<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = AdapterResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

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.
Source§

impl Debug for AcpAdapter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.