Skip to main content
[AVAILABLE]. packages/policy, 72 tests. CLAIMS.md 2.2/2.3.

Purpose

Evaluates a PolicySignals object against a Policy’s ordered rules and returns exactly one Decision. See Policies and the decision for the concept, this page is the export reference.
PolicyEngine.evaluate() alone does not check Policy.boundSignals — that binding is enforced one layer up, by SignalIntentBinder, which RuntimeEngine (@parmana/runtime) invokes immediately before calling PolicyEngine.evaluate(). Calling PolicyEngine.evaluate() directly, as the minimal example below does, bypasses signal/intent binding entirely — verified by actually running it. See Policies and the decision for why this split exists.

Install

Key exports

Engine, [AVAILABLE]

Routing and loading, [AVAILABLE]

Validation, [AVAILABLE]

Types

Policy (including its optional boundSignals: Record<string, string> field, a signal-key → intent-dot-path map), PolicyRule, PolicyCondition, PolicyRuleOutcome, PolicyInput, PolicySignals, PolicyDecision, PolicyAction (enum: APPROVE, REJECT, REQUIRE_OVERRIDE), PolicyOutcome (enum: APPROVE, REJECT, REQUIRE_OVERRIDE), SignalIntentBindingViolation ({ signalKey, intentPath, signalValue, intentValue }).

Minimal example

Full runnable version: Write your first policy.

Next

Write your first policy

Write a policy and confirm both the approve and reject paths.

@parmana/runtime

Where PolicyEngine is actually invoked as part of executing a transaction.