Skip to main content

Module gated_tool

Module gated_tool 

Source
Expand description

Gated tool registry — intercepts all tool executions through AccessGate.

Instead of wrapping individual tools (which requires access to tool internals), this module provides a registry-level proxy that checks permissions before delegating to the real tool. This means:

  • No changes to individual tool code
  • New tools are automatically protected
  • oxi-sdk crate tools (ReadTool, WriteTool, etc.) are covered without modification

RFC-035: After the structural AccessGate (CSpace / RBAC / Permissions / ExecConfig) passes, GatedTool consults the ApprovalGate (Step 2.5). On ApprovalDecision::Allow the call delegates; on ApprovalDecision::RequireApproval the tool requests a user decision via the kernel event bus, blocking until resolved (or until the 120s timeout). This is the unified mechanism that supersedes the bespoke exec-only shell approval.

Structs§

GatedTool
A tool wrapper that checks permissions before execution.

Functions§

gate_tool
Wrap a tool with access control.