Skip to main content

PreExecutionVerifier

Trait PreExecutionVerifier 

Source
pub trait PreExecutionVerifier:
    Send
    + Sync
    + Debug {
    // Required methods
    fn verify(&self, tool_name: &str, args: &Value) -> VerificationResult;
    fn name(&self) -> &'static str;
}
Expand description

Pre-execution verification trait. Implementations intercept tool calls before the executor runs them. Based on TrustBench pattern (arXiv:2603.09157).

Sync by design: verifiers inspect arguments only — no I/O needed. Object-safe: uses &self and returns a concrete enum.

Required Methods§

Source

fn verify(&self, tool_name: &str, args: &Value) -> VerificationResult

Verify whether a tool call should proceed.

Source

fn name(&self) -> &'static str

Human-readable name for logging and TUI display.

Implementors§