pub struct GuardrailChecker { /* private fields */ }Implementations§
Source§impl GuardrailChecker
impl GuardrailChecker
pub fn new(workspace: PathBuf, config: GuardrailsConfig) -> Self
Sourcepub fn check_tool_call(&self, tool_name: &str, args: &Value) -> Result<()>
pub fn check_tool_call(&self, tool_name: &str, args: &Value) -> Result<()>
Check a tool call before execution.
Sourcepub fn check_path(&self, path: &str) -> Result<()>
pub fn check_path(&self, path: &str) -> Result<()>
Check that a path does not escape the workspace.
Sourcepub fn check_command(&self, cmd: &str) -> Result<()>
pub fn check_command(&self, cmd: &str) -> Result<()>
Check a shell command against the blocklist.
Sourcepub fn check_content_for_secrets(&self, content: &str) -> Result<()>
pub fn check_content_for_secrets(&self, content: &str) -> Result<()>
Scan content for secrets before writing.
Auto Trait Implementations§
impl Freeze for GuardrailChecker
impl RefUnwindSafe for GuardrailChecker
impl Send for GuardrailChecker
impl Sync for GuardrailChecker
impl Unpin for GuardrailChecker
impl UnsafeUnpin for GuardrailChecker
impl UnwindSafe for GuardrailChecker
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