Skip to main content

BridgedAcpClient

Struct BridgedAcpClient 

Source
pub struct BridgedAcpClient {
    pub evt_tx: UnboundedSender<BridgeEvent>,
}
Expand description

ACP Client implementation that bridges agent protocol events into the internal BridgeEvent channel.

Handles permission requests by forwarding them through a oneshot channel to the main event loop, and converts session notifications (text chunks, tool calls) into corresponding BridgeEvent variants.

Fields§

§evt_tx: UnboundedSender<BridgeEvent>

Trait Implementations§

Source§

impl Client for BridgedAcpClient

Source§

fn request_permission<'life0, 'async_trait>( &'life0 self, args: RequestPermissionRequest, ) -> Pin<Box<dyn Future<Output = Result<RequestPermissionResponse>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Requests permission from the user for a tool call operation. Read more
Source§

fn session_notification<'life0, 'async_trait>( &'life0 self, args: SessionNotification, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handles session update notifications from the agent. Read more
Source§

fn write_text_file<'life0, 'async_trait>( &'life0 self, _args: WriteTextFileRequest, ) -> Pin<Box<dyn Future<Output = Result<WriteTextFileResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Writes content to a text file in the client’s file system. Read more
Source§

fn read_text_file<'life0, 'async_trait>( &'life0 self, _args: ReadTextFileRequest, ) -> Pin<Box<dyn Future<Output = Result<ReadTextFileResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Reads content from a text file in the client’s file system. Read more
Source§

fn create_terminal<'life0, 'async_trait>( &'life0 self, _args: CreateTerminalRequest, ) -> Pin<Box<dyn Future<Output = Result<CreateTerminalResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Executes a command in a new terminal Read more
Source§

fn terminal_output<'life0, 'async_trait>( &'life0 self, _args: TerminalOutputRequest, ) -> Pin<Box<dyn Future<Output = Result<TerminalOutputResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Gets the terminal output and exit status Read more
Source§

fn release_terminal<'life0, 'async_trait>( &'life0 self, _args: ReleaseTerminalRequest, ) -> Pin<Box<dyn Future<Output = Result<ReleaseTerminalResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Releases a terminal Read more
Source§

fn wait_for_terminal_exit<'life0, 'async_trait>( &'life0 self, _args: WaitForTerminalExitRequest, ) -> Pin<Box<dyn Future<Output = Result<WaitForTerminalExitResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Waits for the terminal command to exit and return its exit status Read more
Source§

fn kill_terminal<'life0, 'async_trait>( &'life0 self, _args: KillTerminalRequest, ) -> Pin<Box<dyn Future<Output = Result<KillTerminalResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Kills the terminal command without releasing the terminal Read more
Source§

fn ext_method<'life0, 'async_trait>( &'life0 self, _args: ExtRequest, ) -> Pin<Box<dyn Future<Output = Result<ExtResponse, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Handles extension method requests from the agent. Read more
Source§

fn ext_notification<'life0, 'async_trait>( &'life0 self, _args: ExtNotification, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Handles extension notifications from the agent. 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> IntoMaybeUndefined<T> for T

Source§

impl<T> IntoOption<T> for T

Source§

impl<T> MessageHandler<ClientSide> for T
where T: Client,

Source§

async fn handle_request( &self, request: AgentRequest, ) -> Result<ClientResponse, Error>

Source§

async fn handle_notification( &self, notification: AgentNotification, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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.