pub struct AutoApproveConfirmation;Expand description
A confirmation provider that never requires confirmation.
Used for child runs where the agent’s permission policy already provides
the access control boundary. When permissions return Ask for a tool not
explicitly covered, this provider auto-approves instead of blocking.
Trait Implementations§
Source§impl ConfirmationProvider for AutoApproveConfirmation
impl ConfirmationProvider for AutoApproveConfirmation
Source§fn requires_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn requires_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_tool_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a tool requires confirmation
Source§fn request_confirmation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_tool_id: &'life1 str,
_tool_name: &'life2 str,
_args: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Receiver<ConfirmationResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn request_confirmation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_tool_id: &'life1 str,
_tool_name: &'life2 str,
_args: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Receiver<ConfirmationResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Request confirmation for a tool execution Read more
Source§fn confirm<'life0, 'life1, 'async_trait>(
&'life0 self,
_tool_id: &'life1 str,
_approved: bool,
_reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn confirm<'life0, 'life1, 'async_trait>(
&'life0 self,
_tool_id: &'life1 str,
_approved: bool,
_reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle a confirmation response from the user Read more
Source§fn policy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConfirmationPolicy> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn policy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ConfirmationPolicy> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current policy
Source§fn set_policy<'life0, 'async_trait>(
&'life0 self,
_policy: ConfirmationPolicy,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_policy<'life0, 'async_trait>(
&'life0 self,
_policy: ConfirmationPolicy,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update the confirmation policy
Source§fn check_timeouts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check_timeouts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check for and handle timed out confirmations
Source§fn cancel_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel all pending confirmations
Source§fn pending_confirmations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<PendingConfirmationInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_confirmations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<PendingConfirmationInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Snapshot pending confirmations for status inspection.
Auto Trait Implementations§
impl Freeze for AutoApproveConfirmation
impl RefUnwindSafe for AutoApproveConfirmation
impl Send for AutoApproveConfirmation
impl Sync for AutoApproveConfirmation
impl Unpin for AutoApproveConfirmation
impl UnsafeUnpin for AutoApproveConfirmation
impl UnwindSafe for AutoApproveConfirmation
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more