Policy engine
Decisions
evaluate(request) returns one of four decisions.
ALLOW
A matching policy permits it.
DENY
Refused. The default for risky unmatched tools.
AUDIT
Permitted, recorded for review.
NO_POLICY
Nothing governs this tool at this tier.
Inputs
| Signal | Effect |
|---|---|
| Tool known | Unknown tools are denied outright. |
| Risk level | HIGH and CRITICAL are denied with no policy present. |
| Data tier | PUBLIC < INTERNAL < CONFIDENTIAL < RESTRICTED. |
| Matching policy | Conditions on agent, tool, targets and windows. |
| Approval | Some tools require approval. |
| Rate limits | Windowed call frequency and volume limits. |
Hot reload
Policies reload without a restart via /api/policies/hot. The routes live in src/api/routes/hot-reload-policies.js.
The extension contract
The extension point is an observer, not a participant. An extension receives a deep copy of the request and the decision. It cannot rewrite the verdict in place, and a throwing extension is recorded rather than propagated. A contract test asserts that an extension cannot change the decision — if it could, it would be a policy bypass.