do-memory-core 0.1.34

Core episodic learning system for AI agents with pattern extraction, reward scoring, and dual storage backend
Documentation
[package]
name = "do-memory-core"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage = "https://github.com/d-o-hub/rust-self-learning-memory"
readme = "README.md"
description = "Core episodic learning system for AI agents with pattern extraction, reward scoring, and dual storage backend"
keywords = ["ai", "memory", "learning", "episodic", "patterns"]
categories = ["database", "development-tools", "science"]
documentation = "https://docs.rs/do-memory-core"

[features]
default = []
# Enable OpenAI embedding provider
openai = ["reqwest"]
# Enable Mistral AI embedding provider
mistral = ["reqwest"]
# Enable all embedding providers
embeddings-full = ["openai", "mistral"]
# Enable local embedding models (requires model files)
local-embeddings = ["ort", "tokenizers", "ndarray", "reqwest/stream"]
# Enable hybrid search with FTS5
hybrid_search = []
# Enable proptest Arbitrary implementations for property testing
proptest-arbitrary = ["proptest"]
# Enable AgentFS SDK integration for external signals
agentfs = ["dep:agentfs-sdk"]
# Enable HNSW-based vector indexing
hnsw = ["hnsw_rs"]
# Enable CSM cascading retrieval (BM25 + HDC + ConceptGraph)
csm = ["chaotic_semantic_memory"]
# Enable HTTP webhook EventEmitter for CloudEvents delivery
http-emitter = ["reqwest"]
# Enable WASM compilation (compile-check only, no runtime support)
wasm32 = []

[dependencies]
# Async runtime - use specific features (no networking needed)
# Note: "fs" is excluded - tokio::fs usage is gated behind #[cfg(not(target_arch = "wasm32"))]
tokio = { workspace = true, features = ["sync", "macros", "rt", "time", "io-util"] }
async-trait = { workspace = true }

# Error handling
anyhow = { workspace = true }
thiserror = { workspace = true }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# UUID and time
uuid = { workspace = true }
chrono = { workspace = true }

# Logging
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.23", features = ["env-filter", "json"] }

# Futures utilities
futures = { workspace = true }

# LRU cache for query caching (using workspace version for consistency)
lru = { workspace = true }

# Synchronization
parking_lot = "0.12.5"

# HTTP client for OpenAI API (optional)
reqwest = { version = "0.13.4", features = ["json"], optional = true }

# ONNX Runtime for local embeddings (optional)
ort = { version = "2.0.0-rc.12", optional = true }

# Tokenizers for local embeddings (optional)
tokenizers = { version = "0.23.1", optional = true }

# ndarray for tensor operations (required by ort)
# Using 0.17.x to match ort 2.0.0-rc.11's ndarray dependency
ndarray = { version = "0.17", optional = true }

# Changepoint detection using PELT algorithm
  # augurs-changepoint wraps changepoint crate for time series analysis
  augurs-changepoint = "0.10.2"
  # Direct dependency to force changepoint 0.15.0 which uses fixed rv
  # This fixes RUSTSEC-2026-0002 (rv unsound IterMut implementation)
  changepoint = "0.15.0"

# Random number generation for tests
rand = "0.10"

# Platform and system utilities for smart defaults
dirs = "6.0"

# Fuzzy string matching for search
strsim = "0.11.1"

# AgentFS SDK for toolcall audit trails (optional)
agentfs-sdk = { version = "0.6.4", optional = true }

# Regular expressions for pattern matching
regex = "1.12"

# Property testing (optional, enabled via feature flag)
proptest = { version = "1.11", optional = true }

# HNSW-based vector indexing (optional)
hnsw_rs = { version = "0.3.0", optional = true }

# CSM cascading retrieval (optional, BM25 + HDC + ConceptGraph)
chaotic_semantic_memory = { version = "0.3.6", optional = true }

# Native-only: tokio::fs feature (not available on wasm32)
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["fs"] }

[dev-dependencies]
tokio = { workspace = true, features = ["sync", "macros", "rt", "time", "io-util", "rt-multi-thread", "test-util"] }
tempfile = { workspace = true }
do-memory-storage-turso = { path = "../memory-storage-turso", features = ["keepalive-pool"] }
do-memory-storage-redb = { path = "../memory-storage-redb" }
libsql = { workspace = true }
serial_test = "3.5"
criterion = "0.8"
proptest = "1.11"
insta = "1.47"
postcard = { workspace = true }
# Enable proptest-arbitrary feature for tests
do-memory-core = { path = ".", features = ["proptest-arbitrary"] }

# Inherit workspace lints

[lints]
workspace = true

# WASM support for getrandom (required by rand/uuid transitive deps)
[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { workspace = true, features = ["sync", "macros", "rt", "time", "io-util"] }
getrandom = { version = "0.2", features = ["js"] }
getrandom03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
getrandom04 = { package = "getrandom", version = "0.4", features = ["wasm_js"] }
uuid = { version = "1", features = ["js"] }