memorix 1.9.3 → 1.9.5

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 (65) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/README.md +7 -6
  3. package/README.zh-CN.md +7 -6
  4. package/dist/cli/index.js +930 -330
  5. package/dist/index.d.ts +3 -1
  6. package/dist/index.js +289 -109
  7. package/dist/maintenance-runner.js +179 -117
  8. package/dist/media-audio-runner.js +92 -30
  9. package/dist/media-video-runner.js +92 -30
  10. package/dist/memcode-runtime/CHANGELOG.md +49 -1
  11. package/dist/sdk.d.ts +1 -0
  12. package/dist/sdk.js +1050 -847
  13. package/dist/types.d.ts +1 -1
  14. package/dist/vector-backfill-runner.js +92 -30
  15. package/docs/AGENT_OPERATOR_PLAYBOOK.md +47 -3
  16. package/docs/API_REFERENCE.md +3 -1
  17. package/docs/CONFIGURATION.md +15 -1
  18. package/docs/DEVELOPMENT.md +1 -1
  19. package/docs/DOCKER.md +23 -3
  20. package/docs/INTEGRATIONS.md +1 -1
  21. package/docs/KNOWN_ISSUES_AND_ROADMAP.md +26 -1
  22. package/docs/MULTI-DEVICE-SYNC-RESEARCH.md +4 -0
  23. package/docs/README.md +1 -1
  24. package/docs/SETUP.md +55 -0
  25. package/package.json +2 -2
  26. package/plugins/antigravity/memorix/plugin.json +1 -1
  27. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  28. package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
  29. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  30. package/plugins/copilot/memorix/plugin.json +1 -1
  31. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  32. package/plugins/hermes/memorix/plugin.yaml +1 -1
  33. package/plugins/omp/memorix/package.json +1 -1
  34. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  35. package/plugins/pi/memorix/package.json +1 -1
  36. package/server.json +2 -2
  37. package/src/cli/command-guide.ts +2 -2
  38. package/src/cli/commands/agent-integrations.ts +57 -0
  39. package/src/cli/commands/background.ts +11 -2
  40. package/src/cli/commands/media.ts +2 -0
  41. package/src/cli/commands/serve-http.ts +193 -42
  42. package/src/cli/commands/setup.ts +77 -10
  43. package/src/cli/commands/sync-store.ts +47 -12
  44. package/src/cli/commands/sync.ts +26 -0
  45. package/src/dashboard/server.ts +10 -12
  46. package/src/integrations/registry.ts +1 -1
  47. package/src/media/minimax.ts +26 -2
  48. package/src/media/video-jobs.ts +9 -1
  49. package/src/memory/graph.ts +10 -8
  50. package/src/memory/session.ts +1 -1
  51. package/src/sdk.ts +24 -0
  52. package/src/server/mcp-binding-store.ts +14 -3
  53. package/src/server.ts +5 -3
  54. package/src/store/file-lock.ts +28 -3
  55. package/src/store/graph-store.ts +178 -46
  56. package/src/store/persistence.ts +14 -9
  57. package/src/store/sqlite-db.ts +6 -3
  58. package/src/store/sqlite-store.ts +32 -27
  59. package/src/sync/engine.ts +9 -7
  60. package/src/sync/namespace.ts +23 -0
  61. package/src/sync/policy.ts +19 -4
  62. package/src/sync/store-port.ts +43 -13
  63. package/src/sync/types.ts +2 -0
  64. package/src/types.ts +1 -1
  65. package/src/workspace/mcp-adapters/grok.ts +32 -0
package/CHANGELOG.md CHANGED
@@ -2,7 +2,55 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [Unreleased]
5
+ ## [1.9.5] - 2026-09-20
6
+
7
+ ### Added
8
+ - **Setup HTTP MCP** -- `memorix setup --mcp http` honors Grok (writes a
9
+ `[mcp_servers.memorix]` URL in Grok `config.toml`) and rewrites installed
10
+ plugin/extension bundled MCP manifests from `memorix serve` to
11
+ `http://localhost:3211/mcp`. Default Grok MCP stays host-owned. Docs include
12
+ generic systemd user unit and LaunchAgent KeepAlive examples for
13
+ `memorix serve-http`.
14
+ - **User-global store sync** -- `memorix sync store push|pull|status --scope user`
15
+ replicates every local project's eligible observations through the existing
16
+ opt-in relay. Default `--scope project` is unchanged. Privacy filters still
17
+ drop personal, agent-targeted, candidate, and ephemeral rows. The live
18
+ SQLite file is never copied.
19
+
20
+ ### Fixed
21
+ - **HTTP control-plane safety** -- JSON request bodies are bounded, non-loopback
22
+ binds require an explicit Bearer token or unsafe opt-in, listen failures are
23
+ reported synchronously, background startup removes unverified state, and
24
+ shutdown waits for HTTP and SQLite resources to close.
25
+ - **Project-scoped graph storage** -- graph entities and relations now carry a
26
+ project key, legacy JSONL migration recovers ownership from observation
27
+ references, and Dashboard/MCP graph access no longer crosses projects.
28
+ - **Migration and lifecycle reliability** -- legacy observation/subdirectory
29
+ migrations use locks and atomic writes, malformed observation JSON fails
30
+ closed, stale file locks cannot evict a live writer, stateless MCP bindings
31
+ expire and are cleaned up, and SDK clients share resources safely.
32
+ - **User-scope sync correctness** -- imported observation IDs are remapped on
33
+ collision, tombstones validate their source project, and user namespaces
34
+ must be explicit per-user values.
35
+ - **Release contract** -- publish workflow validates tag/version/commit
36
+ identity, waits for npm visibility before MCP Registry publication, and
37
+ keeps prepublish checks non-mutating.
38
+
39
+ ## [1.9.4] - 2026-09-18
40
+
41
+ ### Added
42
+ - **MiniMax first-frame video input** -- image-to-video generation now accepts
43
+ a public HTTPS first-frame image URL through the CLI and MCP surfaces,
44
+ preserves it in durable media jobs, and submits it with the provider's
45
+ `first_frame` image role.
46
+
47
+ ### Fixed
48
+ - **First-frame URL safety** -- rejects non-HTTPS URLs and embedded credentials
49
+ before a media request is submitted or persisted.
50
+
51
+ ### Changed
52
+ - **Grok Build documentation** -- the README comparison now uses the official
53
+ Grok Build logo assets.
6
54
 
7
55
  ## [1.9.3] - 2026-09-14
8
56
 
package/README.md CHANGED
@@ -89,7 +89,7 @@ Memorix is more than a memory store. It also installs agent integrations, keeps
89
89
  | Orchestration and team work | Task planning, worker handoffs, file locks, messages, verification gates, and review loops | `memorix orchestrate`, `memorix team`, `memorix lock` |
90
90
  | memcode | A bundled terminal coding agent that already reads and writes the same project memory | `memorix`, `memcode` |
91
91
  | CLI and SDK | Scriptable access for automation, imports/exports, diagnostics, and custom integrations | `memorix ...`, `createMemoryClient()` |
92
- | Optional multi-device sync | Project-scoped, privacy-filtered observation events with local SQLite kept canonical; GitHub JSONL, filesystem, S3, or Postgres relay | `memorix sync store status\|push\|pull` |
92
+ | Optional multi-device sync | Privacy-filtered observation events with local SQLite kept canonical; default project scope, optional `--scope user` for every local project; GitHub JSONL, filesystem, S3, or Postgres relay | `memorix sync store status\|push\|pull` |
93
93
 
94
94
  <h2 id="works-with-your-agent"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-agents.svg"><img src="assets/tags/section-agents.svg" alt="Works with every agent" height="32" /></picture></h2>
95
95
 
@@ -187,7 +187,7 @@ Memorix connects through the interfaces each agent already supports: plugin pack
187
187
  <sub>stdio or HTTP MCP</sub>
188
188
  </td>
189
189
  <td align="center" width="12.5%">
190
- <a href="https://github.com/xai-org/grok-build"><img src="https://github.com/xai-org.png?size=120" alt="Grok Build" width="48" height="48"></a><br>
190
+ <a href="https://github.com/xai-org/grok-build"><picture><source media="(prefers-color-scheme: dark)" srcset="https://media.x.ai/v1/website/spacexai-symbol-white-transparent-0c31957f.png"><img src="https://media.x.ai/v1/website/spacexai-symbol-black-transparent-6435cf42.png" alt="Grok Build" width="48" height="48"></picture></a><br>
191
191
  <strong>Grok Build</strong><br>
192
192
  <sub>native hooks + AGENTS.md</sub>
193
193
  </td>
@@ -225,9 +225,10 @@ CLI, MCP, and HTTP are different entry points:
225
225
 
226
226
  Multi-device store sync is opt-in and separate from HTTP sharing. It never
227
227
  uploads the live SQLite database or WAL files. By default it only relays
228
- qualified project-visible observations; personal, agent-targeted, candidate,
229
- ephemeral, and other-project records stay local. Set `MEMORIX_SYNC_PROVIDER` and
230
- inspect `memorix sync store status --json` before the first push.
228
+ qualified project-visible observations for the current Git project; personal,
229
+ agent-targeted, candidate, and ephemeral records stay local. Pass `--scope user`
230
+ to include every local project. Set `MEMORIX_SYNC_PROVIDER` and inspect
231
+ `memorix sync store status --json` before the first push.
231
232
 
232
233
  <h2 id="install"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-install.svg"><img src="assets/tags/section-install.svg" alt="Install" height="32" /></picture></h2>
233
234
 
@@ -298,7 +299,7 @@ What it installs depends on the target agent, but the goal is the same: make Mem
298
299
  - Oh-my-Pi: installs an `omp.extensions` package with extension hook events, a `memorix` command, official skills, and writes MCP config.
299
300
  - DeepSeek Harness: writes a Memorix `@deepseek-ai/dsh-mcp-client` row into `$DSH_HOME/cordis.patch.yml` (default `~/.dsh/cordis.patch.yml`), appends guidance to the harness `AGENTS.md`, and installs official skills under `$DSH_HOME/skills`. The row follows DSH's own shipped Memorix reference, so tools appear as `mcp__memorix__*`.
300
301
  - WorkBuddy: writes a Memorix MCP server row into `~/.workbuddy/mcp.json` (or `<project>/.workbuddy/mcp.json` for project installs) and appends guidance to `AGENTS.md`. Tools appear as `mcp__memorix__*`; there is no hooks surface.
301
- - Grok Build: installs native lifecycle hooks under `~/.grok/hooks/memorix.json` and guidance in `~/.grok/AGENTS.md`. It leaves Grok's MCP configuration host-owned; project-local hooks require Grok `/hooks-trust`, while global hooks are trusted. Set `GROK_HOME` to use a custom Grok home.
302
+ - Grok Build: installs native lifecycle hooks under `~/.grok/hooks/memorix.json` and guidance in `~/.grok/AGENTS.md`. MCP stays host-owned by default; pass `--mcp http` to write `[mcp_servers.memorix]` with `url = "http://localhost:3211/mcp"`. Project-local hooks require Grok `/hooks-trust`, while global hooks are trusted. Set `GROK_HOME` to use a custom Grok home.
302
303
 
303
304
  Need a quieter install? Add `--noHooks` for targets where setup can control hook capture separately from the host's official package entry. It keeps MCP and guidance, but skips Memorix hook capture.
304
305
 
package/README.zh-CN.md CHANGED
@@ -84,7 +84,7 @@ Memorix 不只是一个记忆库。它还负责安装 Agent 接入、保留有
84
84
  | Orchestration 和团队协作 | 任务规划、worker 交接、文件锁、消息、验证门和 review loop | `memorix orchestrate`、`memorix team`、`memorix lock` |
85
85
  | memcode | 内置终端 Coding Agent,默认读写同一套项目记忆 | `memorix`、`memcode` |
86
86
  | CLI 和 SDK | 给自动化、导入导出、诊断和自定义集成使用的本地接口 | `memorix ...`、`createMemoryClient()` |
87
- | 可选多设备同步 | 按项目隔离、经过隐私过滤的记忆事件同步;本地 SQLite 仍是主库 | `memorix sync store status\|push\|pull` |
87
+ | 可选多设备同步 | 经过隐私过滤的记忆事件同步;本地 SQLite 仍是主库;默认按当前项目,可用 `--scope user` 覆盖全部本地项目 | `memorix sync store status\|push\|pull` |
88
88
 
89
89
  <h2 id="支持你的-agent"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-agents.svg"><img src="assets/tags/section-agents.svg" alt="Works with every agent" height="32" /></picture></h2>
90
90
 
@@ -182,7 +182,7 @@ Memorix 通过目标 Agent 已有的接口接入:插件包、MCP、项目规
182
182
  <sub>stdio or HTTP MCP</sub>
183
183
  </td>
184
184
  <td align="center" width="12.5%">
185
- <a href="https://github.com/xai-org/grok-build"><img src="https://github.com/xai-org.png?size=120" alt="Grok Build" width="48" height="48"></a><br>
185
+ <a href="https://github.com/xai-org/grok-build"><picture><source media="(prefers-color-scheme: dark)" srcset="https://media.x.ai/v1/website/spacexai-symbol-white-transparent-0c31957f.png"><img src="https://media.x.ai/v1/website/spacexai-symbol-black-transparent-6435cf42.png" alt="Grok Build" width="48" height="48"></picture></a><br>
186
186
  <strong>Grok Build</strong><br>
187
187
  <sub>原生 hooks + AGENTS.md</sub>
188
188
  </td>
@@ -219,9 +219,10 @@ CLI、MCP 和 HTTP 是不同入口:
219
219
  - `memorix background start` / `memorix serve-http` 是 HTTP 服务,用于共享端点、Dashboard、VPS Docker 部署或多客户端。
220
220
 
221
221
  多设备记忆同步是可选功能,和 HTTP 共享服务不是一回事。它不会上传
222
- `memorix.db`、WAL 或 SHM 文件。默认只同步当前项目中已确认且项目可见的
223
- 观察记录;个人、指定 Agent、候选、短期和其它项目的记录会留在本地。设置
224
- `MEMORIX_SYNC_PROVIDER` 后,先运行 `memorix sync store status --json` 再 push。
222
+ `memorix.db`、WAL 或 SHM 文件。默认只同步当前 Git 项目中已确认且项目可见的
223
+ 观察记录;个人、指定 Agent、候选和短期记录会留在本地。传入 `--scope user`
224
+ 可覆盖全部本地项目。设置 `MEMORIX_SYNC_PROVIDER` 后,先运行
225
+ `memorix sync store status --json` 再 push。
225
226
 
226
227
  <h2 id="安装"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-install.svg"><img src="assets/tags/section-install.svg" alt="安装" height="32" /></picture></h2>
227
228
 
@@ -291,7 +292,7 @@ memorix setup --agent grok --global
291
292
  - CodeBuddy Code:安装用户级本地市场插件到 `~/.codebuddy/memorix-local`,包含 MCP、skills 和 hooks。它不会修改既有的 CodeBuddy 模型、权限或 settings 文件;第三方 hook 仍由 CodeBuddy 自己的 `/hooks` 流程确认。
292
293
  - Oh-my-Pi:安装 `omp.extensions` package,包含 extension hook 事件、`memorix` command、官方 skills,并写入 MCP 配置。
293
294
  - DeepSeek Harness:向 `$DSH_HOME/cordis.patch.yml`(默认 `~/.dsh/cordis.patch.yml`)写入一行 Memorix `@deepseek-ai/dsh-mcp-client`,向 harness 的 `AGENTS.md` 追加使用规范,并把官方 skills 安装到 `$DSH_HOME/skills`。这一行遵循 DSH 自带的 Memorix 参考配置,因此工具以 `mcp__memorix__*` 形式出现。
294
- - Grok Build:把原生生命周期 hooks 安装到 `~/.grok/hooks/memorix.json`,把使用规范写入 `~/.grok/AGENTS.md`。Grok 的 MCP 配置仍由 Grok 自己管理;项目级 hooks 需要在 Grok 中执行 `/hooks-trust`,全局 hooks 默认可信;也可以用 `GROK_HOME` 指定自定义 Grok 目录。
295
+ - Grok Build:把原生生命周期 hooks 安装到 `~/.grok/hooks/memorix.json`,把使用规范写入 `~/.grok/AGENTS.md`。默认仍由 Grok 自己管理 MCP;传入 `--mcp http` 时会写入 `[mcp_servers.memorix]`(`url = "http://localhost:3211/mcp"`)。项目级 hooks 需要在 Grok 中执行 `/hooks-trust`,全局 hooks 默认可信;也可以用 `GROK_HOME` 指定自定义 Grok 目录。
295
296
 
296
297
  如果你想要更安静一点的安装,可以对那些 setup 能独立控制 hook capture 的 target 加 `--noHooks`。它会保留 MCP 和使用规范,只跳过 Memorix 的 hook 自动捕获。
297
298