rig-memvid 0.1.4

Memvid-backed persistent memory and lexical store for Rig agents.
Documentation
//! Memvid-backed persistent memory for [Rig](https://crates.io/crates/rig-core).
//!
//! See the crate-level [README](../README.md) for a quick-start. The two
//! main types are:
//!
//! - [`MemvidStore`] — implements [`rig::vector_store::VectorStoreIndex`].
//!   Wire it into an agent with `agent.dynamic_context(n, store.clone())`.
//! - [`MemvidPersistHook`] — implements
//!   [`rig::agent::PromptHook`]. Attach with
//!   `prompt.with_hook(hook)` to record every turn into the same store.
//!
//! Sharing a single [`MemvidStore`] between recall and persistence is the
//! intended pattern: writes through the hook are visible to subsequent
//! searches in the same process.
//!
//! # Re-exports
//!
//! [`memvid_core`] is re-exported so callers do not need to add it as a
//! direct dependency to construct [`memvid_core::PutOptions`],
//! [`memvid_core::AclContext`], or [`memvid_core::SearchRequest`] when
//! reaching for [`MemvidStore::search`] / [`MemvidStore::put_text`].
//!
//! # Platform support
//!
//! The crate is `cfg`-gated off on `wasm`: memvid relies on synchronous
//! file I/O and a process-level file lock that have no analogue under
//! `wasm32-unknown-unknown`. On wasm targets the crate is intentionally
//! empty so that downstream crates can still depend on it transitively
//! without a build break.

#![cfg_attr(not(target_family = "wasm"), deny(missing_docs))]

#[cfg(target_family = "wasm")]
compile_error!(
    "rig-memvid does not currently support `wasm` targets: memvid-core requires \
     synchronous file I/O and OS-level file locks. Disable rig-memvid for wasm \
     builds via Cargo target-specific dependencies."
);

#[cfg(not(target_family = "wasm"))]
mod error;
#[cfg(not(target_family = "wasm"))]
mod hook;
#[cfg(not(target_family = "wasm"))]
pub mod inmem;
#[cfg(not(target_family = "wasm"))]
mod store;

#[cfg(not(target_family = "wasm"))]
pub use error::MemvidError;
#[cfg(not(target_family = "wasm"))]
pub use hook::{MemoryConfig, MemvidPersistHook, WritePolicy, WriteTransform};
#[cfg(not(target_family = "wasm"))]
pub use inmem::{Episode, InMemoryError, InMemoryHit, InMemoryStore};
#[cfg(not(target_family = "wasm"))]
pub use store::{MemvidFilter, MemvidStore, MemvidStoreBuilder};

#[cfg(not(target_family = "wasm"))]
pub use memvid_core;