pub struct ToolSecurityEngine { /* private fields */ }Implementations§
Source§impl ToolSecurityEngine
impl ToolSecurityEngine
pub fn new(config: ToolSecurityConfig) -> ToolSecurityEngine
pub fn config(&self) -> &ToolSecurityConfig
pub fn policy_version(&self) -> u64
pub fn prepare_tool_arguments(&self, tool_id: &str, args: &Value) -> Value
pub fn prepare_tool_arguments_with_bindings( &self, tool_id: &str, args: &Value, bindings: &ToolPolicyBindings, ) -> Value
pub fn attach_internal_tool_policy(&self, _tool_id: &str, args: &Value) -> Value
pub fn get_tool_output_cap( &self, tool_id: &str, classification_cap: Option<usize>, ) -> Option<usize>
pub fn effective_limits( &self, tool_id: &str, safety: &ToolSafetyMetadata, classification: &ToolCallClassification, ) -> ToolExecutionLimits
pub fn policy_snapshot(&self, tool_id: &str) -> Value
Sourcepub fn classification_approval_message(
&self,
tool_id: &str,
classification: &ToolCallClassification,
) -> Option<String>
pub fn classification_approval_message( &self, tool_id: &str, classification: &ToolCallClassification, ) -> Option<String>
Returns the approval message required by call classification defaults.
pub fn custom_config(&self, tool_id: &str) -> Value
pub async fn check_tool_execution( &self, tool_id: &str, args: &Value, ) -> Result<SecurityCheckResult, AgentError>
pub async fn check_tool_execution_with_bindings( &self, tool_id: &str, args: &Value, bindings: &ToolPolicyBindings, ) -> Result<SecurityCheckResult, AgentError>
pub fn check_command_execution( &self, tool_id: &str, command: &str, args: &[String], ) -> SecurityCheckResult
pub fn get_tool_timeout(&self, tool_id: &str) -> u64
pub fn reset_session(&self)
Trait Implementations§
Source§impl Clone for ToolSecurityEngine
impl Clone for ToolSecurityEngine
Source§fn clone(&self) -> ToolSecurityEngine
fn clone(&self) -> ToolSecurityEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolSecurityEngine
impl Debug for ToolSecurityEngine
Source§impl Default for ToolSecurityEngine
impl Default for ToolSecurityEngine
Source§fn default() -> ToolSecurityEngine
fn default() -> ToolSecurityEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ToolSecurityEngine
impl !UnwindSafe for ToolSecurityEngine
impl Freeze for ToolSecurityEngine
impl Send for ToolSecurityEngine
impl Sync for ToolSecurityEngine
impl Unpin for ToolSecurityEngine
impl UnsafeUnpin for ToolSecurityEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreCreates a shared type from an unshared type.