nav.groups.storage
ArtifactStore
Binary artifact storage for files, images, and attachments.
ArtifactStore
Binary artifact storage.
ArtifactStore stores binary files — images, PDFs, tool outputs — keyed by session. It is separate from the message and embedding stores because artifacts are opaque blobs that don't participate in search or token counting.
The full file is src/store/mod.rs.
API
#[async_trait]
pub trait ArtifactStore: Send + Sync {
async fn put(&self, artifact: Artifact) -> StoreResult<Artifact>;
async fn get(&self, id: &Uuid) -> StoreResult<Option<Artifact>>;
async fn delete(&self, id: &Uuid) -> StoreResult<()>;
async fn list_by_session(&self, session_id: &Uuid) -> StoreResult<Vec<Artifact>>;
async fn delete_by_session(&self, session_id: &Uuid) -> StoreResult<u64>;
}
pub struct Artifact {
pub id: Uuid,
pub session_id: Uuid,
pub name: String,
pub content_type: String,
pub data: Vec<u8>,
pub metadata: Value,
}
Backends
- Memory —
MemoryArtifactStore, default.HashMap<Uuid, Artifact>. - Disk —
DiskArtifactStore, featureobject_store. Files under a configurable root directory. - S3 —
S3ArtifactStore, featureobject_store. S3-compatible object storage.
See also
- Storage Overview — the full matrix.
- Object Backend — the disk/S3 backend.