1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! vipune - A minimal memory layer for AI agents.
//!
//! This crate provides a local, semantic memory store with conflict detection.
//! All operations are synchronous (no async/await required).
//!
//! # Example
//!
//! ```no_run
//! use vipune::{Config, MemoryStore, detect_project};
//!
//! // Initialize memory store
//! let config = Config::default();
//! let mut store = MemoryStore::new(
//! config.database_path.as_path(),
//! &config.embedding_model,
//! config.clone()
//! ).expect("Failed to initialize store");
//!
//! // Detect project ID
//! let project_id = detect_project(None);
//!
//! // Add a memory with conflict detection
//! let result = store.add_with_conflict(&project_id, "Alice works at Microsoft", None, false);
//! match result {
//! Ok(vipune::AddResult::Added { id }) => println!("Added memory: {}", id),
//! Ok(vipune::AddResult::Conflicts { .. }) => println!("Conflict detected"),
//! Err(e) => eprintln!("Error: {}", e),
//! }
//!
//! // Search memories
//! let results = store.search(&project_id, "where does alice work", 10, 0.0);
//! for memory in results.unwrap() {
//! println!("{:.2}: {}", memory.similarity.unwrap_or(0.0), memory.content);
//! }
//! ```
//!
//! # Mutability Requirements
//!
//! Methods that generate embeddings (`add`, `search`, `update`) require `&mut self`
//! because the embedding engine internally mutates state for ONNX tensor allocations.
// Library-only: batch ingest API (not used in CLI)
// Re-export public API
pub use Config;
pub use ;
pub use Error;
pub use MemoryStore;
pub use ;
pub use ; // Library-only: conflict detection and batch ingest types
pub use detect_project;
pub use Memory;