cli/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2//! Heddle: An AI-native version control system
3//!
4//! Heddle provides content-addressed storage, immutable history with stable change
5//! identifiers, and explicit agent attribution for AI-augmented development.
6
7#[cfg(not(any(feature = "git-overlay", feature = "native")))]
8compile_error!(
9 "At least one of the `git-overlay` or `native` features must be enabled. \
10 The OSS CLI ships as git-overlay-only, native-only, or both."
11);
12
13pub(crate) mod attribution;
14pub mod bench;
15// The bridge module stays always-compiled so light consumers (fsck,
16// clone, fetch, remote, checkpoint, operator_loop, gc) keep working in
17// native-only builds without fanning #[cfg] through their use blocks.
18// User-visible separation is enforced at the command surface:
19// `Commands::Bridge` and `Commands::GitOverlay` are gated behind
20// `git-overlay`, so a native-only `heddle` binary exposes no
21// overlay-specific subcommands. Deeper code-elimination can come later.
22pub mod bridge;
23pub mod cli;
24pub mod client;
25pub mod exit;
26pub mod extensions;
27pub mod harness;
28pub mod logging;
29pub mod operation_id;
30pub mod perf;
31#[cfg(feature = "semantic")]
32pub mod semantic;
33pub mod ts_codegen;
34pub mod util;
35
36// Shared types now live in cli-shared (so heddle-client can depend on
37// them without a cli ↔ heddle-client cycle). Re-export under the
38// historical paths so internal code keeps working.
39pub use cli_shared::{config, remote};
40pub use objects::{
41 error::{HeddleError, HeddleError as StoreError},
42 store::ObjectStore,
43};
44pub use repo::Repository;
45pub type StoreResult<T> = objects::error::Result<T>;
46
47#[cfg(test)]
48mod object_graph_tests;