Skip to main content

macp_core/
lib.rs

1//! `macp-core` — the transport-free coordination vocabulary of MACP.
2//!
3//! This crate holds the stable types every other MACP crate (and external
4//! library consumers) build on, with no dependency on tonic, storage, or any
5//! async runtime:
6//!
7//! - [`error::MacpError`] — the canonical error enum and RFC error codes
8//! - [`session`] — the [`session::Session`] model and `SessionStart` validation
9//! - [`mode::ModeResponse`] — the result a mode hands back to the kernel
10//! - [`decision`] — the Decision mode's domain types (shared with policy)
11//! - [`policy`] — [`policy::PolicyDefinition`], [`policy::PolicyDecision`],
12//!   [`policy::PolicyError`], the shared [`policy::CommitmentRules`], and the
13//!   [`policy::PolicyEvaluator`] trait that modes call through
14//! - [`commitment_hash`] — the RFC-MACP-0013 canonical commitment hash
15
16pub mod commitment_hash;
17pub mod decision;
18pub mod error;
19pub mod mode;
20pub mod policy;
21pub mod session;
22
23// Flat re-exports for the most commonly used types.
24pub use error::MacpError;
25pub use mode::ModeResponse;
26pub use policy::{PolicyDecision, PolicyDefinition, PolicyError, PolicyEvaluator};
27pub use session::{Session, SessionState};