weavatrix_rust/engine/
mod.rs1mod repository_state;
4mod session;
5
6use crate::analyzer::Analyzer;
7use crate::model::Snapshot;
8use blazingly_json::Value;
9use std::collections::BTreeMap;
10use std::path::PathBuf;
11use std::sync::{Arc, OnceLock};
12use std::time::Duration;
13use weavatrix_graph::{Graph, NodeIndex};
14use weavatrix_scan::ScanReport;
15
16#[derive(Debug, Clone)]
17pub struct RepositoryState {
18 root: PathBuf,
19 snapshot: Snapshot,
20 graph: Arc<Graph>,
21 scan: ScanReport,
22 build_time: Duration,
23 weak_components: Arc<OnceLock<Vec<Vec<NodeIndex>>>>,
24}
25
26pub struct Weavatrix {
27 analyzer: Analyzer,
28 state: RepositoryState,
29 known_states: BTreeMap<PathBuf, RepositoryState>,
30 tool_cache: BTreeMap<String, Value>,
31}