Skip to main content

evaluate_pre

Function evaluate_pre 

Source
pub async fn evaluate_pre(
    route: &CompiledRoute,
    bag: &mut AttributeBag,
    payload: &mut RoutePayload,
    pdp: &Arc<dyn PdpResolver>,
    plugins: &Arc<dyn PluginInvoker>,
    delegations: &Arc<dyn DelegationInvoker>,
    elicitations: &Arc<dyn ElicitationInvoker>,
) -> RouteDecision
Expand description

Run the pre-invocation phases: args then policy. Used by orchestrators bound to a tool_pre_invoke-style hook — by the time post-invoke fires, the tool has produced a response, so result/ post_policy belong to evaluate_post.

On a phase Deny, halts and returns immediately. args_modified is set if any args field was rewritten or omitted; result_modified is always false (post hasn’t run). Taints emitted during args/policy land in the returned taints vec — survive even on a Deny so audit sees what fired before the halt.