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
15pub mod decision;
16pub mod error;
17pub mod mode;
18pub mod policy;
19pub mod session;
20
21// Flat re-exports for the most commonly used types.
22pub use error::MacpError;
23pub use mode::ModeResponse;
24pub use policy::{PolicyDecision, PolicyDefinition, PolicyError, PolicyEvaluator};
25pub use session::{Session, SessionState};