1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/// Model-boundary listener — the reliable forwarder (Model Boundary Enforcement
/// Layer, plan 01). Gated behind `boundary`, which rides on `full-cli` (for
/// axum + the rustls TLS backend it needs) and is absent from the lean
/// `openlatch-hook` build. Not built on the `--no-default-features` path.
/// OpenLatch client library crate.
///
/// Re-exports all modules so integration tests and external callers can access
/// internal types without going through the binary entry point.
///
/// Physical layout groups code by component:
/// - `core/` — shared leaf modules (auth, cloud, config, crash_report, envelope,
/// error, hook_state, logging, net, privacy, supervision, telemetry, update)
/// - `cli/` — CLI-specific code (commands, output formatting)
/// - `daemon/` — HTTP server that composes leaf modules
/// - `hook_output/` — agent-specific stdout translators (ungated leaf)
/// - `hooks/` — agent hook config generators
///
/// Re-exports from `core/` preserve flat `crate::config`, `crate::error`, etc. paths.
///
/// The `full-cli` feature gates all heavy modules. Without it, only the minimal
/// hook-compatible surface is compiled (used by the `openlatch-hook` binary).
/// The minimum `core` the evaluator-only build needs.
///
/// `build.rs` registers two typify `with_replacement`s, so `src/generated/types.rs`
/// names `crate::core::envelope::known_types::{AgentType, HookEventType}` — the
/// hand-written CloudEvents lens enums. Widening `generated`'s gate to `policy`
/// therefore drags that one path along with it, and the rest of `core` (the
/// keychain, the outbox, the poller) is exactly what the evaluator must not link.
///
/// So `--no-default-features --features policy` re-declares that leaf and nothing
/// else. This is **not** a copy: an inline module adds a directory component, so
/// `known_types` here resolves to the same `src/core/envelope/known_types.rs` the
/// `full-cli` build compiles. Delete it the day the replacement targets move.
/// Typify output from `schemas/*.schema.json` — the wire types, generated and
/// committed. Gated on `policy` rather than `full-cli` because `zone_eval` needs
/// it and `policy` is the weaker gate: `full-cli` turns `policy` on, so both
/// builds still get it, and `--no-default-features --features policy` compiles
/// the evaluator without a byte of CLI machinery. The lean `openlatch-hook`
/// build enables neither.
/// Agent-specific hook-output translation. Ungated so `openlatch-hook`
/// (which builds without `full-cli`) can translate daemon verdicts into
/// the stdout JSON each agent expects.
/// The Autonomy Zone evaluator (D8: a MODULE of this crate, never a crate of its
/// own). Pure, deterministic, and held to `schemas/conformance/`. Gated on
/// `policy` so `openlatch-hook` cannot link it, and re-exported by `core::policy`,
/// which stays the leaf it already is.
// Re-exports: preserve crate::config, crate::error, etc. paths
pub use auth;
pub use cloud;
pub use config;
pub use crash_report;
pub use egress;
pub use envelope;
pub use error;
pub use fs_secure;
pub use hook_state;
pub use install_state;
pub use logging;
pub use net;
pub use path_compat;
pub use privacy;
pub use supervision;
pub use telemetry;
pub use update;