Skip to main content

causa/
lib.rs

1//! `causa` — facade over the `causa-*` family.
2//!
3//! The kernel is always present; every other layer is a Cargo feature so
4//! hosts pay only for what they use:
5//!
6//! | feature | re-export | pulls |
7//! |---|---|---|
8//! | _(always on)_ | [`kernel`] | facts + ports, no I/O |
9//! | `runtime` | [`runtime`] | optional components (turn loop, dispatch) |
10//! | `protocol` | [`protocol`] | wire-protocol translation (no transport) |
11//! | `providers` | [`providers`] | reqwest gateways (implies `protocol`) |
12//! | `extension-mcp` | `extension` | MCP client (implies `mcp` adapter) |
13//!
14//! The default is the runnable stack (`runtime` + `providers`); `full`
15//! adds the extensions. `--no-default-features` is the bare kernel for
16//! offline audit or minimal embedding. Choose one dependency declaration:
17//!
18//! ```toml
19//! causa = "0.0.6" # default: runtime + providers
20//! ```
21//!
22//! ```toml
23//! causa = { version = "0.0.6", features = ["full"] } # + MCP extensions
24//! ```
25//!
26//! ```toml
27//! causa = { version = "0.0.6", default-features = false } # kernel only
28//! ```
29//!
30//! ```toml
31//! causa = { version = "0.0.6", default-features = false, features = ["runtime"] }
32//! ```
33//!
34//! The fine-grained crates (`causa-kernel`, `causa-runtime`, …) remain
35//! published and usable directly; this facade is a convenience alias, not
36//! a replacement.
37
38#![deny(unsafe_code)]
39#![deny(missing_docs)]
40
41/// Facts + contracts. Always available, with no I/O.
42pub use causa_kernel as kernel;
43
44#[cfg(feature = "runtime")]
45/// Reference driver over the kernel ports.
46pub use causa_runtime as runtime;
47
48#[cfg(feature = "protocol")]
49/// Kernel-native wire-protocol translation (transport-free).
50pub use causa_protocol as protocol;
51
52#[cfg(feature = "providers")]
53/// Reqwest adapters for the kernel `ModelGateway` seam.
54pub use causa_provider as providers;
55
56#[cfg(feature = "extension-mcp")]
57/// Extension adapters (`DynamicToolSource` implementors).
58pub use causa_extension as extension;