memorix 1.0.1 → 1.0.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.0.3] — 2026-03-14
6
+
7
+ ### Added
8
+ - **Memory Formation Pipeline** — Three-stage pipeline (Extract → Resolve → Evaluate) runs in shadow mode on every `memorix_store` call and hooks trigger. Collects quality metrics without affecting storage decisions.
9
+ - **Extract**: Automatic fact extraction from narratives, title normalization, entity resolution against Knowledge Graph, observation type verification.
10
+ - **Resolve**: 4 resolution actions (new/merge/evolve/discard) based on similarity scoring, word overlap, and contradiction detection.
11
+ - **Evaluate**: Multi-factor knowledge value assessment (type weight, fact density, specificity, causal reasoning, noise detection). Categorizes memories as core/contextual/ephemeral.
12
+ - **`memorix_formation_metrics` tool** — New MCP tool to query aggregated Formation Pipeline metrics (value scores, resolution actions, extraction rates, processing times).
13
+ - **`getEntityNames()` method** on `KnowledgeGraphManager` for Formation Pipeline entity resolution.
14
+
15
+ ### Stats
16
+ - **Default MCP Tools:** 23 (+1: `memorix_formation_metrics`)
17
+ - **Tests:** 803/803 passing across 60 files (+50 new Formation Pipeline tests)
18
+ - **Hooks safety:** handler.ts +21 lines (shadow call only), zero modification to existing hook logic
19
+
20
+ ---
21
+
22
+ ## [1.0.2] — 2026-03-14
23
+
24
+ ### Fixed
25
+ - **MCP Server version mismatch** — Server now reports the correct version from `package.json` (was hardcoded `0.1.0`). Injected at build time via tsup `define`.
26
+ - **CI Node.js matrix** — Removed Node 18 from CI matrix to match `engines: >=20` in `package.json`.
27
+ - **Orama reindex idempotency** — `reindexObservations()` now resets the Orama DB before rebuilding, eliminating "document already exists" errors in multi-session scenarios.
28
+ - **E2E tests no longer touch real user data** — Mini-skills E2E tests now use a temporary directory with synthetic observations instead of reading/writing `~/.memorix/data/`.
29
+
30
+ ---
31
+
5
32
  ## [1.0.1] — 2026-03-14
6
33
 
7
34
  ### Fixed
package/README.md CHANGED
@@ -14,12 +14,12 @@
14
14
  <a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/dm/memorix.svg?style=flat-square&color=blue" alt="downloads"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green.svg?style=flat-square" alt="license"></a>
16
16
  <a href="https://github.com/AVIDS2/memorix"><img src="https://img.shields.io/github/stars/AVIDS2/memorix?style=flat-square&color=yellow" alt="stars"></a>
17
- <img src="https://img.shields.io/badge/tests-753%20passed-brightgreen?style=flat-square" alt="tests">
17
+ <img src="https://img.shields.io/badge/tests-803%20passed-brightgreen?style=flat-square" alt="tests">
18
18
  <a href="https://github.com/AVIDS2/memorix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/AVIDS2/memorix/ci.yml?style=flat-square&label=CI" alt="CI"></a>
19
19
  </p>
20
20
 
21
21
  <p align="center">
22
- <strong>v1.0 Stable | 22 MCP tools | Auto-cleanup | Multi-agent collaboration | 10 IDEs supported</strong>
22
+ <strong>v1.0 Stable | 23 MCP tools | Auto-cleanup | Multi-agent collaboration | 10 IDEs supported</strong>
23
23
  </p>
24
24
 
25
25
  <p align="center">
@@ -64,6 +64,7 @@ No re-explaining. No copy-pasting. No vendor lock-in.
64
64
  - **Dual-Mode Quality**: Free heuristic engine for basic dedup; optional LLM mode for intelligent compression, reranking, and conflict resolution.
65
65
  - **3-Layer Progressive Disclosure**: Search returns compact indices (~50 tokens/result), timeline shows chronological context, detail provides full content. ~10x token savings over full-text retrieval.
66
66
  - **Mini-Skills**: Promote high-value observations to permanent skills that auto-inject at every session start. Critical knowledge never decays.
67
+ - **Memory Formation Pipeline**: Automatic fact extraction, entity resolution, and knowledge value assessment on every store. Shadow mode collects quality metrics without affecting storage.
67
68
  - **Auto-Memory Hooks**: Automatically capture decisions, errors, and gotchas from IDE tool calls. Pattern detection in English and Chinese.
68
69
  - **Knowledge Graph**: Entity-relation model compatible with [MCP Official Memory Server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory). Auto-creates relations from entity extraction.
69
70
 
@@ -171,7 +172,7 @@ Restart your agent. No API keys required. No cloud. No external dependencies.
171
172
 
172
173
  ## Features
173
174
 
174
- ### 22 MCP Tools (Default)
175
+ ### 23 MCP Tools (Default)
175
176
 
176
177
  | Category | Tools |
177
178
  |----------|-------|
@@ -179,7 +180,7 @@ Restart your agent. No API keys required. No cloud. No external dependencies.
179
180
  | **Sessions** | `memorix_session_start` · `memorix_session_end` · `memorix_session_context` |
180
181
  | **Skills** | `memorix_skills` · `memorix_promote` |
181
182
  | **Workspace** | `memorix_workspace_sync` · `memorix_rules_sync` |
182
- | **Maintenance** | `memorix_retention` · `memorix_consolidate` · `memorix_transfer` |
183
+ | **Maintenance** | `memorix_retention` · `memorix_consolidate` · `memorix_transfer` · `memorix_formation_metrics` |
183
184
  | **Team** | `team_manage` · `team_file_lock` · `team_task` · `team_message` |
184
185
  | **Dashboard** | `memorix_dashboard` |
185
186
 
@@ -329,7 +330,7 @@ Stage 3: Recency + Project Affinity → Final scored results
329
330
  ### Write Pipeline
330
331
 
331
332
  ```
332
- Input → LLM Compression (optional) → Compact on Write (dedup/merge) → Store + Index
333
+ Input → Formation Pipeline (extract/resolve/evaluate) → LLM Compression (optional) → Compact on Write (dedup/merge) → Store + Index
333
334
  ```
334
335
 
335
336
  ### Key Design Decisions
@@ -348,7 +349,7 @@ git clone https://github.com/AVIDS2/memorix.git
348
349
  cd memorix && npm install
349
350
 
350
351
  npm run dev # watch mode
351
- npm test # 753 tests
352
+ npm test # 803 tests
352
353
  npm run build # production build
353
354
  ```
354
355
 
package/README.zh-CN.md CHANGED
@@ -14,12 +14,12 @@
14
14
  <a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/dm/memorix.svg?style=flat-square&color=blue" alt="downloads"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green.svg?style=flat-square" alt="license"></a>
16
16
  <a href="https://github.com/AVIDS2/memorix"><img src="https://img.shields.io/github/stars/AVIDS2/memorix?style=flat-square&color=yellow" alt="stars"></a>
17
- <img src="https://img.shields.io/badge/tests-753%20passed-brightgreen?style=flat-square" alt="tests">
17
+ <img src="https://img.shields.io/badge/tests-803%20passed-brightgreen?style=flat-square" alt="tests">
18
18
  <a href="https://github.com/AVIDS2/memorix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/AVIDS2/memorix/ci.yml?style=flat-square&label=CI" alt="CI"></a>
19
19
  </p>
20
20
 
21
21
  <p align="center">
22
- <strong>v1.0 正式版 | 22 个 MCP 工具 | 自动清理 | 多 Agent 协作 | 10 IDE 支持</strong>
22
+ <strong>v1.0 正式版 | 23 个 MCP 工具 | 自动清理 | 多 Agent 协作 | 10 IDE 支持</strong>
23
23
  </p>
24
24
 
25
25
  <p align="center">
@@ -64,6 +64,7 @@ AI 编码 Agent 在会话之间会丢失全部上下文。切换 IDE 后,之
64
64
  - **双模式质量引擎**:免费启发式引擎处理基础去重;可选 LLM 模式提供智能压缩、重排序和冲突检测。
65
65
  - **3 层渐进式展示**:搜索返回紧凑索引(每条约 50 tokens),时间线展示前后文,详情提供完整内容。相比全文检索节省约 10 倍 token。
66
66
  - **Mini-Skills**:将高价值观察提升为永久技能,每次会话启动自动注入。关键知识永不衰减。
67
+ - **记忆形成管线**:每次存储自动进行事实抽取、实体归并和知识价值评估。Shadow 模式收集质量指标而不影响存储。
67
68
  - **自动记忆 Hook**:自动从 IDE 工具调用中捕获决策、错误和踩坑经验。支持中英文模式检测。
68
69
  - **知识图谱**:实体-关系模型,兼容 [MCP 官方 Memory Server](https://github.com/modelcontextprotocol/servers/tree/main/src/memory)。自动从内容中提取实体并创建关联。
69
70
 
@@ -171,7 +172,7 @@ args = ["serve"]
171
172
 
172
173
  ## 功能
173
174
 
174
- ### 22 个 MCP 工具(默认)
175
+ ### 23 个 MCP 工具(默认)
175
176
 
176
177
  | 分类 | 工具 |
177
178
  |------|------|
@@ -179,7 +180,7 @@ args = ["serve"]
179
180
  | **会话** | `memorix_session_start` · `memorix_session_end` · `memorix_session_context` |
180
181
  | **技能** | `memorix_skills` · `memorix_promote` |
181
182
  | **工作区** | `memorix_workspace_sync` · `memorix_rules_sync` |
182
- | **维护** | `memorix_retention` · `memorix_consolidate` · `memorix_transfer` |
183
+ | **维护** | `memorix_retention` · `memorix_consolidate` · `memorix_transfer` · `memorix_formation_metrics` |
183
184
  | **团队** | `team_manage` · `team_file_lock` · `team_task` · `team_message` |
184
185
  | **仪表盘** | `memorix_dashboard` |
185
186
 
@@ -307,7 +308,7 @@ memorix hooks install # 为 IDE 安装自动记忆
307
308
  graph TB
308
309
  A["Cursor · Claude Code · Windsurf · Codex · +6 更多"]
309
310
  A -->|MCP stdio| Core
310
- Core["Memorix MCP Server\n22 个默认工具 · 自动Hook · 自动清理"]
311
+ Core["Memorix MCP Server\n23 个默认工具 · 自动Hook · 自动清理"]
311
312
  Core --> Search["检索管线\nBM25 + 向量 + 重排序"]
312
313
  Core --> Team["团队协作\n注册 · 任务 · 锁 · 消息"]
313
314
  Core --> Sync["规则 & 工作区同步\n10 个适配器"]
@@ -331,7 +332,7 @@ graph TB
331
332
  ### 写入管线
332
333
 
333
334
  ```
334
- 输入 → LLM 压缩(可选) → 写入时去重/合并 → 存储 + 索引
335
+ 输入 → 记忆形成管线 (抽取/归并/评估) → LLM 压缩(可选) → 写入时去重/合并 → 存储 + 索引
335
336
  ```
336
337
 
337
338
  ### 关键设计决策
@@ -350,7 +351,7 @@ git clone https://github.com/AVIDS2/memorix.git
350
351
  cd memorix && npm install
351
352
 
352
353
  npm run dev # 监听模式
353
- npm test # 753 个测试
354
+ npm test # 803 个测试
354
355
  npm run build # 生产构建
355
356
  ```
356
357