Class: Parse::Agent::ApprovalGate
- Inherits:
-
Object
- Object
- Parse::Agent::ApprovalGate
- Defined in:
- lib/parse/agent/approval_gate.rb
Overview
Abstract approval-gate contract. A gate vetoes (or permits) a destructive tool call before it runs. #execute consults the installed gate for any tool whose effective tier is in require_approval_for.
The MCP transport installs an MCPElicitationGate; an embedder on the non-MCP path can install any object responding to #review. The default (NullGate) approves everything, so the gate is a no-op until both an opt-in tier is configured AND a real gate is installed.
Direct Known Subclasses
Constant Summary collapse
- ABORT =
Sentinel pushed onto a pending queue to wake a blocked review when the request is aborted (session terminated, stream closed).
Object.new.freeze
Instance Method Summary collapse
Instance Method Details
#review(tool_name:, effective_permission:, preview:, agent:) ⇒ ApprovalDecision
70 71 72 |
# File 'lib/parse/agent/approval_gate.rb', line 70 def review(tool_name:, effective_permission:, preview:, agent:) raise NotImplementedError end |