Skip to main content

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 hybrid;
27pub mod kg;
28pub mod palace;
29pub mod sessions;
30pub mod splitter;
31pub mod time_machine;
32
33mod inmem;
34
35pub use chunks::{Chunk, ChunkId, ChunksStore, ScoredChunk, SqliteChunksStore};
36pub use diary::{DiaryEntry, DiaryEntryId, DiaryStore, SqliteDiaryStore};
37pub use inmem::InMemoryStore;
38pub use kg::{Direction, Entity, EntityId, KgStore, Relation, RelationId, SqliteKgStore};
39pub use palace::Palace;
40pub use sessions::{SessionId, SessionRecord, SessionStore, SqliteSessionStore};