class

Smith::Tools::RuleApprover

Inherits Smith::Tools::Approver < Reference < Object

Applies the configured rules, then hands anything they do not settle to an inner approver.

Wrapping rather than extending is what makes a deny rule survive --yes: the flag only replaces the inner approver, and deny is decided before the inner one is ever consulted. The same ordering keeps a session-wide [a]lways from reaching past a deny rule.

Constructors

new(rules : RuleSet, inner : Approver = AutoApprover.new)
Source

Instance methods

approve?(tool : Tool, call : CallRequest) : Bool
Source
denial_message(tool : Tool, call : CallRequest) : String

Shown to the LLM as the tool result when a call is refused, so the model can see the blockage in the transcript and choose another route.

Source
governs?(tool : Tool) : Bool

Whether this approver could refuse the tool on its own account. Read-only tools skip the gate entirely unless something here says otherwise.

Source
inner
Source
rules
Source