fez/lib.rs
1//! fez: an agent-friendly front end for systemd operations over local and SSH
2//! transports.
3//!
4//! The crate is structured as a library plus thin binaries so the fake bridge
5//! and integration tests can reuse the protocol modules.
6
7#![deny(missing_docs)]
8
9/// JSON-lines audit logging of attempted and completed mutations.
10pub mod audit;
11/// Concrete capability implementations (the commands fez runs).
12pub mod capabilities;
13/// Machine-readable descriptors of the capability surface.
14pub mod capability;
15/// Command-line argument definitions.
16pub mod cli;
17mod dispatch;
18/// The `fez/v1` JSON response envelope.
19pub mod envelope;
20/// Crate-wide error type and exit-code mapping.
21pub mod error;
22/// The agent bootstrap contract printed by `fez guide`.
23pub mod guide;
24/// Model Context Protocol server support.
25pub mod mcp;
26/// Wire protocol between fez and the bridge.
27pub mod protocol;
28/// Guardrails around destructive operations (protected units, confirmations).
29pub mod safety;
30/// Local and SSH transports for reaching the bridge.
31pub mod transport;
32
33/// Entry point: parse-to-exit. Returns the process exit code.
34pub fn run(cli: cli::Cli) -> i32 {
35 dispatch::run(cli)
36}