vibe_graph_ops/lib.rs
1//! Vibe-Graph Operations Layer
2//!
3//! This crate provides a clean, typed API for all vibe-graph operations.
4//! It can be consumed by both the CLI and REST API, ensuring consistent
5//! behavior and type-safe interactions.
6//!
7//! ## Architecture
8//!
9//! The ops layer follows hexagonal architecture principles:
10//! - **Requests**: Typed input DTOs for each operation
11//! - **Responses**: Typed output DTOs with all relevant data
12//! - **OpsContext**: The main service that executes operations
13//!
14//! ## Usage
15//!
16//! ```rust,no_run
17//! use vibe_graph_ops::{OpsContext, SyncRequest, Config};
18//!
19//! #[tokio::main]
20//! async fn main() -> anyhow::Result<()> {
21//! let config = Config::load()?;
22//! let ctx = OpsContext::new(config);
23//!
24//! let request = SyncRequest::local(".");
25//! let response = ctx.sync(request).await?;
26//!
27//! println!("Synced {} repositories", response.project.repositories.len());
28//! Ok(())
29//! }
30//! ```
31
32mod architect;
33mod config;
34mod context;
35mod error;
36mod project;
37mod requests;
38mod responses;
39mod scan;
40mod store;
41mod workspace;
42
43// Re-export public API
44pub use architect::{ArchitectFactory, FlatArchitect, GraphArchitect, LatticeArchitect};
45pub use config::Config;
46pub use context::OpsContext;
47pub use error::{OpsError, OpsResult};
48pub use project::{Project, ProjectSource, Repository, Source};
49pub use requests::*;
50pub use responses::*;
51pub use store::{has_store, Manifest, Store, StoreStats};
52pub use workspace::{SyncSource, WorkspaceInfo, WorkspaceKind};