1#![warn(missing_docs)]
24
25pub mod types;
26pub mod span;
27pub mod embedding;
28pub mod compiler;
29pub mod db;
30pub mod index;
31pub mod session;
32pub mod approx;
33pub mod eval;
34pub mod diff;
35
36pub use types::{
38 Artifact, Citation, CompilerConfig, Error, Result, ScoredSpan, Span, WorkingSet,
39 Session, Message, MessageRole, SessionWorkingSet,
40 Manifest, ChunkingParams, IndexParams,
42 ExplainPlan, ExplainCandidate, ExplainTiming, ExplainThresholds,
43 IngestAction,
44 GoldenQuery, EvalResult, EvalSummary,
45 WorkingSetDiff, DiffEntry, RerankEntry,
46};
47
48pub use session::{SessionManager, SessionReplay, SessionTurn};
49
50pub const VERSION: &str = env!("CARGO_PKG_VERSION");
52
53#[cfg(test)]
54mod tests {
55 use super::*;
56
57 #[test]
58 fn test_version() {
59 assert!(!VERSION.is_empty());
60 }
61
62 #[test]
63 fn test_working_set_hash_determinism() {
64 let ws1 = WorkingSet {
65 text: "Hello, world!".to_string(),
66 spans: vec![],
67 citations: vec![],
68 tokens_used: 3,
69 query: "test".to_string(),
70 compilation_time_ms: 100,
71 manifest: None,
72 explain: None,
73 };
74
75 let ws2 = WorkingSet {
76 text: "Hello, world!".to_string(),
77 spans: vec![],
78 citations: vec![],
79 tokens_used: 3,
80 query: "test".to_string(),
81 compilation_time_ms: 200, manifest: None,
83 explain: None,
84 };
85
86 assert_eq!(ws1.deterministic_hash(), ws2.deterministic_hash());
88 }
89}