Skip to main content

openlatch_client/
lib.rs

1#[cfg(feature = "full-cli")]
2pub mod cli;
3/// OpenLatch client library crate.
4///
5/// Re-exports all modules so integration tests and external callers can access
6/// internal types without going through the binary entry point.
7///
8/// Physical layout groups code by component:
9/// - `core/` — shared leaf modules (envelope, privacy, logging, config, error, update)
10/// - `cli/` — CLI-specific code (commands, output formatting)
11/// - `daemon/` — HTTP server that composes leaf modules
12/// - `hooks/` — agent hook generators
13///
14/// Re-exports from `core/` preserve flat `crate::config`, `crate::error`, etc. paths.
15///
16/// The `full-cli` feature gates all heavy modules. Without it, only the minimal
17/// hook-compatible surface is compiled (used by the `openlatch-hook` binary).
18#[cfg(feature = "full-cli")]
19pub mod core;
20#[cfg(feature = "full-cli")]
21pub mod daemon;
22#[cfg(feature = "full-cli")]
23pub mod hooks;
24
25// Re-exports: preserve crate::config, crate::error, etc. paths
26#[cfg(feature = "full-cli")]
27pub use core::config;
28#[cfg(feature = "full-cli")]
29pub use core::envelope;
30#[cfg(feature = "full-cli")]
31pub use core::error;
32#[cfg(feature = "full-cli")]
33pub use core::logging;
34#[cfg(feature = "full-cli")]
35pub use core::privacy;
36#[cfg(feature = "full-cli")]
37pub use core::update;