Expand description
Vibe-Graph Operations Layer
This crate provides a clean, typed API for all vibe-graph operations. It can be consumed by both the CLI and REST API, ensuring consistent behavior and type-safe interactions.
§Architecture
The ops layer follows hexagonal architecture principles:
- Requests: Typed input DTOs for each operation
- Responses: Typed output DTOs with all relevant data
- OpsContext: The main service that executes operations
§Usage
use vibe_graph_ops::{OpsContext, SyncRequest, Config};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let config = Config::load()?;
let ctx = OpsContext::new(config);
let request = SyncRequest::local(".");
let response = ctx.sync(request).await?;
println!("Synced {} repositories", response.project.repositories.len());
Ok(())
}Structs§
- Architect
Factory - Factory for creating architects.
- Clean
Request - Request to clean the .self folder.
- Clean
Response - Response from a clean operation.
- Compose
Request - Request to compose output from a project.
- Compose
Response - Response from a compose operation.
- Config
- Configuration for vibe-graph operations.
- Flat
Architect - Puts all files in a single flat directory.
- GitChanges
Request - Request to get git changes for a workspace.
- GitChanges
Response - Response from a git changes operation.
- Graph
Request - Request to build a source code graph.
- Graph
Response - Response from a graph build operation.
- Lattice
Architect - Organizes nodes based on spatial metadata (x, y) or index.
- Load
Request - Request to load a project from .self store.
- Load
Response - Response from a load operation.
- Manifest
- Workspace manifest containing metadata about the persisted state.
- Operation
Summary - Summary of an operation for API responses.
- OpsContext
- The main operations context.
- Project
- A project represents a collection of repositories.
- Repository
- A repository within a project.
- Serve
Request - Request to start the serve command.
- Source
- A source file within a repository.
- Status
Request - Request to get workspace status.
- Status
Response - Response from a status operation.
- Store
- Store manages the
.selffolder and persistence operations. - Store
Stats - Statistics about the store.
- Sync
Request - Request to sync a codebase (local or remote).
- Sync
Response - Response from a sync operation.
- Workspace
Info - Result of workspace detection.
Enums§
- Compose
Format - Output format for compose.
- OpsError
- Errors that can occur during operations.
- Project
Source - Where the project originates from.
- Sync
Source - The source type for a sync operation.
- Workspace
Kind - Detected workspace type based on directory structure.
Traits§
- Graph
Architect - Transforms a raw logical graph into a deployable filesystem graph.
Functions§
- has_
store - Check if a
.selfdirectory exists at the given path.
Type Aliases§
- OpsResult
- Result type for operations.