Class: Insika::Policy::Builtin::ApprovalRequired

Inherits:
Insika::Policy::Base show all
Defined in:
lib/insika/policy/policy.rb

Overview

Marks tools that require human approval. Does not deny/allow — attaches requires_approval to the Resolution; the gate is in the ToolEnvelope (stage 6), where the call happens. Allowlist semantics: nil = none; [names] = those require approval. Pure/synchronous.

Instance Method Summary collapse

Methods inherited from Insika::Policy::Base

#id

Instance Method Details

#decide(request) ⇒ Object



113
114
115
116
# File 'lib/insika/policy/policy.rb', line 113

def decide(request)
  names = request.profile.approvals_required
  Decision.allow(requires_approval: names.nil? ? [] : Array(names).map(&:to_s))
end