Structured result returned by agent hook runners.
:allow means execution may continue. :veto means the hook blocked the
tool call and the tool callback must not run.
Summary
Functions
Builds an allow result.
Builds a veto result for dispatch-level failures (no hook context available).
Returns a concise user-facing error for a veto result.
Builds a veto result.
Types
@type reason() :: {:exit, non_neg_integer()} | :timeout | {:failed_to_start, term()}
Why a hook vetoed or failed.
@type t() :: %MingaAgent.Hooks.Result{ exit_status: non_neg_integer() | nil, hook: MingaAgent.Hooks.Hook.t() | nil, reason: reason() | nil, status: :allow | :veto, stderr: String.t() }
Structured hook result.
Functions
@spec allow(MingaAgent.Hooks.Hook.t() | nil) :: t()
Builds an allow result.
Builds a veto result for dispatch-level failures (no hook context available).
Returns a concise user-facing error for a veto result.
@spec veto(MingaAgent.Hooks.Hook.t(), String.t(), reason()) :: t()
Builds a veto result.