macp_runtime/lib.rs
1pub mod pb {
2 // Message types come from the transport-free `macp-pb` crate; the tonic
3 // service stubs (generated here via `.extern_path`) are merged in so the
4 // historical `macp_runtime::pb::*` surface is preserved exactly.
5 pub use macp_pb::pb::*;
6 tonic::include_proto!("macp.v1");
7}
8
9pub use macp_pb::{decision_pb, handoff_pb, multi_round_pb, proposal_pb, quorum_pb, task_pb};
10
11/// The compiled `macp.v1` protobuf FileDescriptorSet, written by `build.rs`.
12/// Feeds gRPC server reflection (dev/debug tooling only, e.g. grpcurl/grpcui)
13/// when the `reflection` feature is enabled -- see docs/deployment.md's
14/// "gRPC reflection" note under Monitoring. Public so both `src/main.rs` and
15/// a downstream consumer embedding this server can register it with
16/// `tonic_reflection::server::Builder`.
17#[cfg(feature = "reflection")]
18pub const FILE_DESCRIPTOR_SET: &[u8] =
19 include_bytes!(concat!(env!("OUT_DIR"), "/macp_descriptor.bin"));
20
21// The base vocabulary crate, re-exported whole. `macp-runtime`'s public
22// signatures already traffic in macp-core types, but four of the five lower
23// crates were reachable through this root and macp-core was not — so items
24// with no historical `macp_runtime::*` path (`commitment_hash`,
25// `mode::MessageContext`) could only be named by taking a second dependency.
26// Not aliased to `core`: that shadows the `core` extern prelude crate-wide.
27// The `error`/`session` shims below stay as the historical short paths.
28pub use macp_core;
29
30pub mod error;
31pub mod metrics;
32pub mod replay;
33pub mod runtime;
34pub mod session;
35pub mod stream_bus;
36
37// The mode layer and registry now live in `macp-modes`; the default governance
38// policy engine in `macp-policy`. Re-exported so existing `crate::mode`,
39// `crate::mode_registry`, and `crate::policy::*` paths (and the equivalent
40// downstream `macp_runtime::*` paths) resolve unchanged.
41pub use macp_modes::{mode, mode_registry};
42pub use macp_policy as policy;
43
44// The persistence layer (append-only log, session registry, storage backends)
45// now lives in `macp-storage`. Re-exported so `macp_runtime::{log_store,
46// registry, storage}` paths resolve unchanged.
47pub use macp_storage::{log_store, registry, storage};
48
49pub mod extensions;
50// Crate-private: the ListSessions page-token codec is a transport detail of
51// `server.rs`, deliberately not part of the published API surface.
52mod pagination;
53pub mod policy_engine;
54pub mod server;
55// Crate-private: the bounded WatchSessions initial-sync traversal and its
56// lifecycle-event buffer are internals of `server.rs`, factored out only so
57// their bounds are testable.
58mod watch_sync;
59
60// Authentication and the request security layer now live in `macp-auth`.
61// Re-exported so `crate::{auth, security}` and downstream
62// `macp_runtime::{auth, security}` paths resolve unchanged.
63pub use macp_auth::{auth, security};