//! Core memory engine — storage, search, relations, and maintenance.
//!
//! This module contains the write path ([`store`]), read path ([`search`]),
//! entity graph ([`relations`]), deletion ([`forget`]), statistics ([`stats`]),
//! and lifecycle management ([`maintenance`]). Type definitions live in [`types`].
/// Convert an f32 embedding slice to raw bytes for sqlite-vec.
/// Convert a cosine similarity threshold to L2 distance threshold.
///
/// sqlite-vec defaults to L2 distance. For L2-normalized vectors:
/// L2_dist = sqrt(2 * (1 - cosine_similarity))