aonyx_memory/lib.rs
1//! # aonyx-memory
2//!
3//! The **memory palace** — Aonyx Agent's differentiator vs flat-file agent memories.
4//!
5//! ## Subsystems (V1 target)
6//! - [`kg`] — Knowledge Graph with temporal validity windows.
7//! - [`diary`] — Append-only narrative log per project.
8//! - [`hybrid`] — BM25 + vectors + RRF fusion with temporal boost.
9//! - [`splitter`] — Tree-sitter AST-aware code chunking.
10//! - [`cross_link`] — Inter-project semantic linking via centroid cosine.
11//! - [`time_machine`] — `as_of` queries over the full store.
12//!
13//! ## Storage layout
14//! - `~/.aonyx/sessions.db` — cross-project session history (FTS5).
15//! - `./.aonyx/palace.db` — per-project KG, diary, chunks, embeddings.
16//!
17//! The current crate ships scaffolded module skeletons and an in-memory
18//! [`InMemoryStore`] suitable for tests; production backends land iteratively.
19
20#![forbid(unsafe_code)]
21#![warn(missing_docs, rust_2018_idioms)]
22
23pub mod chunks;
24pub mod cross_link;
25pub mod diary;
26pub mod embed;
27pub mod hybrid;
28pub mod kg;
29pub mod palace;
30pub mod sessions;
31pub mod splitter;
32pub mod time_machine;
33
34mod inmem;
35
36pub use chunks::{Chunk, ChunkId, ChunksStore, ScoredChunk, SqliteChunksStore};
37pub use diary::{DiaryEntry, DiaryEntryId, DiaryStore, SqliteDiaryStore};
38pub use embed::Embedder;
39#[cfg(feature = "rag")]
40pub use embed::LocalEmbedder;
41pub use inmem::InMemoryStore;
42pub use kg::{Direction, Entity, EntityId, KgStore, Relation, RelationId, SqliteKgStore};
43pub use palace::Palace;
44pub use sessions::{SessionId, SessionRecord, SessionStore, SqliteSessionStore};