TrellisVcsEngine
The main entry point that orchestrates the entire Trellis platform.
Overview
TrellisVcsEngine is the composition root of the Trellis platform. It orchestrates the kernel, file watcher, version control, knowledge graphs, semantic analysis, and collaboration features.
import { TrellisVcsEngine } from "trellis";
Constructor
const engine = new TrellisVcsEngine({ rootPath: "/my/project" });
Repository Management
await engine.initRepo(); // Initialize a new repository
engine.open(); // Open an existing repository
Core Operations
engine.getOps(); // All operations
engine.status(); // Branch, op count, files
engine.log(); // Formatted history
engine.getFiles(); // Currently tracked files
Version Control
await engine.createBranch("feature/x");
await engine.createMilestone("Implement auth", { fromOpHash, toOpHash });
Semantic Analysis
engine.parseFile(content, "src/auth.ts");
engine.semanticDiff(oldContent, newContent, "src/auth.ts");
Knowledge Operations
const garden = engine.garden();
garden.listClusters();
garden.search({ keyword: "auth" });
Intelligence Features
const embeddings = engine.embeddings();
await embeddings.search("authentication flow");