//! Embedding lifecycle operations: normalize, serialize, insert, update, delete.
//!
//! This module sits between the entity write API (`write_item()`) and the raw
//! [`VectorIndex`] trait. It enforces the invariant that all stored vectors are
//! L2-normalized, so L2 distance on the HNSW index is equivalent to cosine
//! distance.
//!
//! The entity store (via [`StorageEngine`]) is the source of truth for
//! full-precision f32 vectors. The HNSW index is derived state that may
//! quantize to f16/int8 internally.

pub mod normalize;
pub mod ops;
pub mod serde;

pub use normalize::l2_normalize;
pub use ops::{delete_embedding, insert_embedding, update_embedding};
pub use serde::{deserialize_embedding, embedding_store_key, serialize_embedding};
