pub struct ReferenceMonitor;Expand description
Central policy boundary for deciding whether a tool/action may proceed.
This initial type is a model-only facade. Later tasks route tool execution through it while preserving current behavior.
Implementations§
Source§impl ReferenceMonitor
impl ReferenceMonitor
pub fn check_tool_action( &self, context: &ToolPolicyContext, run_policy: &RunPolicy, ) -> ToolPolicyDecision
pub fn record( &self, context: &ToolPolicyContext, decision: ToolPolicyDecision, details: Value, ) -> PolicyTraceRecord
pub fn ask_user_record( &self, context: &ToolPolicyContext, message: impl Into<String>, ) -> PolicyTraceRecord
pub fn dry_run_only_record( &self, context: &ToolPolicyContext, message: impl Into<String>, ) -> PolicyTraceRecord
pub fn sandbox_only_record( &self, context: &ToolPolicyContext, message: impl Into<String>, ) -> PolicyTraceRecord
pub fn require_verification_record( &self, context: &ToolPolicyContext, message: impl Into<String>, ) -> PolicyTraceRecord
pub fn hook_blocked_record( &self, context: &ToolPolicyContext, hook: &HookResult, ) -> PolicyTraceRecord
pub fn mana_policy_record( &self, context: &ToolPolicyContext, decision: &ManaPolicyDecision, ) -> PolicyTraceRecord
pub fn bash_equivalent_record( &self, context: &ToolPolicyContext, hint: &str, ) -> PolicyTraceRecord
pub fn repeated_call_record( &self, context: &ToolPolicyContext, blocked: bool, message: &str, ) -> PolicyTraceRecord
pub fn validation_error_record( &self, context: &ToolPolicyContext, message: &str, ) -> PolicyTraceRecord
pub fn dangerous_grant_required_record( &self, context: &ToolPolicyContext, rail: DangerousRail, ) -> PolicyTraceRecord
pub fn guardrail_record( &self, context: &ToolPolicyContext, level: GuardrailLevel, failed: bool, message: &str, ) -> PolicyTraceRecord
pub fn evaluate( &self, context: &ToolPolicyContext, run_policy: &RunPolicy, ) -> PolicyTraceRecord
Trait Implementations§
Source§impl Clone for ReferenceMonitor
impl Clone for ReferenceMonitor
Source§fn clone(&self) -> ReferenceMonitor
fn clone(&self) -> ReferenceMonitor
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 ReferenceMonitor
impl Debug for ReferenceMonitor
Source§impl Default for ReferenceMonitor
impl Default for ReferenceMonitor
Source§fn default() -> ReferenceMonitor
fn default() -> ReferenceMonitor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReferenceMonitor
impl RefUnwindSafe for ReferenceMonitor
impl Send for ReferenceMonitor
impl Sync for ReferenceMonitor
impl Unpin for ReferenceMonitor
impl UnsafeUnpin for ReferenceMonitor
impl UnwindSafe for ReferenceMonitor
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