How slow-stack/mneme works
dsh-mneme is a cross-session memory plugin for DeepSeek Harness, with an optional stdio MCP interface. The main loop saves conversation-derived memories, persists them, recalls relevant items through hybrid search, and injects them into later sessions; idle maintenance consolidates and audits stored memories. The README also documents Markdown synchronization, entity relationships, scope controls, and a web workbench. Edges follow documented behavior and sampled wiring; unsampled subsystem internals are represented without speculative call chains.
Main entry points: service.js Memory service · index.js Plugin bootstrap · api.js External API · sleep.js Sleep maintenance
Components 24
Plugin interfaces
- Plugin bootstrap
dsh-mneme/lib/index.js - Memory tools
dsh-mneme/lib/tools.js - External API
dsh-mneme/lib/api.js - MCP server
mcp/bin/mneme-mcp.mjs - Web workbench
dsh-mneme/lib/client.js
Memory lifecycle
- Memory service
dsh-mneme/lib/service.js - Write quality
dsh-mneme/lib/quality-filter.js - Entity extraction
dsh-mneme/lib/entities/extractor.js
Recall and injection
- Context injection
dsh-mneme/lib/inject.js - Embedding providers
dsh-mneme/lib/embedding.js - Local embedding
dsh-mneme/lib/local-embedder.js - Vector index
dsh-mneme/lib/vector-index.js - BM25 search
dsh-mneme/lib/search/bm25.js
Consolidation and audit
- AutoDream
dsh-mneme/lib/dream.js - Sleep maintenance
dsh-mneme/lib/dream/sleep.js - Entity relationships
dsh-mneme/lib/entities/extractor.js
Persistence and configuration
- SQLite store
dsh-mneme/lib/store.js - Markdown mirror
dsh-mneme/lib/mirror.js - Document index
dsh-mneme/lib/document-index.js - Settings and scope
dsh-mneme/lib/settings.js
Other components
- User
- DSH host
- MCP client
- Embedding endpoint
Connections 28
- User → DSH host: starts conversation
- DSH host → Plugin bootstrap: loads plugin
- Plugin bootstrap → Memory tools: registers tools
- Memory tools → Memory service: invoke memory actions
- Memory service → Write quality: checks writes
- Memory service → SQLite store: reads and writes
- Memory service → Markdown mirror: synchronizes memories
- Memory service → Entity extraction: extracts entities
- Memory service → Embedding providers: requests vectors
- Memory service → Local embedding: uses local vectors
- Embedding providers → Embedding endpoint: requests embeddings
- Memory service → Vector index: searches vectors
- Memory service → BM25 search: searches keywords
- Plugin bootstrap → Context injection: registers injection
- Context injection → Memory service: recalls memories
- Plugin bootstrap → AutoDream: wires consolidation
- Plugin bootstrap → Sleep maintenance: schedules idle maintenance
- Sleep maintenance → Memory service: maintains memories
- Sleep maintenance → SQLite store: records audit receipts
- Plugin bootstrap → Document index: initializes document index
- User → Web workbench: manages memory
- Web workbench → External API: uses plugin API
- MCP client → MCP server: invokes memory tools
- MCP server → External API: sends authenticated requests
- Plugin bootstrap → External API: registers API
- External API → Memory service: handles memory requests
- Entity extraction → SQLite store: stores relationships
- Settings and scope → Plugin bootstrap: configures startup