- Fix initPromise retry: reset to null on failure so subsequent calls
retry instead of returning cached rejected promise
- Remove dead code: findPromotionCandidates, findDemotionCandidates,
calculateEffectiveImportance (~190 lines, never called)
- Add agentId filter to deleteMemory() to prevent cross-agent deletion
- Fix phase label swaps: 1b=Semantic Dedup, 1c=Conflict Detection
(CLI banner, phaseNames map, SleepCycleResult/Options type comments)
- Add autoRecallMinScore and coreMemory config to plugin JSON schema
so the UI can validate and display these options
- Add embedding LRU cache (200 entries, SHA-256 keyed) to eliminate
redundant API calls across auto-recall, auto-capture, and tools
- Add Ollama concurrency limiter (chunks of 4) to prevent thundering
herd on single-threaded embedding server
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add extraction config section (apiKey, model, baseUrl) to plugin schema
with env-var fallback and Ollama/local LLM support (no API key required)
- Add category classification to extraction prompt; update memories from
'other' to LLM-assigned category
- Reorder sleep phases: extraction before decay
- Parallelize extraction (3 concurrent via Promise.allSettled)
- Pre-compute effective scores once and reuse for promotion/demotion
- Replace O(n²) Cartesian dedup with per-memory HNSW vector index queries
- Use mentionCount for orphan entity detection instead of subquery
- Remove dead auto-capture code (evaluateAutoCapture, CaptureItem, etc.)