Tool Call Firewall
Build a deny-by-default policy evaluator with bounded arguments, role permissions, single-use approvals and a structured audit log. The artifact is a library gate; applications must place it before every real tool execution.
An approval receipt proving exactly which operation was authorized and executed.
- An approval receipt proving exactly which operation was authorized and executed.
- The native CLI requires a trusted role from the invoking application.
Tool Call Firewall in 4 stages
Authorize structured tool requests before they cross a side-effect boundary.
Validate an unambiguous call envelope
Parse a bounded four-field envelope using a pipe delimiter for this local exercise.
starter · ~2 hours · Rust
Byte budgetEnvelope fieldsControl gateCall identityEvaluate role and path policy
Only reader and editor roles exist.
core · ~2 hours · Rust
Known rolePath componentsTool permissionDecisionConsume a request-bound approval once
An approval is bound to the complete call identity supplied by a trusted application and is consumed only for an approval-required decision.
core · ~2 hours · Rust
Decision gateMatch identityCheck unusedConsume onceRecord bounded audit evidence
Format a stable tab-separated audit row after the policy decision.
core · ~2 hours · Rust
Unique callCapacity checkOmit argumentsRecord decision