Module contract for dynamic operation approval predicates.
Approval predicates receive a Jidoka.Context and return whether an approval
policy should apply to the current operation call. They are intentionally
module-based rather than anonymous functions so agent specs and snapshots stay
durable.
Summary
Functions
Defines a reusable approval predicate module.
Evaluates a predicate module against a runtime context.
Validates that a module implements the approval predicate contract.
Types
Callbacks
@callback call(Jidoka.Context.t()) :: result()
Returns whether approval is required for the operation context.
Functions
Defines a reusable approval predicate module.
@spec evaluate(module() | nil, Jidoka.Context.t()) :: {:ok, boolean()} | {:error, term()}
Evaluates a predicate module against a runtime context.
Validates that a module implements the approval predicate contract.