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 config_keys;
18mod context;
19mod extract;
20mod git;
21#[cfg(feature = "inference")]
22mod infer;
23mod links;
24mod markers;
25mod migrations;
26mod model;
27#[cfg(feature = "models")]
28mod models;
29mod provenance;
30mod query;
31mod store;
32mod sync;
33mod workspace;
34
35pub use artifact::{ARTIFACT_SCHEMA, GraphArtifact};
36pub use cache::{CacheError, ObjectCache};
37pub use codegraph::{ORACLE_SCHEMA, OracleError, OracleReport, compare as compare_codegraph};
38pub use config_keys::{
39    ConfigKey, flatten as flatten_config, is_config_path, is_secret_key,
40    normalize as normalize_config_key,
41};
42pub use context::{
43    ContextRefresh, NodeContext, build_context, context, dependents, refresh_contexts,
44};
45pub use extract::{Extractor, FileNodeExtractor, IngestConfig, Registry, RustExtractor};
46pub use git::{BlobRef, ChangeStatus, ChangedFile, GitError, Repo, Submodule};
47#[cfg(feature = "inference")]
48pub use infer::{
49    DuplicateConfig, DuplicatePair, DuplicateReport, EMBED_REF, Embedder, HashEmbedder,
50    InferenceConfig, duplicates, duplicates_with, embed, infer_edges, infer_edges_with, similarity,
51};
52pub use links::{
53    EXTERNAL_REF_KIND, LINKS_REF, external_ref_key, external_ref_node, external_ref_target,
54};
55pub use model::{Direction, Edge, EdgeKind, FactSet, Node, NodeKind, Span};
56#[cfg(feature = "models")]
57pub use models::{
58    DownloadError, ModelFile, ModelKind, ModelRole, ModelSpec, ModelVariant, Platform, REGISTRY,
59    ResourceTier, download_verified, ensure_model_dir, find as find_model, is_installed, model_dir,
60    set_model_store, sha256_hex, store_root, verify_sha256,
61};
62pub use provenance::Provenance;
63pub use query::{
64    DebtItem, DebtReport, EdgeRef, Explanation, Listing, NodeSummary, Path, PathHop, SCHEMA,
65    SearchHit, debt, explain, list_kind, path, search,
66};
67pub use store::{ImportApplied, Store, StoreError};
68pub use sync::{SyncError, SyncReport, sync, sync_index, sync_tree, sync_worktree};
69pub use workspace::{
70    Follow, ResolvedWorkspace, Workspace, WorkspaceError, WorkspaceSet, discover_repos_under,
71    parse_qualified,
72};