cortex-mcp 2.7.6 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/CHANGELOG.md +305 -58
  2. package/README.md +394 -224
  3. package/dist/cli/setup.js +58 -60
  4. package/dist/cli/setup.js.map +1 -1
  5. package/dist/config/config.js +2 -2
  6. package/dist/config/config.js.map +1 -1
  7. package/dist/db/database.d.ts +8 -0
  8. package/dist/db/database.d.ts.map +1 -1
  9. package/dist/db/database.js +35 -54
  10. package/dist/db/database.js.map +1 -1
  11. package/dist/db/event-log.d.ts +4 -0
  12. package/dist/db/event-log.d.ts.map +1 -1
  13. package/dist/db/event-log.js +14 -10
  14. package/dist/db/event-log.js.map +1 -1
  15. package/dist/db/memory-store.d.ts +30 -3
  16. package/dist/db/memory-store.d.ts.map +1 -1
  17. package/dist/db/memory-store.js +153 -55
  18. package/dist/db/memory-store.js.map +1 -1
  19. package/dist/embedding-worker.js +1 -1
  20. package/dist/embedding-worker.js.map +1 -1
  21. package/dist/hooks/git-capture.js +3 -3
  22. package/dist/hooks/git-hooks.js +5 -2
  23. package/dist/mcp-stdio.js +39 -5
  24. package/dist/mcp-stdio.js.map +1 -1
  25. package/dist/memory/access-pattern-tracker.d.ts +51 -0
  26. package/dist/memory/access-pattern-tracker.d.ts.map +1 -0
  27. package/dist/memory/access-pattern-tracker.js +92 -0
  28. package/dist/memory/access-pattern-tracker.js.map +1 -0
  29. package/dist/memory/anticipation-engine.d.ts.map +1 -1
  30. package/dist/memory/anticipation-engine.js +18 -10
  31. package/dist/memory/anticipation-engine.js.map +1 -1
  32. package/dist/memory/auto-learner.d.ts.map +1 -1
  33. package/dist/memory/auto-learner.js +192 -45
  34. package/dist/memory/auto-learner.js.map +1 -1
  35. package/dist/memory/completion-resolver.d.ts +38 -0
  36. package/dist/memory/completion-resolver.d.ts.map +1 -0
  37. package/dist/memory/completion-resolver.js +127 -0
  38. package/dist/memory/completion-resolver.js.map +1 -0
  39. package/dist/memory/confidence-decay.d.ts.map +1 -1
  40. package/dist/memory/confidence-decay.js +13 -9
  41. package/dist/memory/confidence-decay.js.map +1 -1
  42. package/dist/memory/convention-detector.d.ts +11 -0
  43. package/dist/memory/convention-detector.d.ts.map +1 -0
  44. package/dist/memory/convention-detector.js +294 -0
  45. package/dist/memory/convention-detector.js.map +1 -0
  46. package/dist/memory/correction-detector.d.ts +33 -0
  47. package/dist/memory/correction-detector.d.ts.map +1 -0
  48. package/dist/memory/correction-detector.js +129 -0
  49. package/dist/memory/correction-detector.js.map +1 -0
  50. package/dist/memory/cross-memory-linker.d.ts +18 -0
  51. package/dist/memory/cross-memory-linker.d.ts.map +1 -0
  52. package/dist/memory/cross-memory-linker.js +115 -0
  53. package/dist/memory/cross-memory-linker.js.map +1 -0
  54. package/dist/memory/daily-diary.d.ts +30 -0
  55. package/dist/memory/daily-diary.d.ts.map +1 -0
  56. package/dist/memory/daily-diary.js +159 -0
  57. package/dist/memory/daily-diary.js.map +1 -0
  58. package/dist/memory/embedding-cache.d.ts +32 -0
  59. package/dist/memory/embedding-cache.d.ts.map +1 -0
  60. package/dist/memory/embedding-cache.js +76 -0
  61. package/dist/memory/embedding-cache.js.map +1 -0
  62. package/dist/memory/embedding-manager.d.ts.map +1 -1
  63. package/dist/memory/embedding-manager.js +6 -4
  64. package/dist/memory/embedding-manager.js.map +1 -1
  65. package/dist/memory/error-learner.d.ts +26 -0
  66. package/dist/memory/error-learner.d.ts.map +1 -0
  67. package/dist/memory/error-learner.js +145 -0
  68. package/dist/memory/error-learner.js.map +1 -0
  69. package/dist/memory/export-import.js +2 -2
  70. package/dist/memory/export-import.js.map +1 -1
  71. package/dist/memory/file-relationships.d.ts +47 -0
  72. package/dist/memory/file-relationships.d.ts.map +1 -0
  73. package/dist/memory/file-relationships.js +130 -0
  74. package/dist/memory/file-relationships.js.map +1 -0
  75. package/dist/memory/git-memory.d.ts.map +1 -1
  76. package/dist/memory/git-memory.js +20 -26
  77. package/dist/memory/git-memory.js.map +1 -1
  78. package/dist/memory/impact-analyzer.d.ts +16 -0
  79. package/dist/memory/impact-analyzer.d.ts.map +1 -0
  80. package/dist/memory/impact-analyzer.js +189 -0
  81. package/dist/memory/impact-analyzer.js.map +1 -0
  82. package/dist/memory/instructions-generator.d.ts +30 -0
  83. package/dist/memory/instructions-generator.d.ts.map +1 -0
  84. package/dist/memory/instructions-generator.js +117 -0
  85. package/dist/memory/instructions-generator.js.map +1 -0
  86. package/dist/memory/learning-rate.js +8 -7
  87. package/dist/memory/learning-rate.js.map +1 -1
  88. package/dist/memory/llm-enhancer.d.ts +2 -14
  89. package/dist/memory/llm-enhancer.d.ts.map +1 -1
  90. package/dist/memory/llm-enhancer.js +66 -46
  91. package/dist/memory/llm-enhancer.js.map +1 -1
  92. package/dist/memory/memory-cache.d.ts.map +1 -1
  93. package/dist/memory/memory-cache.js +10 -0
  94. package/dist/memory/memory-cache.js.map +1 -1
  95. package/dist/memory/memory-consolidator.d.ts.map +1 -1
  96. package/dist/memory/memory-consolidator.js +20 -14
  97. package/dist/memory/memory-consolidator.js.map +1 -1
  98. package/dist/memory/memory-decay.d.ts.map +1 -1
  99. package/dist/memory/memory-decay.js +82 -52
  100. package/dist/memory/memory-decay.js.map +1 -1
  101. package/dist/memory/memory-export-md.d.ts +12 -0
  102. package/dist/memory/memory-export-md.d.ts.map +1 -0
  103. package/dist/memory/memory-export-md.js +188 -0
  104. package/dist/memory/memory-export-md.js.map +1 -0
  105. package/dist/memory/memory-quality.d.ts +1 -1
  106. package/dist/memory/memory-quality.d.ts.map +1 -1
  107. package/dist/memory/memory-quality.js +9 -6
  108. package/dist/memory/memory-quality.js.map +1 -1
  109. package/dist/memory/memory-ranker.d.ts.map +1 -1
  110. package/dist/memory/memory-ranker.js +12 -3
  111. package/dist/memory/memory-ranker.js.map +1 -1
  112. package/dist/memory/meta-memory.js +3 -3
  113. package/dist/memory/meta-memory.js.map +1 -1
  114. package/dist/memory/mmr-reranker.d.ts +39 -0
  115. package/dist/memory/mmr-reranker.d.ts.map +1 -0
  116. package/dist/memory/mmr-reranker.js +115 -0
  117. package/dist/memory/mmr-reranker.js.map +1 -0
  118. package/dist/memory/pre-flight.d.ts +24 -0
  119. package/dist/memory/pre-flight.d.ts.map +1 -0
  120. package/dist/memory/pre-flight.js +121 -0
  121. package/dist/memory/pre-flight.js.map +1 -0
  122. package/dist/memory/preference-learner.d.ts +28 -0
  123. package/dist/memory/preference-learner.d.ts.map +1 -0
  124. package/dist/memory/preference-learner.js +144 -0
  125. package/dist/memory/preference-learner.js.map +1 -0
  126. package/dist/memory/query-expansion.d.ts +28 -0
  127. package/dist/memory/query-expansion.d.ts.map +1 -0
  128. package/dist/memory/query-expansion.js +140 -0
  129. package/dist/memory/query-expansion.js.map +1 -0
  130. package/dist/memory/regression-guard.d.ts +35 -0
  131. package/dist/memory/regression-guard.d.ts.map +1 -0
  132. package/dist/memory/regression-guard.js +90 -0
  133. package/dist/memory/regression-guard.js.map +1 -0
  134. package/dist/memory/resume-work.d.ts +37 -0
  135. package/dist/memory/resume-work.d.ts.map +1 -0
  136. package/dist/memory/resume-work.js +141 -0
  137. package/dist/memory/resume-work.js.map +1 -0
  138. package/dist/memory/session-tracker.d.ts +2 -0
  139. package/dist/memory/session-tracker.d.ts.map +1 -1
  140. package/dist/memory/session-tracker.js +26 -8
  141. package/dist/memory/session-tracker.js.map +1 -1
  142. package/dist/memory/soul-manager.d.ts +30 -0
  143. package/dist/memory/soul-manager.d.ts.map +1 -0
  144. package/dist/memory/soul-manager.js +171 -0
  145. package/dist/memory/soul-manager.js.map +1 -0
  146. package/dist/memory/success-tracker.d.ts +33 -0
  147. package/dist/memory/success-tracker.d.ts.map +1 -0
  148. package/dist/memory/success-tracker.js +75 -0
  149. package/dist/memory/success-tracker.js.map +1 -0
  150. package/dist/memory/temporal-engine.d.ts.map +1 -1
  151. package/dist/memory/temporal-engine.js +9 -13
  152. package/dist/memory/temporal-engine.js.map +1 -1
  153. package/dist/memory/tool-recommender.d.ts +29 -0
  154. package/dist/memory/tool-recommender.d.ts.map +1 -0
  155. package/dist/memory/tool-recommender.js +117 -0
  156. package/dist/memory/tool-recommender.js.map +1 -0
  157. package/dist/memory/usage-stats.d.ts +98 -0
  158. package/dist/memory/usage-stats.d.ts.map +1 -0
  159. package/dist/memory/usage-stats.js +345 -0
  160. package/dist/memory/usage-stats.js.map +1 -0
  161. package/dist/retrieval/hybrid-retriever.d.ts +0 -2
  162. package/dist/retrieval/hybrid-retriever.d.ts.map +1 -1
  163. package/dist/retrieval/hybrid-retriever.js +3 -13
  164. package/dist/retrieval/hybrid-retriever.js.map +1 -1
  165. package/dist/scanners/architecture-graph.js +2 -2
  166. package/dist/scanners/architecture-graph.js.map +1 -1
  167. package/dist/scanners/code-verifier.d.ts +1 -0
  168. package/dist/scanners/code-verifier.d.ts.map +1 -1
  169. package/dist/scanners/code-verifier.js +14 -14
  170. package/dist/scanners/code-verifier.js.map +1 -1
  171. package/dist/scanners/context-builder.d.ts.map +1 -1
  172. package/dist/scanners/context-builder.js +33 -45
  173. package/dist/scanners/context-builder.js.map +1 -1
  174. package/dist/scanners/export-map.js +2 -2
  175. package/dist/scanners/export-map.js.map +1 -1
  176. package/dist/scanners/project-scanner.js +2 -2
  177. package/dist/scanners/project-scanner.js.map +1 -1
  178. package/dist/security/encryption.js +1 -1
  179. package/dist/security/encryption.js.map +1 -1
  180. package/dist/security/feature-gate.d.ts.map +1 -1
  181. package/dist/security/feature-gate.js +62 -20
  182. package/dist/security/feature-gate.js.map +1 -1
  183. package/dist/security/license.js +282 -35
  184. package/dist/security/license.js.map +1 -1
  185. package/dist/security/rate-limiter.d.ts +4 -3
  186. package/dist/security/rate-limiter.d.ts.map +1 -1
  187. package/dist/security/rate-limiter.js +11 -29
  188. package/dist/security/rate-limiter.js.map +1 -1
  189. package/dist/server/dashboard.js +166 -327
  190. package/dist/server/dashboard.js.map +1 -1
  191. package/dist/server/mcp-handler.d.ts.map +1 -1
  192. package/dist/server/mcp-handler.js +1000 -792
  193. package/dist/server/mcp-handler.js.map +1 -1
  194. package/dist/utils/extract-tags.d.ts +16 -0
  195. package/dist/utils/extract-tags.d.ts.map +1 -0
  196. package/dist/utils/extract-tags.js +40 -0
  197. package/dist/utils/extract-tags.js.map +1 -0
  198. package/package.json +18 -8
  199. package/dist/core/event-bus.d.ts +0 -19
  200. package/dist/core/event-bus.d.ts.map +0 -1
  201. package/dist/core/event-bus.js +0 -51
  202. package/dist/core/event-bus.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,58 +1,305 @@
1
- # Changelog
2
-
3
- All notable changes to `cortex-mcp` are documented here.
4
-
5
- ---
6
-
7
- ## [1.0.6]2026-03-14
8
-
9
- ### Everything Is Now 100% Free
10
- - Removed all feature gates, paywalls, and license checks
11
- - All 35 tools available to every user with no restrictions
12
- - Limits auto-reset every 24 hours (no more "restart to reset")
13
-
14
- ### Critical Bug Fixes
15
- - **FIXED:** `memory-store.js``this` binding lost in `.map()` callbacks caused `getActive()`, `getByType()`, `getByFile()` to crash in strict mode
16
- - **FIXED:** `git-hooks.js`Wrong database path (`cortex.db` `data/cognitive.db`) caused all branch-switch and merge memories to be silently dropped
17
- - **FIXED:** `git-hooks.js`Missing `created_at` NOT NULL column in INSERT statement
18
- - **FIXED:** `git-capture.js` — Same missing `created_at` column bug
19
- - **FIXED:** `clear_memories` — Crashed with JS spread operator `...params` in better-sqlite3 `.all()`
20
- - **FIXED:** `search_timeline` — Same spread crash
21
- - **FIXED:** `backup_brain`Pointed to wrong property for DB file path (`dbPath` `memoryStore.db.name`)
22
- - **FIXED:** `undo_last` Was ordering by `timestamp` (last-accessed) instead of `created_at` (birth time), causing wrong memory to be undone
23
-
24
- ### New Tools (3 Added)
25
- - **`export_memories`** — Export entire brain to a shareable JSON file
26
- - **`import_memories`** — Import memories from JSON (skips duplicates)
27
- - **`get_related_memories`** — Graph traversal: find memories connected by relationship edges
28
-
29
- ### New Features
30
- - **Dashboard fully interactive** — Delete and pin memories directly from `localhost:3456`
31
- - **Dashboard live refresh** — Auto-refreshes every 30 seconds
32
- - **Dashboard dark theme** — Beautiful, professional UI with Inter font
33
- - **24h auto rate-limit reset** — Limits reset automatically, no server restart needed
34
- - **MEMORY_CAP raised** — Maintenance (decay/consolidation) now spans up to 10,000 memories
35
- - **MAX_CONTEXT_CHARS raised** — Context injected per request raised from 3,000 to 12,000 characters
36
- - **Context configurable** — Set `CORTEX_MAX_CONTEXT_CHARS` env var to customize
37
- - **Memory IDs in recall output** — `recall_memory` now shows IDs so you can immediately pin/downvote
38
- - **Correct tool names in setup rules** AI instruction files now reference `force_recall` (not `mcp_cortex_force_recall`)
39
-
40
- ### Performance
41
- - Added `idx_signals_memory` index on `user_signals(memory_id)` — 100x faster feedback lookups
42
- - All database maintenance operations raised from 500 → 10,000 memory cap
43
-
44
- ---
45
-
46
- ## [1.0.4] — 2026-02-xx
47
-
48
- ### Initial public release
49
- - Core MCP server with stdio transport
50
- - 25 tools for memory storage, recall, and project scanning
51
- - SQLite database with FTS5 full-text search
52
- - Vector search with `@xenova/transformers` (local, no API key)
53
- - Auto-learning from AI responses
54
- - Memory decay and confidence scoring
55
- - Memory consolidation (dedup)
56
- - Git commit capture via hooks
57
- - Web dashboard at localhost:3456
58
- - Auto-setup for Cursor, Claude, Windsurf, Copilot, Zed, Antigravity
1
+ # Changelog
2
+
3
+ All notable changes to Cortex MCP Server are documented here.
4
+
5
+ ## [2.6.0] -- 2026-03-04
6
+
7
+ ### AddedOpenClaw-Style Autonomous Brain
8
+
9
+ - **SOUL.md** Persistent identity file at `.cortex/SOUL.md` storing user preferences and conventions. Auto-learns from high-access memories via `autoLearnSoul()`.
10
+ - **Daily Diary** Timestamped Markdown logs at `~/.cortex-memory/diary/YYYY-MM-DD.md`. Entries written on every `store_memory` and `auto_learn`. Shown as Layer 7.5 in `force_recall`.
11
+ - **MEMORY.md** Human-readable knowledge export at `.cortex/MEMORY.md`. Auto-exported after `auto_learn` stores ≥2 memories. Auto-imported on startup from user edits.
12
+ - **MMR Re-ranking** Maximal Marginal Relevance (Carbonell & Goldstein 1998) applied to all recall results. λ=0.7 (70% relevance, 30% diversity). Uses Jaccard similarity on tokenized content.
13
+ - **Embedding Cache** — LRU cache (256 entries) for vector embeddings. Skips re-embedding identical queries. Reduces `recall_memory` latency by ~50%.
14
+ - **Query Expansion** — 40+ synonym groups (auth→authentication/login/jwt, db→database/sql/postgres, etc.). Generates alternative queries when FTS returns 0 results.
15
+ - **Access Pattern Tracking** Records which memory types are recalled most. Personalizes ranking with 0.7x–1.8x boost multipliers. Profile loaded on startup via `loadAccessProfile()`.
16
+ - **Cross-Memory Linking** `autoLinkMemory()` connects new memories to existing ones by shared files, tags, and word overlap.
17
+ - **Two-Tier Decay** Transactional memories (INSIGHT) decay at 5 days. Operational memories (DECISION, CORRECTION, BUG_FIX, CONVENTION) protected for 60 days.
18
+
19
+ ### Changed
20
+
21
+ - **Brain pipeline**Expanded from 12 to 14 layers (added Soul, Day 1 scan, Diary layers)
22
+ - **`expandQuery`**Replaced basic 10-synonym map with OpenClaw-style 40+ synonym module
23
+ - **`handleHealthCheck`** — Now shows diary stats, access profile status, and top memory types
24
+ - **`handleRecallMemory`** Added embedding cache, MMR re-ranking, alternative query fallback
25
+
26
+ ### Fixed
27
+
28
+ - **Diary logging gap** — `store_memory` now writes diary entries (previously only `auto_learn` did)
29
+ - **2 lint warnings** — `profileMemories` and `MemoryType` prefixed with underscore
30
+
31
+ ## [2.4.0] -- 2026-03-03
32
+
33
+ ### Added
34
+
35
+ - **Independent importance scoring** — Memories scored by type (CORRECTION=0.85, INSIGHT=0.55) + content signal boosts (file paths, error keywords, version numbers)
36
+ - **Topic tag extraction** — Auto-tags memories with technologies, domains, and actions (`['typescript', 'auth', 'database', 'testing']`)
37
+ - **FTS resolved filter** — Full-text search excludes resolved-tagged memories from results
38
+ - **Code block safety** `splitSentences` strips ``` fenced blocks and inline code before extraction
39
+ - **Dashboard auto-refresh** — Auto-refreshes every 30 seconds via meta tag
40
+
41
+ ### Changed
42
+
43
+ - **Action field** — Now stores source (`auto_learn:decision`) instead of duplicating intent content
44
+
45
+ ## [2.3.1] -- 2026-03-03
46
+
47
+ ### Removed
48
+
49
+ - **Dead code: `event-bus.ts`** 60 lines, 0 imports anywhere in codebase
50
+ - **Dead method: `cleanFTSQuery()`** Unused private method in hybrid-retriever.ts
51
+
52
+ ### Added
53
+
54
+ - **Memory decay Step 5** — Deactivate resolved memories >7 days old
55
+
56
+ ### Fixed
57
+
58
+ - **Lint** Prefixed unused `_confidence` parameter in completion-resolver.ts
59
+ - **README** — Updated "What's New in v2.0" → "What's New in v2.3"
60
+
61
+ ## [2.3.0] -- 2026-03-03
62
+
63
+ ### Fixed (Critical Brain Bugs)
64
+
65
+ - **Markdown bullet extraction** — `splitSentences()` now splits on newlines and bullets, not just periods. 4x more memories extracted from AI responses
66
+ - **Solo developer capture** — Added "I used/chose/picked" patterns (was only "we used")
67
+ - **DECISION vs CORRECTION misclassification** — Raised DECISION confidence to 0.78 (was 0.70, CORRECTION's "instead of" won at 0.75)
68
+ - **Completion resolver wired** — `completion-resolver.ts` was dead code, now integrated into `handleAutoLearn`
69
+ - **Ranker resolved penalty** — Resolved-tagged memories score 85% lower (0.15x multiplier)
70
+ - **Context builder filter** — Excludes resolved memories from context output
71
+
72
+ ## [2.2.0] -- 2026-03-02
73
+
74
+ ### Added
75
+
76
+ - **20 MCP tools** — Added `review_code`, `pre_check`, `check_impact`, `resume_work`
77
+ - **Attention ranking** — Debugging context boosts bug-fix memories, coding boosts conventions
78
+ - **Meta-memory** — Knowledge gap detection for files with zero memories
79
+ - **Memory consolidation** — Duplicate memories merge, keeping highest importance
80
+
81
+ ### Fixed
82
+
83
+ - **Git hooks cross-platform** — Changed `cortex-capture` → `npx cortex-capture` in hook scripts for reliable binary resolution
84
+ - **Windows chmod** — Separated `writeFileSync` from `chmodSync` with try/catch (Windows ignores chmod safely)
85
+ - **Lint cleanup** — Removed unused `getTipOfTheDay` import from mcp-handler.ts
86
+
87
+ ## [2.0.0] -- 2026-03-02
88
+
89
+ ### Fixed
90
+
91
+ - **Windows git command** — `resume-work.ts` used `2>/dev/null` (Unix-only), changed to `stdio: ['pipe','pipe','pipe']`
92
+
93
+ ### Changed
94
+
95
+ - **Setup CLI** — `getServerEntryWithEnv()` auto-passes `OPENROUTER_API_KEY` from system environment
96
+ - **Setup CLI** — Prints free LLM tip with OpenRouter instructions after setup
97
+ - **Setup CLI** — Added `transportType: 'stdio'` to server entry for proper MCP protocol compliance
98
+ - **get_stats** — Returns 6 new fields: `streak`, `longestStreak`, `totalAutoLearns`, `successPatternsLearned`, `errorsLearned`, `llmProvider`
99
+ - **README** — "What's New" section updated from v1.4 to v2.0
100
+
101
+ ## [1.9.0] -- 2026-03-02
102
+
103
+ ### Added
104
+
105
+ - **Daily streak tracking** — Tracks consecutive days of Cortex usage with "Don't break the chain!" gamification
106
+ - **Streak display** — Shows "🔥 7-day streak!" in stats footer (3-day, 7-day, 14-day, 30-day tiers)
107
+ - **Tip of the Day** — Surfaces a random useful memory in force_recall footer (deterministic daily pick)
108
+ - **Success tracker wired** — `auto_learn` now detects praise ("perfect", "that worked") and stores proven approaches
109
+ - **Error learner wired** — `auto_learn` now captures error fingerprints (TS errors, stack traces, npm failures)
110
+ - **trackSuccess()** / **trackErrorLearned()** — New usage-stats tracking functions
111
+
112
+ ## [1.8.0] -- 2026-03-02
113
+
114
+ ### Added
115
+
116
+ - **Project memory filtering** — Memories tagged with current project get 1.3x score boost, other projects get 0.7x penalty
117
+ - **Error fingerprint patterns** — 7 new signals in auto-learner: TypeError, ENOENT, HTTP 4xx/5xx, npm ERR, stack traces, build failures
118
+ - **Git-enhanced resume** — `resume_work` shows recent git commits from last 24 hours
119
+
120
+ ## [1.7.0] -- 2026-03-02
121
+
122
+ ### Added
123
+
124
+ - **OpenRouter free LLM** — Add `OPENROUTER_API_KEY` for smarter memory extraction at zero cost
125
+ - **Default free models** — `meta-llama/llama-4-scout:free` and `deepseek/deepseek-chat-v3-0324:free`
126
+ - **OpenRouter headers** — Proper `HTTP-Referer` and `X-Title` headers
127
+ - **15-second timeout** — Extended from 10s for slower free tier models
128
+
129
+ ## [1.6.0] -- 2026-03-02
130
+
131
+ ### Added
132
+
133
+ - **Brain Health Score** — Composite 0-100 score based on usage patterns (Newborn → Genius grades)
134
+ - **Saved You counter** — Tracks times Cortex prevented repeated mistakes
135
+ - **Memory milestones** — Celebrations at 10, 25, 50, 100, 250, 500 memories
136
+ - **Time saved estimate** — Estimates hours saved based on recalls and catches
137
+ - **Stats footer** — Every `force_recall` response ends with stats summary
138
+
139
+ ## [1.5.0] -- 2026-03-02
140
+
141
+ ### Added
142
+
143
+ - **5 new auto-learn patterns** — Enhanced pattern matching for decisions, conventions, insights
144
+ - **Topic-aware force_recall** — Search memories relevant to the current topic
145
+ - **Project auto-detection** — Detects project name from package.json or directory name
146
+
147
+ ### Changed
148
+
149
+ - **Stronger tool descriptions** — `force_recall`, `auto_learn`, `pre_check` now include consequence language so AI uses them consistently
150
+ - **Raised text limit** — `auto_learn` content limit increased from 5K to 50K chars (AI responses can be very long)
151
+ - **Rule templates** — Ships rules for Claude (`CLAUDE.md`), Cursor (`.cursorrules`), Windsurf (`.windsurfrules`), Copilot (`.github/copilot-instructions.md`), and Gemini (`GEMINI.md`)
152
+ - **Updated README** — Reflects v1.4 features
153
+
154
+ ## [1.4.1] -- 2026-03-02
155
+
156
+ ### Fixed
157
+
158
+ - **Pattern priority bug** — `extractMemories` now picks highest-confidence match, not first match
159
+ - **CONVENTION patterns** — Split into specific (0.85 confidence) and generic (0.65) groups. "best practice" now correctly classified
160
+ - **INSIGHT patterns** — Split into specific (0.85) and generic (0.55). "for future reference" now correctly classified
161
+ - **Preference regex** — Fixed "be more concise" detection
162
+
163
+ ## [1.4.0] -- 2026-03-02
164
+
165
+ ### Added
166
+
167
+ - **instructions-generator** — Converts memories into DO/DON'T/WATCH-OUT/STYLE rules
168
+ - **tool-recommender** — Recommends Cortex tools based on context (🔴 must / 🟡 should / 🟢 could)
169
+ - **regression-guard** — Extracts verification steps and attaches to BUG_FIX memories
170
+ - **error-learner** — Learns from build/compile error patterns
171
+ - **success-tracker** — Reinforces approaches when user says "perfect" or "works"
172
+ - **file-relationships** — Tracks which files are typically co-edited
173
+ - **preference-learner** — Detects user communication and coding preferences
174
+ - **32 capture patterns** — Enhanced from 14 to 32 in auto-learner
175
+
176
+ ### Changed
177
+
178
+ - **Lint cleanup** — Fixed 10 unused import warnings in mcp-handler.ts
179
+ - **Branding** — Server name is now "Cortex" (capital C) for proper IDE display
180
+
181
+ ## [1.3.0] -- 2026-03-01
182
+
183
+ ### Added
184
+
185
+ - **Architecture graph** — Maps file roles and dependencies
186
+ - **Export map** — Tracks what functions are exported from which files
187
+ - **Convention detector** — Auto-detects coding conventions during project scan
188
+ - **Knowledge gap reporting** — Identifies uncovered areas in scan results
189
+ - **Architecture-aware pre_check** — Shows file role and dependencies
190
+
191
+ ## [1.2.1] -- 2026-02-24
192
+
193
+ ### Changed
194
+
195
+ - **Shared tag extraction** — Created `src/utils/extract-tags.ts` as single source of truth for topic-based tag extraction
196
+ - **Eliminated duplicate code** — `llm-enhancer.ts` and `git-memory.ts` now import from the shared utility
197
+
198
+ ## [1.2.0] -- 2026-02-24
199
+
200
+ ### Performance (Critical)
201
+
202
+ - **`force_recall` parallelization** — Brain layers 6-12 now run concurrently via `Promise.allSettled()`. Latency drops from ~15-19s to ~3-5s
203
+ - **`force_recall` caching** — Results cached with 30s TTL, repeated calls return instantly
204
+ - **Removed double FTS sanitization** — `hybrid-retriever.ts` no longer double-sanitizes queries
205
+ - **Fixed sync `touch()` in `Promise.all`** — Replaced with `runTransaction()` for proper batching
206
+
207
+ ### Performance (Database)
208
+
209
+ - **Context builder** — Consolidated 7 SQL queries into 1 (`context-builder.ts`)
210
+ - **Event log** — Cached 4 prepared statements in constructor (`event-log.ts`)
211
+ - **Anticipation engine** — FTS search instead of load+filter (`anticipation-engine.ts`)
212
+ - **Session tracker** — `findByTag()` instead of JS filter (`session-tracker.ts`)
213
+ - **Meta-memory** — Reduced fetch from 500 to 200 (`meta-memory.ts`)
214
+
215
+ ### Performance (Memory)
216
+
217
+ - **Hoisted stopwords** — Module-level constants in `learning-rate.ts` and `memory-quality.ts`
218
+ - **Proactive cache eviction** — Stale entries swept during `setCache()` (`memory-cache.ts`)
219
+
220
+ ### Robustness
221
+
222
+ - **Session array capping** — Arrays capped at 20 entries to prevent unbounded growth
223
+ - **Contradiction detection** — Raised overlap threshold from 2 to 3 (fewer false positives)
224
+ - **Top-level imports** — Moved `require('child_process')` to top-level in `git-memory.ts`, `temporal-engine.ts`
225
+ - **Export-import** — Dedup cap reduced from 5000 to 1000
226
+
227
+ ### Architectural
228
+
229
+ - **Tag-based scan detection** — Replaced fragile magic-string check with `findByTag('project-scan')` in `project-scanner.ts`
230
+
231
+ ## [1.1.1] -- 2026-02-23
232
+
233
+ ### Fixed
234
+
235
+ - **Memory store** — Cached prepared statements for all read queries (Round 4 optimization)
236
+ - **FTS sanitization** — Added input sanitization in `searchFTS()` to prevent query injection
237
+ - **Database** — WAL mode and busy timeout for concurrent access reliability
238
+
239
+ ## [1.1.0] -- 2026-02-23
240
+
241
+ ### Changed
242
+
243
+ - **Launch Edition** — All features unlocked for free users (unlimited memories, all brain layers, auto-learn, etc.)
244
+ - **URL Migration** — Consolidated all references from `cortex-website-theta.vercel.app` to `cortex-ai-iota.vercel.app`
245
+
246
+ ### Fixed
247
+
248
+ - **Google OAuth 500 error** — Added `.trim()` to environment variables to strip hidden newline characters
249
+ - **LemonSqueezy webhook** — Updated webhook URL to point to new production domain
250
+ - **Google Cloud Console** — Added new redirect URI for OAuth callback
251
+
252
+ ## [1.0.1] -- 2026-02-19
253
+
254
+ ### Fixed
255
+
256
+ - **FTS5 indexing** -- Triggers were silently failing to index memories for search
257
+ - **Emoji removal** -- All emojis removed from source code for professional terminal output
258
+ - **SECURITY.md port** -- Documented port corrected from 3100 to 3456
259
+ - **CONTRIBUTING.md** -- Fixed `npm run dev` to `npm run watch`
260
+ - **Config leak** -- Added `bin/` and `.ai/` to `.gitignore` and `.npmignore`
261
+
262
+ ### Added
263
+
264
+ - **Soak testing** -- 500-operation stability test (1800+ ops/sec, 0 failures)
265
+ - **Binary builds** -- `scripts/build-binaries.js` for standalone executables
266
+ - **CI/CD pipeline** -- `.github/workflows/release.yml` for automated releases
267
+ - **Value verification** -- `scripts/value-test.js` proves cross-session memory recall
268
+ - **Performance stats** -- Added to README (<1ms latency, 1800+ ops/sec)
269
+ - **Direct download** -- README Option 3 for binary downloads
270
+
271
+ ## [1.0.0] -- 2026-02-18
272
+
273
+ ### Added
274
+
275
+ - **`force_recall` tool** — Mandatory context injection at conversation start
276
+ - **`quick_store` tool** — One-sentence memory storage with auto-classification
277
+ - **`store_memory` / `recall_memory`** — Full memory CRUD with type, tags, reason
278
+ - **`update_memory` / `delete_memory` / `list_memories`** — Memory management
279
+ - **`auto_learn` tool** — Extracts decisions and patterns from AI responses
280
+ - **`verify_code` tool** — Detects hallucinated imports, exports, env variables
281
+ - **`verify_files` tool** — Catches hallucinated file paths
282
+ - **`scan_project` tool** — Scans project structure, stack, and git history
283
+ - **`get_context` tool** — Compressed context for current file
284
+ - **`get_stats` / `health_check`** — Database and server diagnostics
285
+ - **`export_memories` / `import_memories`** — JSON bundle export/import with dedup
286
+ - **Git auto-capture** — `post-commit` hook classifies every commit as a memory
287
+ - **Branch/merge capture** — `post-checkout` and `post-merge` hooks track workflow
288
+ - **Build error capture** — `cortex-run` wrapper captures test/build failures
289
+ - **Optional LLM enhancement** — OpenAI/Anthropic/compatible APIs for smarter classification
290
+ - **Web dashboard** — localhost:3456 with memory viewer, search, export
291
+ - **`cortex-setup` CLI** — Auto-configures Antigravity, Claude, Cursor, Copilot, Windsurf, Zed
292
+ - **CLI routing** — `npx cortex-mcp setup` and `--version` subcommands
293
+ - **Quality gates** — Junk rejection, contradiction detection, deduplication
294
+ - **Rate limiting** — 30 stores, 100 auto-learns, 500 calls per session
295
+ - **Memory decay** — Stale/low-quality memories cleaned automatically
296
+ - **Crash protection** — `uncaughtException` and `unhandledRejection` handlers
297
+ - **Degraded mode** — Server reports errors instead of crashing if DB init fails
298
+
299
+ ### Technical
300
+
301
+ - SQLite-backed persistence with FTS5 full-text search
302
+ - MiniLM-L6-v2 semantic embeddings via `@xenova/transformers` (background worker)
303
+ - Hybrid retrieval: semantic similarity + keyword FTS + recency scoring
304
+ - Direct SQLite hooks for sub-500ms git hook execution
305
+ - Optional LLM with graceful fallback to keyword classification