Expand description
§mempill-core
Domain engine port traits, configuration, error model, NoOp stubs, use-cases, DTOs, and the async EngineHandle for the mempill temporally-correct AI-agent memory engine.
§Crate Organization
ports/— Hexagonal port traits (sync; no async fn). Public: visible to adapter crates.ports::PersistencePort— INSERT-only, agent_id-first persistence seam.ports::OraclePort— Pull-based, non-blocking adjudication port.ports::ExtractorPort— Stochastic proposer port (returns proposals, never commits).ports::EmbeddingPort— BYO-embedding port for fuzzy candidate coverage.ports::VectorPort— v0.1 compile-time seam (unimplemented; v0.2 sqlite-vec).
config—EngineConfigstruct with all tunable engine parameters.error—MemErrorenum (thiserror),WriteResult,BeliefResultaliases.noop—noop::NoOpOracle,noop::NoOpVector— do-nothing stubs for tests.application/— use-cases (IngestClaim, QueryMemory, Reconcile, Audit) + public DTOs.engine_handle—EngineHandleasync public entry point; bridges async callers to sync core.
§Sync Core Convention
All port traits and engine domain functions are synchronous. Async lives ONLY at the
EngineHandle boundary via tokio::task::spawn_blocking. The concurrency module
uses tokio::sync primitives (Mutex/RwLock) because the lock map is acquired by async
Tokio tasks — this is the lock layer, not the domain layer.
Re-exports§
pub use application::AuditQueryRequest;pub use application::AuditQueryResponse;pub use application::AuditUseCase;pub use application::HistoryEntry;pub use application::IngestClaimRequest;pub use application::IngestClaimResponse;pub use application::IngestClaimUseCase;pub use application::QueryHistoryRequest;pub use application::QueryHistoryResponse;pub use application::QueryHistoryUseCase;pub use application::QueryMemoryRequest;pub use application::QueryMemoryResponse;pub use application::QueryMemoryUseCase;pub use application::ReconcileRequest;pub use application::ReconcileResponse;pub use application::ReconcileUseCase;pub use config::EngineConfig;pub use engine_handle::EngineHandle;pub use engine_handle::ErasedPendingStore;pub use engine_handle::ErasedPendingStoreAdapter;pub use error::BeliefResult;pub use error::MemError;pub use error::WriteResult;pub use noop::NoOpOracle;pub use noop::NoOpVector;pub use ports::EmbeddingPort;pub use ports::ExtractorPort;pub use ports::OraclePort;pub use ports::PendingAdjudicationPort;pub use ports::PendingAdjudicationRow;pub use ports::PersistencePort;pub use ports::Txn;pub use ports::VectorPort;
Modules§
- application
- Application layer — public use-cases and DTOs.
- config
- EngineConfig — all tunable engine parameters.
- engine_
handle - EngineHandle — the sole public async entry point for mempill.
- error
- MemError — top-level error type for the mempill engine.
- noop
- NoOp stub implementations for OraclePort and VectorPort.
- ports
- Port traits — the hexagonal seams of mempill-core.
- testing
- Test support utilities for mempill-core.