Expand description
Policy vocabulary and the pluggable evaluation trait.
Core holds the types modes and the kernel must name: the policy
definition/decision/error, the per-mode rules schemas (read by modes to
drive policy-parameterized behavior and by evaluators to decide commitments),
and the PolicyEvaluator trait that modes call through. The concrete
default evaluator lives in the macp-policy crate; a third party can supply
its own PolicyEvaluator and inject it without forking the kernel.
Modules§
Structs§
- Commitment
Context - Everything a policy evaluator may consult when gating a commitment.
- Commitment
Rules - Commitment rules shared across all mode policy schemas (RFC-MACP-0012).
- Policy
Definition
Enums§
- Commitment
Mode - Per-mode accumulated state relevant to commitment evaluation.
- Policy
Decision #[non_exhaustive]: consumers MUST treat any non-Allowdecision as a denial (fail closed). Neverif let Deny— that fails open on new variants.- Policy
Error
Traits§
- Policy
Evaluator - Governance policy evaluation at commitment time.
Functions§
- extract_
commitment_ rules - Extract the
commitmentsection from any mode’s policy rules JSON. All RFC mode schemas include acommitmentsub-object withauthorityanddesignated_roles.