Skip to main content

PolicyEngine

Trait PolicyEngine 

Source
pub trait PolicyEngine:
    Send
    + Sync
    + 'static {
    // Required method
    fn evaluate(&self, tool_name: &str, args: &Value) -> PolicyOutcome;
}
Expand description

Trait for evaluating tool call policies.

Implementations can check tool names, arguments, user permissions, rate limits, etc.

Required Methods§

Source

fn evaluate(&self, tool_name: &str, args: &Value) -> PolicyOutcome

Evaluate whether a tool call should be allowed.

Implementors§