mempill-core
The deterministic engine core for mempill — port traits, all 8 engine components,
use-cases, DTOs, and the async EngineHandle entry point.
See the repository README for the full architecture, quick start, and invariants.
Crate organization
mempill-core/src/
ports/ — PersistencePort, OraclePort, ExtractorPort, EmbeddingPort, VectorPort traits
engine/ — Gateway, TruthEngine, Reconciler, Supersession,
Projection, AmplificationGuard, AdjudicationGate, AuditLedger
application/ — use-cases (IngestClaim, QueryMemory, Reconcile, Audit) + public DTOs
engine_handle.rs — EngineHandle<P,O,V>: async entry point, spawn_blocking bridge
config.rs — EngineConfig (tunable engine parameters)
error.rs — MemError enum (thiserror)
noop.rs — NoOpOracle, NoOpVector (do-nothing stubs)
concurrency/ — AgentWriteLockMap (per-agent_id write lock)
testing/ — shared conformance harness (feature = "test-support")
Public API surface
// EngineHandle — sole public async entry point
;
Adapter crates (mempill-sqlite, mempill-postgres) provide concrete PersistencePort
implementations and expose convenience constructors (open_default, open_postgres).
mempill-core has no dependency on either adapter — the dependency direction is one-way.
Feature flags
test-support— compiles the sharedrun_persistence_conformanceharness used by both adapter crates in[dev-dependencies].
License
Apache-2.0. See LICENSE for the full text.