pub struct ConnectionSetupHook;Expand description
Hook that detects tools requiring user connection setup and emits
synthetic setup_connection tool calls so the client can prompt the user.
When any tool returns connection_required, this hook:
- Sets
waiting_for_tool_results = trueon ActResult - Returns a
PostActAction::EmitToolCallRequestedwith synthetic tool calls
Trait Implementations§
Source§impl PostActHook for ConnectionSetupHook
impl PostActHook for ConnectionSetupHook
Source§fn on_completed(
&self,
result: &mut ActResult,
_tool_definitions: &[ToolDefinition],
) -> Vec<PostActAction>
fn on_completed( &self, result: &mut ActResult, _tool_definitions: &[ToolDefinition], ) -> Vec<PostActAction>
Inspect completed results, optionally mutate the result and return actions.
Auto Trait Implementations§
impl Freeze for ConnectionSetupHook
impl RefUnwindSafe for ConnectionSetupHook
impl Send for ConnectionSetupHook
impl Sync for ConnectionSetupHook
impl Unpin for ConnectionSetupHook
impl UnsafeUnpin for ConnectionSetupHook
impl UnwindSafe for ConnectionSetupHook
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