@agenticprimitives/entitlements
v0.0.0-alpha.2
Published
Durable resource/action/field/purpose/classification authorization over VC-compatible entitlement credentials (spec 277 §10). Matching engine + resolver; VC-proof/status layer is additive.
Downloads
664
Maintainers
Readme
@agenticprimitives/entitlements
Durable resource/action/field/purpose/classification authorization over VC-compatible entitlement credentials (spec 277 §10) — the check the vault / MCP runtime runs before decrypting any field.
import { InMemoryEntitlementResolver } from '@agenticprimitives/entitlements';
const resolver = new InMemoryEntitlementResolver([entitlementCredential]);
const decision = await resolver.resolve({
actor: 'eip155:8453:0xsession…',
principal: 'eip155:8453:0xowner…',
audience: 'urn:mcp:server:person',
resource: 'person-pii',
action: 'read',
fields: ['email'],
purpose: 'support-ticket',
classification: 'pii.sensitive',
at: new Date(),
});
// decision.decision === 'allow' | 'deny'; decision.allowedFields scopes the projectionFail-closed: allowed only if some credential matches on every dimension. This release is the matching engine + in-memory resolver; VC proof verification, status-list revocation, and storage caches layer on top (see spec 277 §10).
