pub struct LocalConnection { /* private fields */ }Expand description
Connection strategy implementation communicating with a local subprocess harness.
LocalConnection handles launching and lifecycle tracking of the localharness binary,
reading standard error output, upgrading communication to standard WebSockets, and managing
subagent and tool invocation state.
Trait Implementations§
Source§impl Connection for LocalConnection
impl Connection for LocalConnection
Source§fn conversation_id(&self) -> &str
fn conversation_id(&self) -> &str
Returns the conversation ID for the connection.
Source§fn receive_steps(&self) -> BoxStream<'static, Result<Step, Error>>
fn receive_steps(&self) -> BoxStream<'static, Result<Step, Error>>
Subscribes to the stream of step updates from the connection.
Source§async fn send(&self, content: &str) -> Result<(), Error>
async fn send(&self, content: &str) -> Result<(), Error>
Sends a standard user text prompt to the connection.
Source§async fn send_trigger_notification(&self, content: &str) -> Result<(), Error>
async fn send_trigger_notification(&self, content: &str) -> Result<(), Error>
Sends a trigger notification message to the connection.
Source§async fn send_halt_request(&self) -> Result<(), Error>
async fn send_halt_request(&self) -> Result<(), Error>
Sends a halt/cancellation request to the connection.
Source§async fn send_tool_confirmation(
&self,
trajectory_id: &str,
step_index: u32,
accepted: bool,
) -> Result<(), Error>
async fn send_tool_confirmation( &self, trajectory_id: &str, step_index: u32, accepted: bool, ) -> Result<(), Error>
Sends approval/rejection for a tool execution confirmation request.
Source§async fn send_tool_response(
&self,
id: &str,
result: ToolResult,
) -> Result<(), Error>
async fn send_tool_response( &self, id: &str, result: ToolResult, ) -> Result<(), Error>
Sends the result of a tool execution back to the connection.
Source§async fn send_question_response(
&self,
trajectory_id: &str,
step_index: u32,
answers: QuestionHookResult,
) -> Result<(), Error>
async fn send_question_response( &self, trajectory_id: &str, step_index: u32, answers: QuestionHookResult, ) -> Result<(), Error>
Sends the answers to user questions back to the connection.
Auto Trait Implementations§
impl Freeze for LocalConnection
impl !RefUnwindSafe for LocalConnection
impl Send for LocalConnection
impl Sync for LocalConnection
impl Unpin for LocalConnection
impl UnsafeUnpin for LocalConnection
impl !UnwindSafe for LocalConnection
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