01How to use it
Attach policies to the runtime/tool path; use hazel gatekeeper validate|simulate|explain for offline checks. Full guide: Agent Gatekeeper.
02Policy sketch
typescript
import { AgentGatekeeper, fromFunction } from '@hazeljs/agent-gatekeeper';
const gatekeeper = new AgentGatekeeper({
policies: [
fromFunction('refunds.create', async (ctx) =>
ctx.amount > 50 ? 'require-approval' : 'allow',
),
],
});