Metakit / API
@doeixd/metakit/policy
Declarative authorization policies (@doeixd/metakit/policy, browser & server safe).
Keeps authority ({ row, principal }) strictly scoped apart from data
validity (row invariants): Policy rules can read both row and
principal, while Schema invariants can never reference principal.
Supports runtime allow, partial-evaluation can (for UI/agent hints),
and synchronous Tier 3 Zone checks (checkImplication, checkConsistent).
For Tier 4 Z3 escalation and counterexample witnesses, pass a Policy to
Prove.policyImplies or Prove.policyConsistent in @doeixd/metakit/prove.
Functions
checkConsistent | Tier 3 synchronous check: is rule, one of policy.rules, provably dead (unsatisfiable under the row and principal schema invariants)? |
checkImplication | Tier 3 synchronous check: does rule from of policy (together with row and principal schema invariants) entail its rule to? |
make | Construct a typed authorization Policy over { row, principal }. |
Interfaces
Definition | The facts a checker consumes. Only the policy evaluator needs concrete principal decisions. |
Policy | |
PolicyEnv |