symbi-policy
v1.11.0
Published
Policy management and validation for Symbiont SDK
Readme
symbi-policy
Policy builder for the Symbiont JavaScript/TypeScript SDK. Constructs Policy objects that the Symbiont runtime evaluates via its built-in DSL and Cedar authorization.
Most users install symbi-core, which exposes a policyBuilder namespace on SymbiontClient. Pull this package directly when you want a narrow dependency for agents/services that only need to construct policies.
Install
npm install symbi-policyUsage
import { PolicyBuilder, createPolicyBuilder } from 'symbi-policy';
const policy = createPolicyBuilder()
.allow({ action: 'read', resource: 'documents' })
.deny({ action: 'write', resource: '*' })
.audit({ action: '*', resource: '*' })
.build();
// Attach to an agent definition or register with the runtime:
// await client.agents.createAgent({ name, description, policies: [policy], ... });Fluent API supports allow / deny / audit effects, conditions (when, unless, timeboxed rules), priorities, and action/resource globbing.
See also
symbi-core— exposesclient.policyBuilder- SDK README
- docs.symbiont.dev/security-model — how Cedar policies flow through the runtime
License
Apache 2.0. See LICENSE.
