juncture_store/lib.rs
1//! Cross-thread persistent key-value storage for Juncture.
2//!
3//! This crate re-exports the Store types from `juncture-core::store` so that
4//! consumers can depend on `juncture-store` directly without pulling in the
5//! full `juncture-core` facade.
6//!
7//! All types originate from the authoritative implementation in
8//! `juncture-core::store`. There are no duplicate definitions.
9//!
10//! # Re-exported items
11//!
12//! | Type | Description |
13//! |------|-------------|
14//! | [`Store`] | Async key-value store trait |
15//! | [`StoreError`] | Error type for store operations |
16//! | [`Item`] | Stored item with metadata |
17//! | [`FilterExpr`] | Filter expression for search queries |
18//! | [`SearchQuery`] | Search query builder |
19//! | [`SearchResult`] | Search result set |
20//! | [`SearchItem`] | Search result item with optional score |
21//! | [`StoreOp`] | Batch operation type |
22//! | [`StoreResult`] | Batch operation result |
23//! | [`MemoryStore`] | In-memory store implementation |
24//! | [`TTLConfig`] | Time-to-live configuration |
25//! | [`IndexConfig`] | Vector index configuration |
26//! | [`EmbeddingFunc`] | Embedding generation trait |
27//!
28//! # Example
29//!
30//! ```ignore
31//! use juncture_store::{MemoryStore, Store};
32//! use serde_json::json;
33//!
34//! #[tokio::main]
35//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
36//! let store = MemoryStore::new();
37//!
38//! // Store a value
39//! store.put(
40//! "checkpoint",
41//! "run_1",
42//! json!({"step": 5, "data": "example"}),
43//! None,
44//! ).await?;
45//!
46//! // Retrieve it
47//! let item = store.get("checkpoint", "run_1").await?;
48//! assert!(item.is_some());
49//!
50//! Ok(())
51//! }
52//! ```
53
54pub use juncture_core::store::{
55 EmbeddingFunc, FilterExpr, IndexConfig, Item, MemoryStore, SearchItem, SearchQuery,
56 SearchResult, Store, StoreError, StoreOp, StoreResult, TTLConfig,
57};
58
59// Rust guideline compliant 2026-05-22