memorix 1.10.2 → 1.10.4

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 (101) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +3 -1
  3. package/README.zh-CN.md +3 -1
  4. package/dist/cli/index.js +2281 -1486
  5. package/dist/cli/memcode.js +0 -0
  6. package/dist/index.js +1874 -1126
  7. package/dist/{maintenance-jobs-DVRF-46r.d.ts → maintenance-jobs-DweoCoTT.d.ts} +25 -15
  8. package/dist/maintenance-runner.d.ts +1 -1
  9. package/dist/maintenance-runner.js +802 -194
  10. package/dist/media-audio-runner.js +793 -186
  11. package/dist/media-video-runner.js +801 -194
  12. package/dist/memcode-runtime/CHANGELOG.md +64 -1
  13. package/dist/sdk.js +14036 -13317
  14. package/dist/types.d.ts +1 -1
  15. package/dist/vector-backfill-runner.d.ts +1 -1
  16. package/dist/vector-backfill-runner.js +801 -194
  17. package/docs/ARCHITECTURE.md +219 -0
  18. package/docs/CONFIGURATION.md +49 -0
  19. package/docs/DESIGN_DECISIONS.md +37 -0
  20. package/docs/DEVELOPMENT.md +1 -1
  21. package/docs/INTEGRATIONS.md +1 -1
  22. package/docs/MODULES.md +7 -1
  23. package/docs/PERFORMANCE.md +14 -0
  24. package/docs/README.md +2 -1
  25. package/docs/ROADMAP-1.9.12-2.0.md +18 -2
  26. package/docs/SETUP.md +19 -4
  27. package/package.json +1 -1
  28. package/plugins/antigravity/memorix/plugin.json +1 -1
  29. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  30. package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
  31. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  32. package/plugins/copilot/memorix/plugin.json +1 -1
  33. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  34. package/plugins/hermes/memorix/plugin.yaml +1 -1
  35. package/plugins/omp/memorix/package.json +1 -1
  36. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  37. package/plugins/pi/memorix/package.json +1 -1
  38. package/server.json +2 -2
  39. package/src/cli/commands/agent-integrations.ts +1 -1
  40. package/src/cli/commands/background.ts +1 -1
  41. package/src/cli/commands/context.ts +3 -2
  42. package/src/cli/commands/doctor.ts +9 -0
  43. package/src/cli/commands/explain.ts +3 -2
  44. package/src/cli/commands/init.ts +6 -2
  45. package/src/cli/commands/setup.ts +9 -6
  46. package/src/cli/commands/uninstall.ts +15 -0
  47. package/src/cli/tui/App.tsx +9 -16
  48. package/src/cli/tui/ConfigureView.tsx +2 -0
  49. package/src/cli/tui/chat-service.ts +6 -9
  50. package/src/cli/tui/data.ts +2 -2
  51. package/src/codegraph/auto-context.ts +10 -3
  52. package/src/codegraph/derived-view.ts +63 -0
  53. package/src/codegraph/store.ts +37 -0
  54. package/src/codegraph/types.ts +3 -0
  55. package/src/compact/engine.ts +10 -33
  56. package/src/config/dotenv-loader.ts +1 -0
  57. package/src/config/resolved-config.ts +18 -2
  58. package/src/config/retrieval-strategy.ts +22 -0
  59. package/src/config/toml-loader.ts +6 -0
  60. package/src/config/yaml-loader.ts +11 -2
  61. package/src/core/derived-view.ts +15 -0
  62. package/src/core/maintenance-result.ts +33 -0
  63. package/src/core/retrieval-contracts.ts +57 -0
  64. package/src/core/retrieval-facade.ts +18 -0
  65. package/src/core/retrieval-policy.ts +44 -0
  66. package/src/core/runtime-context.ts +42 -0
  67. package/src/dashboard/server.ts +5 -6
  68. package/src/embedding/api-provider.ts +18 -8
  69. package/src/hooks/handler.ts +0 -1
  70. package/src/integrations/registry.ts +2 -1
  71. package/src/knowledge/workset.ts +0 -2
  72. package/src/llm/provider.ts +2 -1
  73. package/src/memory/consolidation.ts +3 -2
  74. package/src/memory/feedback-model.ts +1 -4
  75. package/src/memory/observations.ts +226 -104
  76. package/src/multimodal/image-loader.ts +2 -2
  77. package/src/runtime/control-plane-maintenance.ts +1 -0
  78. package/src/runtime/isolated-maintenance.ts +1 -0
  79. package/src/runtime/maintenance-jobs.ts +123 -32
  80. package/src/runtime/open-browser.ts +25 -0
  81. package/src/runtime/project-maintenance.ts +69 -1
  82. package/src/sdk.ts +3 -2
  83. package/src/search/fts-view.ts +53 -0
  84. package/src/search/orama-view.ts +40 -0
  85. package/src/search/retrieval-facade.ts +38 -0
  86. package/src/search/semantic-index.ts +13 -0
  87. package/src/search/semantic-view.ts +34 -0
  88. package/src/server.ts +21 -9
  89. package/src/store/obs-store.ts +15 -0
  90. package/src/store/orama-store.ts +143 -45
  91. package/src/store/sqlite-db.ts +22 -0
  92. package/src/store/sqlite-store.ts +27 -0
  93. package/src/types.ts +1 -1
  94. package/src/workspace/mcp-adapters/pi.ts +58 -0
  95. package/plugins/pi/memorix/skills/memorix-git-memory/SKILL.md +0 -26
  96. package/plugins/pi/memorix/skills/memorix-memory/SKILL.md +0 -51
  97. package/plugins/pi/memorix/skills/memorix-mini-skills/SKILL.md +0 -31
  98. package/plugins/pi/memorix/skills/memorix-orchestrate/SKILL.md +0 -28
  99. package/plugins/pi/memorix/skills/memorix-reasoning/SKILL.md +0 -30
  100. package/plugins/pi/memorix/skills/memorix-sessions/SKILL.md +0 -25
  101. package/plugins/pi/memorix/skills/memorix-troubleshooting/SKILL.md +0 -27
package/CHANGELOG.md CHANGED
@@ -4,7 +4,88 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
- No unreleased changes.
7
+ ### Fixed
8
+ - Embedding API requests now retry transport-level failures such as stale
9
+ keep-alive sockets, while preserving timeout, cancellation, and `retry = false`
10
+ behavior (#397).
11
+ - Large API embedding-cache restores yield through the timer phase in small
12
+ batches and start after provider initialization, keeping formation deadlines
13
+ and HTTP control-plane work responsive (#398).
14
+ - Fixed consolidation false positives for Korean and punctuation-only records;
15
+ queued automatic cleanup jobs now honor `auto_cleanup = false` at execution
16
+ time (#385).
17
+ - Observation writes now persist an idempotent CodeGraph/evidence projection
18
+ job in the same SQLite transaction; successful foreground projections
19
+ acknowledge it, while failures remain recoverable by maintenance.
20
+ - Added common `DerivedView` adapters for SQLite FTS5 and Orama with explicit
21
+ status, rebuild/refresh, compact, and close lifecycle methods.
22
+ - Added a CodeGraph `DerivedView` adapter for Lite refresh, status, SQLite
23
+ compaction, and lifecycle shutdown.
24
+ - Release workflow now runs automatically for published GitHub Releases and
25
+ requires npm visibility before MCP Registry publication.
26
+ - `memorix@1.10.3` is now publicly available on npm from the existing release
27
+ tag; its registry shasum is `46410b77e0808be58d445bdf2abafdac4f7ba718`.
28
+ - Workset assembly now accepts only request-scoped derived-view receipts,
29
+ preventing a concurrent search from leaking FTS/Orama state into context.
30
+
31
+ ### Changed
32
+ - Search execution now returns a request-scoped receipt to compact search,
33
+ index probes, and TUI chat, so concurrent requests cannot exchange diagnostics.
34
+ - Observation inserts and topic-key updates commit canonical SQLite rows with
35
+ vector, qualification, and claim-derivation jobs in one transaction.
36
+ - A deduplicated maintenance job records writes received while it is running
37
+ and schedules a follow-up pass, including after worker failure or lease loss.
38
+ - Maintenance progress now has one kernel result contract; negative, fractional,
39
+ non-finite, and inconsistent counts cannot be persisted as successful work.
40
+ - SDK, TUI, compact search, and MCP retrieval now share the RetrievalFacade;
41
+ feedback state is read from the active canonical store and reported separately
42
+ from embedding fallback.
43
+ - Topic-key updates publish their Orama projection only after the canonical
44
+ transaction commits; failed updates or linked-record callbacks leave the prior
45
+ searchable record intact.
46
+
47
+ ### Verification
48
+ - The 20-case context task matrix and the 40,000-record local store gate pass
49
+ on Windows/Node 22 with embeddings disabled. This is offline fixture evidence,
50
+ not a claim about remote embedding quality.
51
+
52
+ ## [1.10.4] - 2026-11-18
53
+
54
+ ### Fixed
55
+
56
+ - Embedding API requests retry transport-level failures such as stale
57
+ keep-alive sockets while preserving request deadlines, cancellation, and the
58
+ explicit retry opt-out (#397).
59
+ - Large API embedding-cache restores yield through the timer phase in bounded
60
+ batches and start after provider initialization, preventing cache recovery
61
+ from delaying formation deadlines (#398).
62
+
63
+ ### Changed
64
+
65
+ - CJK-heavy queries can use Lance neighbor order by default, with configuration
66
+ overrides and a hybrid fallback when the vector index is unavailable (#395).
67
+ - npm 1.10.4 release metadata is synchronized across agent plugins and MCP
68
+ Registry metadata.
69
+
70
+ ## [1.10.3] - 2026-11-05
71
+
72
+ ### Added
73
+ - Pi 1.0+ native MCP setup through project or user `mcp.json`, with stdio and
74
+ HTTP transports alongside the existing extension and shared skills (#367).
75
+
76
+ ### Fixed
77
+ - CodeGraph now retains two snapshots, sweeps stale derived symbols and edges,
78
+ compacts SQLite after cleanup, and supports `codegraph.auto_refresh`.
79
+ - Lazy large-corpus mode now initializes vector schema and backfills missing
80
+ vectors from durable SQLite/Lance state (#374).
81
+ - CJK-heavy search avoids fuzzy traversal over character and bigram tokens;
82
+ project affinity is bounded to a tie-break so strong lexical matches stay on
83
+ top (#373, #375).
84
+ - Dashboard and TUI browser launches no longer interpolate URLs into shell
85
+ commands; release workflows retain the existing tested action references.
86
+ - **Runcrate memory preset** -- optional background memory LLM processing
87
+ through an OpenAI-compatible endpoint for open-weight models, with an isolated
88
+ `RUNCRATE_API_KEY`, CLI/TUI setup and bilingual configuration guidance.
8
89
 
9
90
  ## [1.10.2] - 2026-10-30
10
91
 
package/README.md CHANGED
@@ -287,7 +287,7 @@ What it installs depends on the target agent, but the goal is the same: make Mem
287
287
  - Claude Code: installs the Memorix plugin package, adds `CLAUDE.md` guidance, and enables hook capture when you do not pass `--noHooks`.
288
288
  - Codex: installs one user-level Memorix plugin with bundled stdio MCP, skills, and lifecycle hooks. It does not write project-local `.codex` config or change your model, approval, or sandbox settings. When Codex asks, review the plugin hook definition once with `/hooks`; `--noHooks` skips automatic capture.
289
289
  - GitHub Copilot CLI: installs the Copilot plugin package and official Memorix skills.
290
- - Pi: installs the user-level Pi package and official skills.
290
+ - Pi: installs the Pi extension/skills package and native MCP config (Pi 1.0+): `~/.pi/agent/mcp.json` with `--global`, or `.pi/mcp.json` for project setup.
291
291
  - Cursor: writes Cursor MCP/rules/config entries in the chosen scope.
292
292
  - Gemini CLI: installs the extension package, `GEMINI.md` context, hooks, and skills. Antigravity CLI has an official Gemini CLI migration path, but Gemini CLI remains an active standalone target.
293
293
  - OpenCode: installs the local plugin file, `opencode.json`, skills, and `AGENTS.md` guidance.
@@ -539,6 +539,8 @@ For [API Route](https://www.api-route.com), choose API Route in `memorix init` o
539
539
 
540
540
  For [Cheaper Inference](https://cheaperinference.com), choose Cheaper Inference in `memorix init` or set `provider = "cheaperinference"` in `[memory.llm]`. The preset uses `https://api.cheaperinference.com/v1` and `gpt-5.4-mini`, with your own `CHEAPER_INFERENCE_API_KEY` or `MEMORIX_LLM_API_KEY`. It is opt-in memory LLM processing; embeddings and memcode's model registry are configured separately. See [configuration](docs/CONFIGURATION.md#cheaper-inference-memory-preset).
541
541
 
542
+ For [Runcrate](https://runcrate.ai), choose Runcrate in `memorix init` or set `provider = "runcrate"` in `[memory.llm]`. The preset uses `https://api.runcrate.ai/v1` and the open-weight `deepseek-ai/DeepSeek-V4.1-Flash`, with your own `RUNCRATE_API_KEY` or `MEMORIX_LLM_API_KEY`. It is opt-in memory LLM processing; embeddings and memcode's model registry are configured separately. See [configuration](docs/CONFIGURATION.md#runcrate-memory-preset).
543
+
542
544
  For controlled MiniMax media generation, set `MINIMAX_API_KEY` (global) or
543
545
  `MINIMAX_CN_API_KEY` (China region) in your environment or `.env`. The media
544
546
  library never stores that key, a signed output URL, or base64 payloads. CLI
package/README.zh-CN.md CHANGED
@@ -281,7 +281,7 @@ memorix setup --agent grok --global
281
281
  - Claude Code:安装 Memorix 插件包,写入 `CLAUDE.md` 使用规范;不加 `--noHooks` 时会启用自动捕获。
282
282
  - Codex:安装包含 stdio MCP、skills 和生命周期 hooks 的 Memorix 插件包,并写入 `AGENTS.md` 使用规范。Codex 首次要求时,在 `/hooks` 中审核一次插件 hook;使用 `--noHooks` 可跳过自动捕获。
283
283
  - GitHub Copilot CLI:安装 Copilot 插件包和官方 Memorix skills。
284
- - Pi:安装用户级 Pi package 和官方 skills。
284
+ - Pi:安装 Pi extension/skills package 和原生 MCP 配置(Pi 1.0+):`--global` 写入 `~/.pi/agent/mcp.json`,项目级安装写入 `.pi/mcp.json`。
285
285
  - Cursor:写入 Cursor 的 MCP / rules / 配置。
286
286
  - Gemini CLI:安装 extension package、`GEMINI.md` 上下文、hooks 和 skills。Antigravity CLI 有官方 Gemini CLI migration 路径,但 Gemini CLI 仍是活跃的独立 target。
287
287
  - OpenCode:安装本地插件文件、`opencode.json`、skills 和 `AGENTS.md` 指引。
@@ -512,6 +512,8 @@ OpenAI-compatible 的 `https://api.atlascloud.ai/v1` endpoint,并读取
512
512
 
513
513
  使用 [Cheaper Inference](https://cheaperinference.com) 时,可在 `memorix init` 中选择 Cheaper Inference,或在 `[memory.llm]` 中设置 `provider = "cheaperinference"`。预设使用 `https://api.cheaperinference.com/v1` 和 `gpt-5.4-mini`,密钥读取自己的 `CHEAPER_INFERENCE_API_KEY` 或 `MEMORIX_LLM_API_KEY`。这是显式启用的记忆 LLM 处理;embedding 和 memcode 模型注册表仍需单独配置。详见[配置说明](docs/CONFIGURATION.md#cheaper-inference-memory-preset)。
514
514
 
515
+ 使用 [Runcrate](https://runcrate.ai) 时,可在 `memorix init` 中选择 Runcrate,或在 `[memory.llm]` 中设置 `provider = "runcrate"`。预设使用 `https://api.runcrate.ai/v1` 和开放权重模型 `deepseek-ai/DeepSeek-V4.1-Flash`,密钥读取自己的 `RUNCRATE_API_KEY` 或 `MEMORIX_LLM_API_KEY`。这是显式启用的记忆 LLM 处理;embedding 和 memcode 模型注册表仍需单独配置。详见[配置说明](docs/CONFIGURATION.md#runcrate-memory-preset)。
516
+
515
517
  受控 MiniMax 媒体生成可在环境变量或 `.env` 中设置全局 `MINIMAX_API_KEY`,或中国区 `MINIMAX_CN_API_KEY`。媒体库不会保存该 key、临时签名 URL 或 base64 负载。CLI 生成本身就是显式操作;若要让 MCP 中的 Agent 发起生成,还必须明确设置 `MEMORIX_MCP_MEDIA_GENERATION=1`。
516
518
 
517
519
  <h2 id="docker"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-docker.svg"><img src="assets/tags/section-docker.svg" alt="Docker" height="32" /></picture></h2>