memorix 1.5.1 → 1.6.1
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 +47 -0
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/dist/cli/index.js +558 -102
- package/dist/cli/memcode.js +12 -1
- package/dist/index.js +221 -27
- package/dist/maintenance-runner.js +59 -11
- package/dist/media-audio-runner.js +59 -11
- package/dist/media-video-runner.js +59 -11
- package/dist/memcode-runtime/CHANGELOG.md +47 -0
- package/dist/sdk.js +220 -26
- package/dist/vector-backfill-runner.js +59 -11
- package/docs/1.2.4-PERSISTENT-MEMORY-DELIVERY.md +1 -1
- package/docs/AGENT_OPERATOR_PLAYBOOK.md +11 -3
- package/docs/API_REFERENCE.md +2 -2
- package/docs/DEVELOPMENT.md +5 -3
- package/docs/DOCKER.md +5 -1
- package/docs/PERFORMANCE.md +2 -2
- package/docs/README.md +3 -1
- package/docs/SETUP.md +8 -2
- package/package.json +1 -1
- package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
- package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
- package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/copilot/memorix/plugin.json +1 -1
- package/plugins/gemini/memorix/gemini-extension.json +1 -1
- package/plugins/omp/memorix/package.json +1 -1
- package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
- package/plugins/pi/memorix/package.json +1 -1
- package/server.json +2 -2
- package/src/cli/commands/agent-integrations.ts +9 -3
- package/src/cli/commands/codegraph.ts +48 -5
- package/src/cli/commands/context.ts +20 -4
- package/src/cli/commands/doctor.ts +46 -15
- package/src/cli/commands/hook.ts +13 -1
- package/src/cli/commands/resume.ts +4 -0
- package/src/cli/commands/serve-http.ts +68 -7
- package/src/cli/heap.ts +76 -0
- package/src/cli/invocation.ts +7 -4
- package/src/codegraph/auto-context.ts +4 -1
- package/src/codegraph/context-pack.ts +3 -1
- package/src/codegraph/external-provider.ts +93 -0
- package/src/embedding/provider.ts +76 -6
- package/src/hooks/handler.ts +9 -18
- package/src/hooks/installers/index.ts +1 -1
- package/src/hooks/lifecycle.ts +173 -0
- package/src/hooks/official-skills.ts +3 -3
- package/src/hooks/rules/memorix-agent-rules.md +1 -1
- package/src/knowledge/context-receipt.ts +41 -0
- package/src/knowledge/workflows.ts +6 -3
- package/src/knowledge/workset.ts +56 -2
- package/src/server.ts +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,53 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.6.1] - 2026-08-17
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **Bounded hook lifecycle on every desktop platform** -- `memorix hook` now
|
|
11
|
+
reads stdin with an idle bound, performs embedding writes in the deferred
|
|
12
|
+
lane, and has a hard process deadline. The hook-specific V8 heap is 512 MiB
|
|
13
|
+
instead of the control plane's 4 GiB. This prevents hung hook processes and
|
|
14
|
+
associated CPU or memory pressure on macOS, Windows, and Linux. The Windows
|
|
15
|
+
CLI heap restart also hides its child console window.
|
|
16
|
+
- **Recoverable HTTP MCP sessions** -- HTTP MCP sessions now default to a
|
|
17
|
+
12-hour idle window. An expired or unknown session receives a fast `404`
|
|
18
|
+
with a reinitialize hint instead of looking like a silent client hang. Set
|
|
19
|
+
`MEMORIX_SESSION_TIMEOUT_MS=0` only when the host owns lifecycle cleanup.
|
|
20
|
+
- **Truthful embedding diagnostics** -- the HTTP control plane exposes its
|
|
21
|
+
real runtime embedding state. `memorix doctor` reads that state instead of
|
|
22
|
+
reporting a fresh local probe as ready while the running service is degraded
|
|
23
|
+
by authorization, billing, timeout, or upstream failure.
|
|
24
|
+
- **Accurate doctor JSON health** -- a live PID with an unreachable HTTP
|
|
25
|
+
control plane now reports `healthy: false` rather than a false positive.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **macOS release coverage** -- normal CI now runs the full build and test
|
|
29
|
+
suite on `macos-latest` in addition to Ubuntu and Windows.
|
|
30
|
+
|
|
31
|
+
## [1.6.0] - 2026-08-17
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- **Bounded context receipts** -- `memorix context|resume --brief-json`,
|
|
35
|
+
`memorix codegraph context-pack --brief-json`, and MCP project-context
|
|
36
|
+
`format: "receipt"` return only the agent-ready brief, selection receipt,
|
|
37
|
+
CodeGraph quality, and optional Agent loadout. The detailed `--json` and
|
|
38
|
+
MCP `format: "json"` forms remain available for diagnostics.
|
|
39
|
+
- **Task-scoped Agent loadouts** -- `--agent <target>` selects only compatible
|
|
40
|
+
project workflows and reports their required context and workflow tools.
|
|
41
|
+
This is guidance, not a replacement for the host agent's authorization.
|
|
42
|
+
- **Explicit external CodeGraph lifecycle** -- `memorix codegraph init|sync`
|
|
43
|
+
manages an already installed local CodeGraph index. It never invokes
|
|
44
|
+
CodeGraph's agent installer or writes Agent configuration.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- **Honest CodeGraph status** -- Status now distinguishes the persistent Lite
|
|
48
|
+
Code State index from the provider actually usable for the current task.
|
|
49
|
+
A stale external graph falls back to Lite instead of being presented as fresh.
|
|
50
|
+
- **Bounded fallback guidance** -- Newly generated Agent rules teach
|
|
51
|
+
`--brief-json` for the one CLI fallback; `--json` is reserved for deliberate
|
|
52
|
+
detailed diagnostics.
|
|
53
|
+
|
|
7
54
|
## [1.5.1] - 2026-08-16
|
|
8
55
|
|
|
9
56
|
### Fixed
|
package/README.md
CHANGED
|
@@ -70,10 +70,10 @@ Memorix is more than a memory store. It also installs agent integrations, keeps
|
|
|
70
70
|
|
|
71
71
|
| Capability | What it does | Entry point |
|
|
72
72
|
| --- | --- | --- |
|
|
73
|
-
| Memory Autopilot | A bounded task Workset with start files, current memory, source-backed knowledge, workflow starts, cautions, and verification | `memorix context "..."`, `memorix resume "..."`, `memorix_project_context` |
|
|
73
|
+
| Memory Autopilot | A bounded task Workset with start files, current memory, source-backed knowledge, workflow starts, cautions, and verification. Compact JSON receipts keep fallback CLI use bounded too. | `memorix context "..." --brief-json`, `memorix resume "..." --brief-json`, `memorix_project_context` |
|
|
74
74
|
| Observation Memory | Searchable facts, fixes, gotchas, session summaries, and implementation notes scoped to the current Git project | `memorix memory`, MCP memory tools |
|
|
75
75
|
| Curated Long-term Memory | Deliberately reviewed episodic, semantic, and procedural memory with source evidence. Only an explicitly portable user item can cross local projects | `memorix memory long-term` |
|
|
76
|
-
| Code State and Code Memory | Versioned local code snapshots, file/symbol links, and freshness checks. The built-in Lite index is always honest about its limits; an already-indexed local CodeGraph can add a bounded semantic outline | `memorix codegraph`, automatic context refresh |
|
|
76
|
+
| Code State and Code Memory | Versioned local code snapshots, file/symbol links, and freshness checks. The built-in Lite index is always honest about its limits; an already-indexed local CodeGraph can add a bounded semantic outline and is only used when fresh. | `memorix codegraph status\|init\|sync`, automatic context refresh |
|
|
77
77
|
| Git Memory | Commit-derived engineering facts that answer what changed, where, and why it matters | `memorix ingest commit`, git hook |
|
|
78
78
|
| Reasoning Memory | Design rationale, alternatives, trade-offs, and risks that should survive beyond one chat | `memorix reasoning`, memory formation |
|
|
79
79
|
| Knowledge Workspace | Review-gated source-backed claims, Markdown pages, and canonical project workflows; proposals never overwrite reviewed pages silently | `memorix knowledge`, `memorix knowledge workflow` |
|
|
@@ -437,7 +437,7 @@ Search is project-scoped by default. `scope="global"` searches across projects.
|
|
|
437
437
|
|
|
438
438
|
Long-term memory is deliberately not an automatic dump of every note. A source observation, Claim, workflow, session, and code snapshot keep their existing roles. An agent may ask `memorix_store` to create an additional long-term record; an explicit request auto-qualifies and enters task briefs as a durable anchor, while hook-captured or Git-derived candidates stay pending until qualified. Approval stays an explicit operator review. Use `memorix memory long-term approve|archive|supersede` to record the evidence-backed lifecycle. Only a manually created or user-confirmed `user + portable` item may be considered in another local project; project code, Git facts, tests, workflows, sessions, and observations cannot be promoted into portable user memory.
|
|
439
439
|
|
|
440
|
-
`memorix context "..."` is the default Memory Autopilot entry. It builds a compact task-lensed brief for agents: bugfix tasks lean toward tests and repros, release tasks lean toward package/changelog/build checks, onboarding tasks lean toward docs and entry points, and stale or unrelated memories stay in warning lanes instead of flooding the prompt. A normal new task does not receive an old-session dump. For an explicit continuation, `memorix resume "..."` adds only the latest useful session summary, up to three readable durable anchors, and at most one recent source-labelled host compact checkpoint. A durable anchor carries a `durable:<id>` reference, so an agent can expand the full reviewed record through `memorix_detail` only when needed. Keyword matches stay primary; when no reviewed durable item matches and an embedding provider is configured, Memorix makes one 1.8-second, no-retry semantic fallback for paraphrases or cross-language tasks. A slow or unavailable provider simply leaves the normal keyword-only Workset intact. A checkpoint is lifecycle evidence, not durable memory or a transcript backup. Agents should read the suggested files before trusting stored memory.
|
|
440
|
+
`memorix context "..."` is the default Memory Autopilot entry. It builds a compact task-lensed brief for agents: bugfix tasks lean toward tests and repros, release tasks lean toward package/changelog/build checks, onboarding tasks lean toward docs and entry points, and stale or unrelated memories stay in warning lanes instead of flooding the prompt. Use `--brief-json` when a CLI fallback needs the same bounded brief plus a receipt of what was selected or omitted; `--json` remains the detailed diagnostic form. A normal new task does not receive an old-session dump. For an explicit continuation, `memorix resume "..."` adds only the latest useful session summary, up to three readable durable anchors, and at most one recent source-labelled host compact checkpoint. A durable anchor carries a `durable:<id>` reference, so an agent can expand the full reviewed record through `memorix_detail` only when needed. Keyword matches stay primary; when no reviewed durable item matches and an embedding provider is configured, Memorix makes one 1.8-second, no-retry semantic fallback for paraphrases or cross-language tasks. A slow or unavailable provider simply leaves the normal keyword-only Workset intact. A checkpoint is lifecycle evidence, not durable memory or a transcript backup. Agents should read the suggested files before trusting stored memory.
|
|
441
441
|
|
|
442
442
|
<h2 id="runtime-modes"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-runtime.svg"><img src="assets/tags/section-runtime.svg" alt="Runtime Modes" height="32" /></picture></h2>
|
|
443
443
|
|
package/README.zh-CN.md
CHANGED
|
@@ -69,10 +69,10 @@ Memorix 不只是一个记忆库。它还负责安装 Agent 接入、保留有
|
|
|
69
69
|
|
|
70
70
|
| 能力 | 作用 | 入口 |
|
|
71
71
|
| --- | --- | --- |
|
|
72
|
-
| Memory Autopilot | 给新 Agent session 一份有预算的任务 Workset
|
|
72
|
+
| Memory Autopilot | 给新 Agent session 一份有预算的任务 Workset,包含起步文件、当前记忆、来源知识、工作流首步、风险提示和验证建议。CLI 回退可用紧凑 JSON 回执,不再读取整套内部对象。 | `memorix context "..." --brief-json`、`memorix resume "..." --brief-json`、`memorix_project_context` |
|
|
73
73
|
| Observation Memory | 当前 Git 项目内可检索的事实、修复、坑点、session 摘要和实现记录 | `memorix memory`、MCP memory tools |
|
|
74
74
|
| 受管理的长期记忆 | 有来源证据、可审核的情景/语义/程序记忆;只有明确标为可携带的用户记忆才可在本机跨项目使用 | `memorix memory long-term` |
|
|
75
|
-
| Code State 和 Code Memory | 可版本化的本地代码快照、文件 / symbol 关联和 freshness 检查。内置 Lite 会如实说明边界;已有本地索引的 CodeGraph
|
|
75
|
+
| Code State 和 Code Memory | 可版本化的本地代码快照、文件 / symbol 关联和 freshness 检查。内置 Lite 会如实说明边界;已有本地索引的 CodeGraph 可额外给出有预算的语义关系,但只有新鲜时才会用于任务。 | `memorix codegraph status\|init\|sync`、自动 context refresh |
|
|
76
76
|
| Git Memory | 从 commit 中提取工程事实,回答改了什么、在哪里改、为什么重要 | `memorix ingest commit`、git hook |
|
|
77
77
|
| Reasoning Memory | 保存设计原因、备选方案、trade-off 和风险,不让决策只留在一次聊天里 | `memorix reasoning`、memory formation |
|
|
78
78
|
| Knowledge Workspace | 有审核门槛的来源证据 Claim、Markdown 知识页和规范化项目工作流;提案不会悄悄覆盖已审阅页面 | `memorix knowledge`、`memorix knowledge workflow` |
|
|
@@ -420,7 +420,7 @@ memcode
|
|
|
420
420
|
|
|
421
421
|
长期记忆不是把所有笔记自动堆进去。Observation、Claim、工作流、session 和代码快照仍各自承担原来的职责。Agent 可以在 `memorix_store` 时要求额外生成长期记忆**候选**,但候选绝不会自动进入任务上下文;用 `memorix memory long-term qualify|approve|archive|supersede` 留下带证据的生命周期记录。只有人工创建或用户确认的 `user + portable` 记忆,才可能在同一台机器的其它项目中按任务相关性被使用;项目代码、Git 事实、测试、工作流、session 和 Observation 都不能被提升成可携带的用户记忆。
|
|
422
422
|
|
|
423
|
-
`memorix context "..."` 是默认的 Memory Autopilot 入口。它会按任务生成紧凑 brief:修 bug 时偏向测试和复现,发版时偏向 package/changelog/build 检查,接手项目时偏向文档和入口文件;过期或不相关的记忆只作为 warning,不会一股脑塞进 prompt
|
|
423
|
+
`memorix context "..."` 是默认的 Memory Autopilot 入口。它会按任务生成紧凑 brief:修 bug 时偏向测试和复现,发版时偏向 package/changelog/build 检查,接手项目时偏向文档和入口文件;过期或不相关的记忆只作为 warning,不会一股脑塞进 prompt。CLI 回退需要结构化结果时用 `--brief-json`,它只返回同一份有预算的 brief 和“选了什么、略了什么”的回执;`--json` 保留给详细诊断。普通新任务不会自动得到旧会话的文本倾倒;明确要继续之前工作时,用 `memorix resume "..."`,只会补入最近一份有用的会话总结、最多三条当前可读的长期记忆锚点,以及最多一条带来源标识的近期宿主压缩检查点。每个长期锚点都有 `durable:<id>` 引用,Agent 只在确实需要完整已审核记录时才通过 `memorix_detail` 展开。关键词仍优先;没有命中而且用户已配置 embedding 时,Memorix 才会做一次 1.8 秒、不重试的语义回退,用于模型改写或跨语言任务。服务变慢或不可用时,正常的关键词 Workset 会原样返回。检查点只是生命周期证据,不是长期记忆,也不是聊天记录备份。Agent 应该先读 suggested files,再相信历史记忆。
|
|
424
424
|
|
|
425
425
|
<h2 id="运行模式"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-runtime.svg"><img src="assets/tags/section-runtime.svg" alt="运行模式" height="32" /></picture></h2>
|
|
426
426
|
|