Skip to main content

PolicyEngine

Trait PolicyEngine 

Source
pub trait PolicyEngine: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn evaluate(&self, tool: &str, arguments: &Value) -> PolicyDecision;
}
Expand description

A policy engine evaluates (tool, arguments) → decision. Engines must be total: any internal failure is a Deny (fail-closed), never a panic.

Required Methods§

Source

fn name(&self) -> &str

Engine name (for events/metrics).

Source

fn evaluate(&self, tool: &str, arguments: &Value) -> PolicyDecision

Evaluate a tool call.

Implementors§