pub struct AutoApprovePolicy;Expand description
Auto-approve all permission requests.
Use this policy in trusted environments where all tool operations should be allowed without user interaction.
§Warning
This grants full access to file system, commands, network, etc. Only use in controlled environments where you trust the LLM’s actions.
§Example
ⓘ
use agent_core_runtime::agent::interface::AutoApprovePolicy;
let policy = AutoApprovePolicy;
// All permission requests will be automatically approvedImplementations§
Source§impl AutoApprovePolicy
impl AutoApprovePolicy
Sourcepub fn new() -> AutoApprovePolicy
pub fn new() -> AutoApprovePolicy
Create a new auto-approve policy.
Trait Implementations§
Source§impl Clone for AutoApprovePolicy
impl Clone for AutoApprovePolicy
Source§fn clone(&self) -> AutoApprovePolicy
fn clone(&self) -> AutoApprovePolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutoApprovePolicy
impl Debug for AutoApprovePolicy
Source§impl Default for AutoApprovePolicy
impl Default for AutoApprovePolicy
Source§fn default() -> AutoApprovePolicy
fn default() -> AutoApprovePolicy
Returns the “default value” for a type. Read more
Source§impl PermissionPolicy for AutoApprovePolicy
impl PermissionPolicy for AutoApprovePolicy
Source§fn decide(&self, _request: &PermissionRequest) -> PolicyDecision
fn decide(&self, _request: &PermissionRequest) -> PolicyDecision
Decide how to handle a permission request. Read more
Source§fn supports_interaction(&self) -> bool
fn supports_interaction(&self) -> bool
Whether this policy supports interactive user questions. Read more
impl Copy for AutoApprovePolicy
Auto Trait Implementations§
impl Freeze for AutoApprovePolicy
impl RefUnwindSafe for AutoApprovePolicy
impl Send for AutoApprovePolicy
impl Sync for AutoApprovePolicy
impl Unpin for AutoApprovePolicy
impl UnwindSafe for AutoApprovePolicy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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