Skip to main content

Module route

Module route 

Source

Structs§

RouteDecision
Full outcome of running all four phases for a route.
RoutePayload
Mutable payload for a route invocation. args is the request arguments object; result is the response object (None on the inbound path, Some once the tool/resource has produced a value).

Functions§

evaluate_post
Run the post-invocation phases: result (if a response payload is present) then post_policy. Used by orchestrators bound to a tool_post_invoke-style hook.
evaluate_pre
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.
evaluate_route
Run all four phases against payload, mutating it in place. Convenience wrapper for callers that don’t need the pre/post split (tests, single-hook hosts). Calls evaluate_pre then evaluate_post, skipping post entirely on a pre-side Deny. Taints from both halves concatenate; args_modified and result_modified carry their respective flags independently.