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 config;
33mod context;
34mod error;
35mod project;
36mod requests;
37mod responses;
38mod scan;
39mod store;
40mod workspace;
41
42// Re-export public API
43pub use config::Config;
44pub use context::OpsContext;
45pub use error::{OpsError, OpsResult};
46pub use project::{Project, ProjectSource, Repository, Source};
47pub use requests::*;
48pub use responses::*;
49pub use store::{has_store, Manifest, Store, StoreStats};
50pub use workspace::{SyncSource, WorkspaceInfo, WorkspaceKind};