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

SignalEffect
Tool knownUnknown tools are denied outright.
Risk levelHIGH and CRITICAL are denied with no policy present.
Data tierPUBLIC < INTERNAL < CONFIDENTIAL < RESTRICTED.
Matching policyConditions on agent, tool, targets and windows.
ApprovalSome tools require approval.
Rate limitsWindowed 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.