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;
35pub mod storage;
36
37pub use types::{
39 Artifact, Citation, CompilerConfig, Error, Result, ScoredSpan, Span, WorkingSet,
40 Session, Message, MessageRole, SessionWorkingSet,
41 Manifest, ChunkingParams, IndexParams,
43 ExplainPlan, ExplainCandidate, ExplainTiming, ExplainThresholds,
44 IngestAction,
45 GoldenQuery, EvalResult, EvalSummary,
46 WorkingSetDiff, DiffEntry, RerankEntry,
47 Agent, Stance, AgentRelation, AgentMessageMeta, AgentRelationSummary, AgentRelationEntry,
49};
50
51pub use session::{SessionManager, SessionManagerGeneric, SessionReplay, SessionTurn};
52
53pub use compiler::{compile, compile_with_backend, compile_with_backend_options};
55
56pub use storage::{
58 StorageBackend, StorageConfig, SqliteBackend,
59 VectorSearchProvider, VectorSearchResult,
60 create_backend, create_backend_from_env,
61};
62
63pub const VERSION: &str = env!("CARGO_PKG_VERSION");
65
66#[cfg(test)]
67mod tests {
68 use super::*;
69
70 #[test]
71 fn test_version() {
72 assert!(!VERSION.is_empty());
73 }
74
75 #[test]
76 fn test_working_set_hash_determinism() {
77 let ws1 = WorkingSet {
78 text: "Hello, world!".to_string(),
79 spans: vec![],
80 citations: vec![],
81 tokens_used: 3,
82 query: "test".to_string(),
83 compilation_time_ms: 100,
84 manifest: None,
85 explain: None,
86 };
87
88 let ws2 = WorkingSet {
89 text: "Hello, world!".to_string(),
90 spans: vec![],
91 citations: vec![],
92 tokens_used: 3,
93 query: "test".to_string(),
94 compilation_time_ms: 200, manifest: None,
96 explain: None,
97 };
98
99 assert_eq!(ws1.deterministic_hash(), ws2.deterministic_hash());
101 }
102}