AgencyLevel (1 | 2 | 3 | 4 | 5) and ActionTier ('read' | 'propose' | 'write') rules inside PolicyEngine (src/policy-engine.ts).
Language models never evaluate their own permission boundaries. Even if an upstream prompt attempts to persuade the model into issuing a wire or bypassing review, PolicyEngine.evaluate() denies or holds the tool call deterministically in TypeScript.
Tier-to-Level Mapping
Insrc/policy-engine.ts:
ToolPolicy specifies both a tier and a minAgencyLevel, while PolicyEngine takes Math.max(policy.minAgencyLevel, TIER_REQUIRED_AGENCY[policy.tier]).
Deterministic Parameter Validation
Beyond agency levels,PolicyEngine enforces hard code-level checks (validateDeterministicConstraints) on every candidate ToolCallRequest:
maxAmountUsd: Rejects non-positive, non-finite, or over-ceiling monetary amountsallowedCurrencies: Enforces uppercase currency allowlists (e.g.['USD', 'AED', 'EUR'])allowedIbanPrefixes: Validates structural IBAN regex and restricts permitted country prefixes (e.g.['AE', 'GB', 'DE'])allowedRecipientDomains: Restricts destination vendor/recipient email domains against approved allowlists
outcome: 'deny' tagged with ['ASI02', 'ASI05'] and appends a blocked audit record before returning.