rig-memory-policy 0.1.1

Backend-agnostic memory-policy primitives (frame metadata, content-hash dedup) shared by Rig memory-store adapters.
Documentation

rig-memory-policy

Crates.io Documentation CI

Backend-agnostic memory-policy primitives shared across Rig memory-store adapters (e.g. rig-memvid and future SQLite / LanceDB / Qdrant / filesystem backends).

This crate has no dependency on memvid-core or any specific storage engine. Adapters wrap these primitives in their own backend-specific code.

Phase 1 surface

  • dedup — in-process content-hash dedup for hooks/compactors that must satisfy rig::memory::{DemotionHook, Compactor}'s idempotency contract on (conversation_id, messages).
  • metadata — typed envelope (FrameMetadata + FrameKind) written into a backend's per-entry metadata map so downstream tools (evals, memory inspectors, RAG pipelines) can reason about the lifecycle that produced each entry.
  • error::PolicyError — neutral error type for the helpers above.

Trait surface (MemoryStore, capability sub-traits, generic PersistHook/DemotionHook/StoringCompactor) lands in subsequent phases — see the tracking issue in rig-memvid#28.

License

MIT