Take a policy into another harness
Map the harness’s proposed call to an operation and resource, evaluate the rule, then check whether the underlying tool ran. Reuse your expected-decision cases across adapters that describe equivalent actions.
Keep an APF file in your repository. Test what it allows and enforce its decisions in Claude Code or a harness you maintain. The Apache-2.0 engine runs locally without an account.
npm i -g @nodrail/policy-engine
nodrail-policy validate rules.yaml
nodrail-policy eval rules.yaml --command "git status"
nodrail-policy eval rules.yaml --command "git clean -fd"| Component | What it does | Cloud required? |
|---|---|---|
| Policy engine | Validates and evaluates APF policies locally; provides CLI and library interfaces | No |
| TypeScript client | Adds Cloud permission checks to supported tool calls | Yes, for the Cloud flow |
| Agent plugins | Connect Claude Code and Codex hooks to Cloud | Yes, for the Cloud flow |
The policy engine, client and agent plugins are Apache-2.0 licensed. Nodrail Cloud is the hosted service. The packages' licenses do not make the entire Cloud application open source.
Map the harness’s proposed call to an operation and resource, evaluate the rule, then check whether the underlying tool ran. Reuse your expected-decision cases across adapters that describe equivalent actions.
Use the local engine when you want to evaluate policies in your own environment. Use Cloud when you want connected agent identities, shared policies, approvals by a person and a decision trail in one workspace. You keep execution and provider credentials in either approach.
There is no Nodrail Cloud usage meter for local-only evaluations. Engine limits still apply, and you operate the local environment. A local YAML file does not create a shared approval workflow or sandbox on its own.
Follow each repository's contribution and security instructions. Package interfaces may change before 1.0; pin the release you use and test upgrades.