1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! 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.
compile_error!;
pub use MemvidError;
pub use ;
pub use ;
pub use memvid_core;