v2.18.2
Removed
- Dead code cleanup — Removed
getProfileByIdmethod (zero callers), 5 CSS badge classes for non-existent memory types (badge-architecture,badge-documentation,badge-rule,badge-project,badge-user), and 17 internal-only symbols from the previouscloseShardManagerremoval.
Changed
- Config boilerplate eliminated — Inlined 9
buildXxxConfighelper functions directly intomergeConfigWithDefaultsinconfig.ts, removing ~95 lines of repetitive??fallback chains that duplicated logic already present in the merge function. - Web server route handlers simplified — Inlined 10 trivial one-line
_apiXxxwrapper methods directly into the route switch inweb-server.ts, and extracted duplicated security headers (CSP, X-Content-Type-Options, X-Frame-Options, HSTS) into a single_securityHeaders()helper. - Admin handler boilerplate extracted — 4 repetitive try/catch handler functions (
handleRunCleanup,handleRunDeduplication,handleDetectMigration,handleRunMigration) collapsed into a singleasyncServiceWrapperhelper inadmin.ts. - CaptureMutex simplified — Replaced the 10-line
CaptureMutexclass inauto-capture.tswith a simple boolean flag (isCapturing), eliminating unnecessary class ceremony for a one-shot lock. - Jaccard similarity consolidated — Three divergent
jaccardSimilarityimplementations (vector-search.ts,retrieval-context.ts,memory-scoring.ts) unified to the sharedtext-analysis.tsexport, with zero-allocation loop optimization preserved.
Fixed
- Dedup threshold inconsistency — The
checkDuplicateAtIngestfallback used?? 0.92while the canonical config default is0.9. Aligned the fallback to0.9to prevent inconsistent dedup behavior in partial-config test environments. - Useless transcripts UI section removed — Removed a dead transcripts section from the Web UI that served no functional purpose.
Performance
- Embedding cache hot-path logging removed —
getFromCache()calledlog()with an object construction ({ hits, misses, rate: hitRate() }) on every single cache hit, including aJSON.stringifyand async disk append viaappendFile. Removed the per-hit log; cache stats remain available via the/api/embedding-cacheendpoint. Measured 12x overhead reduction (31.69ms → 2.59ms per 100K lookups for object construction alone, before disk I/O).
Contributors
No community contributors for this release. All work by @ZeR020.
Full Changelog: v2.18.1...v2.18.2