This behaviour defines caller-selected inspectors for pending agent tool actions.
Evaluators can implement mode/0 as :enforce or :shadow. An enforced block
can gate execution. A shadow block becomes a flag. mode/0 is optional.
AgentToolPolicy.ActionGuard uses :enforce by default.
Summary
Types
This type represents an action under review. The caller-defined ctx remains opaque.
A finding includes a verdict and an optional reason.
Types
@type action() :: %{ :name => String.t(), :arguments => map(), :class => AgentToolPolicy.ActionPolicy.action_class(), optional(:ctx) => map() }
This type represents an action under review. The caller-defined ctx remains opaque.
@type finding() :: %{verdict: :safe | :flag | :block, reason: String.t() | nil}
A finding includes a verdict and an optional reason.