Skip to main content

rto_graph/
lib.rs

1//! Provenance-tagged knowledge graph store.
2//!
3//! Every edge in a Roteiro graph carries a [`Provenance`] tag recording how it
4//! was produced: deterministically derived from source ASTs, authored by a
5//! human or agent in an ADR/blueprint, or inferred heuristically from docs and
6//! other artifacts. See ADR-0001.
7//!
8//! The graph is a set of [`Node`]s addressed by a deterministic natural
9//! [`Node::key`], connected by [`Edge`]s. Facts extracted from one source blob
10//! are grouped into a [`FactSet`] and applied atomically to a [`Store`].
11//!
12//! @rto:0001
13
14mod artifact;
15mod cache;
16mod codegraph;
17mod context;
18mod extract;
19mod git;
20#[cfg(feature = "inference")]
21mod infer;
22#[cfg(feature = "inference-local-models")]
23mod localmodel;
24mod markers;
25mod migrations;
26mod model;
27#[cfg(feature = "models")]
28mod models;
29mod provenance;
30mod query;
31mod store;
32mod sync;
33
34pub use artifact::{ARTIFACT_SCHEMA, GraphArtifact};
35pub use cache::{CacheError, ObjectCache};
36pub use codegraph::{ORACLE_SCHEMA, OracleError, OracleReport, compare as compare_codegraph};
37pub use context::{
38    ContextRefresh, NodeContext, build_context, context, dependents, refresh_contexts,
39};
40pub use extract::{Extractor, FileNodeExtractor, IngestConfig, Registry, RustExtractor};
41pub use git::{BlobRef, GitError, Repo};
42#[cfg(feature = "inference")]
43pub use infer::{
44    DuplicateConfig, DuplicatePair, DuplicateReport, EMBED_REF, Embedder, HashEmbedder,
45    InferenceConfig, duplicates, duplicates_with, embed, infer_edges, infer_edges_with, similarity,
46};
47#[cfg(feature = "image-vision")]
48pub use localmodel::LocalVlm;
49#[cfg(feature = "inference-local-models")]
50pub use localmodel::{GenConfig, LocalEmbedder, LocalGenerator, LocalModelError};
51pub use model::{Direction, Edge, EdgeKind, FactSet, Node, NodeKind, Span};
52#[cfg(feature = "models")]
53pub use models::{
54    DownloadError, ModelFile, ModelKind, ModelSpec, ModelVariant, Platform, REGISTRY, ResourceTier,
55    download_verified, ensure_model_dir, find as find_model, is_installed, model_dir, sha256_hex,
56    store_root, verify_sha256,
57};
58pub use provenance::Provenance;
59pub use query::{
60    DebtItem, DebtReport, EdgeRef, Explanation, Listing, NodeSummary, Path, PathHop, SCHEMA,
61    SearchHit, debt, explain, list_kind, path, search,
62};
63pub use store::{ImportApplied, Store, StoreError};
64pub use sync::{SyncError, SyncReport, sync, sync_worktree};