khive_vcs/lib.rs
1// Copyright 2026 khive contributors. Licensed under Apache-2.0.
2//
3//! KG versioning — snapshots, branches, and remote sync.
4//!
5//! Implements the versioning model from ADR-015 and the implementation details
6//! from ADR-042: content-addressed snapshots, named branch pointers, and the
7//! remote push/pull protocol.
8//!
9//! # Crate layout
10//!
11//! - [`types`] — `KgSnapshot`, `KgBranch`, `SnapshotId`, `RemoteConfig`
12//! - [`hash`] — canonical JSON serialization + SHA-256 snapshot hashing
13//! - [`snapshot`] — `commit()` operation
14//! - [`branch`] — `branch()`, `checkout()`, `list_branches()`
15//! - [`log`] — `log()` operation (snapshot history)
16//! - [`merge_engine`] — `MergeEngine` trait + `NoOpMergeEngine`
17//! - [`error`] — `VcsError` type
18
19pub mod branch;
20pub mod error;
21pub mod hash;
22pub mod log;
23pub mod merge_engine;
24pub mod migrations;
25pub mod snapshot;
26pub mod types;
27
28pub use error::VcsError;
29pub use merge_engine::{MergeEngine, MergeResult, MergeStrategy, NoOpMergeEngine};
30pub use types::{KgBranch, KgSnapshot, RemoteAuth, RemoteConfig, SnapshotId};