memorix 1.7.3 → 1.8.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/dist/cli/index.js +1488 -270
  5. package/dist/dashboard/static/app.js +125 -27
  6. package/dist/dashboard/static/index.html +11 -1
  7. package/dist/dashboard/static/style.css +86 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +927 -240
  10. package/dist/maintenance-runner.js +607 -68
  11. package/dist/media-audio-runner.js +602 -63
  12. package/dist/media-video-runner.js +607 -68
  13. package/dist/memcode-runtime/CHANGELOG.md +41 -0
  14. package/dist/sdk.js +926 -239
  15. package/dist/types.d.ts +8 -0
  16. package/dist/vector-backfill-runner.js +607 -68
  17. package/docs/1.2.4-PERSISTENT-MEMORY-DELIVERY.md +1 -1
  18. package/docs/1.8.0-RELEASE-CANDIDATE-SPEC.md +75 -0
  19. package/docs/API_REFERENCE.md +39 -1
  20. package/docs/ARCHITECTURE.md +3 -1
  21. package/docs/DASHBOARD.md +16 -0
  22. package/docs/DEVELOPMENT.md +3 -2
  23. package/docs/INTEGRATIONS.md +1 -1
  24. package/docs/README.md +15 -2
  25. package/package.json +1 -1
  26. package/plugins/antigravity/memorix/rules/memorix.md +1 -1
  27. package/plugins/claude/memorix/.claude-plugin/plugin.json +1 -1
  28. package/plugins/claude/memorix/SKILL.md +1 -1
  29. package/plugins/claude/memorix/skills/memorix-memory/SKILL.md +2 -2
  30. package/plugins/codebuddy/memorix/.codebuddy-plugin/plugin.json +1 -1
  31. package/plugins/codebuddy/memorix/skills/memorix-memory/SKILL.md +2 -2
  32. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  33. package/plugins/codex/memorix/skills/memorix-memory/SKILL.md +2 -2
  34. package/plugins/copilot/memorix/plugin.json +1 -1
  35. package/plugins/copilot/memorix/skills/memorix-memory/SKILL.md +2 -2
  36. package/plugins/cursor/memorix/skills/memorix-memory/SKILL.md +2 -2
  37. package/plugins/gemini/memorix/GEMINI.md +1 -1
  38. package/plugins/gemini/memorix/gemini-extension.json +1 -1
  39. package/plugins/omp/memorix/package.json +1 -1
  40. package/plugins/openclaw/memorix/.codex-plugin/plugin.json +1 -1
  41. package/plugins/pi/memorix/package.json +1 -1
  42. package/plugins/pi/memorix/skills/memorix-memory/SKILL.md +2 -2
  43. package/server.json +2 -2
  44. package/src/cli/capability-map.ts +2 -0
  45. package/src/cli/commands/context.ts +11 -0
  46. package/src/cli/commands/dashboard.ts +1 -1
  47. package/src/cli/commands/evidence.ts +56 -0
  48. package/src/cli/commands/feedback.ts +58 -0
  49. package/src/cli/commands/resume.ts +2 -0
  50. package/src/cli/commands/serve-http.ts +229 -13
  51. package/src/cli/fallback-budget.ts +59 -0
  52. package/src/cli/index.ts +5 -1
  53. package/src/compact/engine.ts +26 -1
  54. package/src/config/dotenv-loader.ts +17 -0
  55. package/src/dashboard/config-provenance.ts +17 -0
  56. package/src/dashboard/evidence.ts +63 -0
  57. package/src/dashboard/server.ts +178 -154
  58. package/src/dashboard/static/index.html +11 -1
  59. package/src/dashboard/static/style.css +86 -0
  60. package/src/hooks/installers/index.ts +1 -1
  61. package/src/hooks/official-skills.ts +3 -3
  62. package/src/hooks/rules/memorix-agent-rules.md +1 -1
  63. package/src/memory/feedback-model.ts +4 -0
  64. package/src/memory/feedback.ts +220 -0
  65. package/src/memory/observations.ts +19 -0
  66. package/src/memory/retention.ts +38 -5
  67. package/src/server/mcp-binding-store.ts +79 -0
  68. package/src/server/mcp-diagnostics.ts +40 -0
  69. package/src/server/tool-profile.ts +4 -0
  70. package/src/server.ts +125 -5
  71. package/src/store/evidence-store.ts +261 -0
  72. package/src/store/sqlite-db.ts +104 -0
  73. package/src/types.ts +8 -0
@@ -26,7 +26,7 @@ database, a transcript archive, or another default MCP tool.
26
26
  | Start a new, unrelated task | A bounded task Workset. No automatic prior-session text. |
27
27
  | Continue or take over prior work | The same Workset plus a bounded prior-work projection. |
28
28
  | MCP is available | Use the existing `memorix_project_context` tool with the real task. |
29
- | MCP is unavailable | Make one CLI call: `memorix resume "<task>" --brief-json` for continuation or `memorix context "<task>" --brief-json` for a new task. `--json` remains the detailed diagnostic form. |
29
+ | MCP is unavailable | Make one CLI fallback call: `memorix resume "<task>" --fallback --brief-json` for continuation or `memorix context "<task>" --fallback --brief-json` for a new task. The fallback budget rejects repeated probes; `--json` remains the detailed diagnostic form. |
30
30
  | Claude Code hook is installed | An explicit continuation prompt receives the same bounded prior-work Workset through the official `UserPromptSubmit` context channel, unless `memory.inject = "silent"`. |
31
31
  | Read-only assessment | The brief may be read, but Memorix does not persist a new observation unless the user explicitly asks to save one. |
32
32
  | Need a deliberate session handoff | Keep using the explicit session/handoff surfaces; this projection does not replace them. |
@@ -0,0 +1,75 @@
1
+ # Memorix 1.8.0 Release Candidate Specification
2
+
3
+ Status: accepted implementation contract for Memorix 1.8.0.
4
+
5
+ ## Acceptance Checklist
6
+
7
+ - [x] Keep one canonical release document and update the documentation map.
8
+ - [x] Expose MCP protocol diagnostics without changing existing defaults.
9
+ - [x] Preserve legacy stateful Streamable HTTP and stdio clients.
10
+ - [x] Return bounded evidence cards from persisted project graph state.
11
+ - [x] Provide a deterministic memory feedback reducer, SQLite event persistence,
12
+ auditable MCP/CLI adapters, and a unified retrieval/retention projection.
13
+ - [x] Keep the default MCP profile compact and preserve the full profile contract.
14
+ - [x] Provide dashboard evidence/provenance views without replacing the existing UI.
15
+ - [x] Preserve explicit project/session handles across restart and client shapes.
16
+ - [x] Verify CLI fallback, Windows child-process hiding, HTTP old/new smoke, build, and package contents.
17
+
18
+ ## Compatibility Contract
19
+
20
+ The MCP 2026-07-28 protocol is the external stateless request contract.
21
+ Memorix also accepts the legacy stateful Streamable HTTP contract with
22
+ `Mcp-Session-Id`. Stateless requests carry an explicit `Mcp-Project-Handle`
23
+ that is persisted in SQLite and survives service restart; the handle, rather
24
+ than a transport session id, owns project routing. The pinned SDK's accepted
25
+ wire version is normalized internally at the HTTP boundary, while responses
26
+ continue to advertise current protocol metadata. Unsupported Tasks/polling is
27
+ reported by capability diagnostics rather than simulated.
28
+
29
+ Antigravity is the primary setup target. Gemini CLI remains a compatibility and
30
+ migration path. GitHub issue #204 (WorkBuddy) is intentionally not merged or
31
+ used as release evidence.
32
+
33
+ ## Evidence Architecture
34
+
35
+ Consumers are both humans and agents. Markdown remains the human source of
36
+ truth; SQLite graph records and bounded evidence cards are the agent index.
37
+ Retrieval is hybrid/graph-assisted, but never a full graph dump. Supported
38
+ relations are persisted through the existing graph store and may reference
39
+ files, symbols, calls/imports, tests, scripts, commits, dependencies,
40
+ failures, memory, and source. Non-TypeScript/JavaScript projects use the
41
+ existing graceful fallback and report coverage honestly.
42
+
43
+ ## Memory Feedback Contract
44
+
45
+ The lifecycle is capture -> qualify -> recall -> use -> feedback ->
46
+ strengthen/weaken -> archive/forget. Feedback is auditable and deterministic.
47
+ Supported signals are user correction, verification success/failure, code
48
+ change, use/non-use, and conflict with current code. Positive feedback raises
49
+ retrieval weight; negative or conflicting feedback lowers it and can make a
50
+ record eligible for archive. Recovery is explicit and auditable.
51
+
52
+ The 1.8.0 release ships the reducer, durable state/event tables, MCP and CLI
53
+ surfaces, revoke events, and tests for these rules. A legacy record without a
54
+ feedback event keeps its historical retrieval/retention score; the first
55
+ explicit feedback event opts it into the feedback projection.
56
+
57
+ ## Evidence and Operator Surface
58
+
59
+ Every observation write creates or refreshes a project-scoped evidence card with
60
+ source kind, source reference, locator, captured hash, files, and freshness.
61
+ Changed paths can mark cards stale without deleting their source memory. The
62
+ `memorix_evidence` MCP tool, `memorix evidence` CLI command, and Dashboard
63
+ Evidence page expose the same persisted cards and audit events.
64
+
65
+ When MCP discovery is unavailable, `memorix context --fallback` uses a durable
66
+ one-shot budget keyed by project and task. Repeated help/search/status probing
67
+ is rejected for that task window.
68
+
69
+ ## Explicit Non-goals for 1.8.0
70
+
71
+ - No fake MCP Tasks/polling implementation when the pinned SDK does not expose
72
+ a durable server-side task contract.
73
+ - No remote memory hub, proxying of model traffic, or upstream installer.
74
+ - No claim that the bundled Lite parser is a semantic CodeGraph.
75
+ - No marketing landing page in place of an operator evidence console.
@@ -103,7 +103,7 @@ memorix context "continue auth bug"
103
103
  memorix resume "continue auth bug"
104
104
  memorix checkpoint list
105
105
  memorix checkpoint context --task "continue auth bug"
106
- memorix context --task "prepare 1.1.7 release"
106
+ memorix context --task "prepare 1.8.0 release"
107
107
  memorix explain
108
108
  memorix codegraph context-pack --task "continue auth bug"
109
109
  ```
@@ -123,6 +123,42 @@ SessionStart hooks keep the default minimal hint lightweight. When memory behavi
123
123
 
124
124
  The intended loop for agents is: get the project brief when it helps, inspect the suggested current files, use stale or unbound memory only as a lead, store durable outcomes after the work changes the project, and resolve obsolete memories.
125
125
 
126
+ ### Evidence Cards and Feedback
127
+
128
+ Evidence Cards are the persisted provenance index for project memory. They do
129
+ not replace the observation, source file, commit, or test they point to. Every
130
+ observation write creates or refreshes a card with `sourceRef`, `locator`,
131
+ `capturedHash`, project ownership, files, verification state, and freshness.
132
+
133
+ CLI:
134
+
135
+ ```bash
136
+ memorix evidence list --json
137
+ memorix evidence get --id 42 --json
138
+ memorix evidence stale --paths src/server.ts,tests/server.test.ts --json
139
+ memorix feedback record --id 42 --signal verification-success --source test:run-1 --json
140
+ memorix feedback audit --id 42 --json
141
+ ```
142
+
143
+ MCP uses `memorix_evidence` for `list`, `get`, `sync`, `stale`, and `events`,
144
+ and `memorix_feedback` for `record`, `show`, and `audit`. Feedback events are
145
+ append-only; `revoke` points at the event being undone, so the audit history is
146
+ preserved. A memory without explicit feedback keeps the legacy relevance and
147
+ retention score. The first feedback event opts that candidate into the
148
+ feedback projection.
149
+
150
+ ### HTTP MCP Compatibility
151
+
152
+ Legacy clients use stateful Streamable HTTP with `Mcp-Session-Id`. Current
153
+ stateless clients send `Mcp-Protocol-Version: 2026-07-28` and receive a durable
154
+ `Mcp-Project-Handle`. Send that handle on subsequent requests; it is persisted
155
+ in SQLite and remains valid across service restart until its TTL expires.
156
+ `/protocol-diagnostics` reports the current/legacy contract and explicitly
157
+ reports Tasks and polling as unsupported when the pinned SDK cannot provide a
158
+ durable implementation. When MCP discovery is unavailable, use one bounded
159
+ `memorix context --fallback` request for a task; repeated fallback probing is
160
+ rejected by the local budget.
161
+
126
162
  The built-in Lite provider indexes common code files with lightweight file, symbol, and import facts. It is a structural fallback, not a language-server-quality graph. When a project already has a healthy local CodeGraph index, `[codegraph].external_context = "auto"` may add a validated, bounded semantic outline to the Workset. Memorix never initializes, syncs, or exports that external index, and never stores its raw source output. `memorix codegraph status --json`, `memorix doctor --json`, and Project Context JSON identify the actual provider quality.
127
163
 
128
164
  ### Knowledge Workspace and Workflows
@@ -828,6 +864,8 @@ Important inputs:
828
864
 
829
865
  When using HTTP mode, the main dashboard is usually served from the same port as `serve-http`.
830
866
 
867
+ The Dashboard's Coordination Status page is read-only. It reads the selected project's agents, tasks, locks, handoffs, messages, and poll state from the persistent SQLite `TeamStore`; it does not expose team/task write endpoints or replace task execution and orchestration tools. A coordination read failure is returned as an explicit degraded/error response rather than an empty healthy snapshot.
868
+
831
869
  ---
832
870
 
833
871
  ## 12. Optional Graph Compatibility Tools
@@ -498,7 +498,9 @@ It provides an operational view for:
498
498
  - sessions
499
499
  - retention state
500
500
  - preview-first cleanup, consolidation, intelligent deduplication, and retention archival
501
- - read-only orchestration coordination state in the standalone dashboard and live state in HTTP service mode
501
+ - read-only Coordination Status derived from the project-scoped SQLite `TeamStore`; the page is a projection, not a task execution surface
502
+
503
+ `TeamStore` is the real persistent coordination layer for agents, tasks, messages, locks, handoffs, and poll state. Dashboard coordination reads use that same SQLite state and return an explicit degraded/error status when it cannot be read; they must not substitute a normal-looking empty snapshot.
502
504
 
503
505
  Dashboard maintenance is not a separate business-logic implementation. CLI, MCP, background jobs, and Dashboard routes share the same cleanup, consolidation, deduplication, and retention functions. Mutation routes issue a project-bound signed preview token and reject execution when the candidate set changed after preview.
504
506
 
package/docs/DASHBOARD.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  The Memorix Dashboard is the local control surface for inspecting project memory and running explicit maintenance. It is available through the shared background service or as a standalone local process.
4
4
 
5
+ The 1.8.0 Evidence page is the operator view of the same source-backed cards
6
+ used by MCP and CLI. It shows each card's source reference, locator, captured
7
+ hash, freshness, verification state, and audit-event count. It is project
8
+ scoped and does not replace the underlying observation or code source.
9
+
5
10
  ## Start
6
11
 
7
12
  ```bash
@@ -14,6 +19,12 @@ memorix dashboard
14
19
 
15
20
  Both modes read the same project-scoped stores. The project switcher changes the active project filter; it does not merge projects or grant access to personal memories.
16
21
 
22
+ ## Coordination Status
23
+
24
+ The Coordination Status page is a read-only projection of the selected project's persistent coordination state. `TeamStore` is the canonical SQLite layer for agents, tasks, messages, locks, handoffs, and poll state; the Dashboard does not keep a second in-memory coordination registry.
25
+
26
+ The page reports agents, task status, file locks, and handoffs for the selected project. It exposes no team or task write endpoints and is not a task execution or full orchestration platform. If the SQLite read fails, the API returns an explicit degraded/error status and the page shows that the status is unavailable instead of presenting an empty result as healthy.
27
+
17
28
  ## Maintenance Workbench
18
29
 
19
30
  The Observations page exposes three explicit maintenance actions:
@@ -52,3 +63,8 @@ POST /api/maintenance/retention/execute
52
63
  ```
53
64
 
54
65
  Use the CLI for scripts and remote terminals. Use MCP for agent-driven maintenance. The Dashboard is the reviewable local operator surface; all three call the same maintenance logic.
66
+
67
+ The control-plane API also exposes `GET /api/evidence?project=<id>` for the
68
+ bounded Evidence Console payload. The page is responsive at desktop, tablet,
69
+ and narrow mobile widths; long paths wrap instead of widening the viewport,
70
+ and maintenance dialogs remain viewport-centered.
@@ -13,8 +13,8 @@ Memorix is a TypeScript project built around:
13
13
 
14
14
  ## Current Development Baseline
15
15
 
16
- The current release work targets the **1.7 line** while package metadata may
17
- still show the last published version until the release commit is cut.
16
+ The current release work targets the **1.8.1 release line** and package metadata
17
+ is kept at `1.8.1` for this release commit.
18
18
 
19
19
  Contributors should assume the following areas are part of the current release line:
20
20
 
@@ -29,6 +29,7 @@ Contributors should assume the following areas are part of the current release l
29
29
  - the existing layered retrieval, retention, attribution, and compact output model
30
30
  - source-backed long-term memory with candidate, qualification, approval, archival, supersession, and explicit portable user scope
31
31
  - preview-first project maintenance shared across Dashboard, CLI, and MCP
32
+ - persisted Evidence Cards, feedback audit events, and stateless MCP project handles
32
33
  - the reproducible large-store gate for SDK, HTTP MCP, hooks, persistence, and
33
34
  cold-start retrieval budgets
34
35
 
@@ -61,7 +61,7 @@ Generated guidance also has scope:
61
61
  | Pi | `memorix setup --agent pi --global` | Pi package | User Pi package with extension and official skills, registered through `pi install <path> --approve` | Run without `--global` only when you want a project-local Pi package. Pi currently does not need a separate Memorix MCP config lane. |
62
62
  | Windsurf | `memorix setup --agent windsurf --global` | Windsurf MCP/rules/hooks config | stdio MCP config, `.windsurf/rules/memorix.md`, hook config | Uses Windsurf's current config surfaces. |
63
63
  | Kiro | `memorix setup --agent kiro --global` | Kiro MCP/steering/hooks config | MCP config, `.kiro/steering/memorix.md`, `.kiro/hooks/*.kiro.hook` | Uses Kiro steering and hook files. |
64
- | Antigravity | `memorix setup --agent antigravity --global` | Antigravity plugin | Plugin under `~/.gemini/config/plugins/memorix` or `.agents/plugins/memorix`, with `plugin.json`, `mcp_config.json`, `hooks.json`, rules, and skills | Uses Antigravity's official plugin layout. Dedicated MCP configs live at `~/.gemini/config/mcp_config.json` or `.agents/mcp_config.json`; legacy Gemini settings are read only for compatibility. |
64
+ | Antigravity | `memorix setup --agent antigravity --global` | **Primary supported target** | Plugin under `~/.gemini/config/plugins/memorix` or `.agents/plugins/memorix`, with `plugin.json`, `mcp_config.json`, `hooks.json`, rules, and skills | Uses Antigravity's official plugin layout. Dedicated MCP configs live at `~/.gemini/config/mcp_config.json` or `.agents/mcp_config.json`; legacy Gemini settings are read only for compatibility. |
65
65
  | Trae | `memorix setup --agent trae --global` | Trae MCP/rules config | MCP config and `.trae/rules/project_rules.md` | Current support is MCP plus project rules. |
66
66
  | DeepSeek Harness | `memorix setup --agent dsh --global` | DeepSeek Harness MCP patch | Memorix `@deepseek-ai/dsh-mcp-client` row in `$DSH_HOME/cordis.patch.yml` (default `~/.dsh/cordis.patch.yml`), guidance in the harness `AGENTS.md`, and official skills under `$DSH_HOME/skills` | Tools appear as `mcp__memorix__*`. No hooks surface. Project-local setup writes project `AGENTS.md` guidance and `.dsh/skills`; the MCP row always lives in the harness-level patch file. |
67
67
  | memcode | `memorix` or `memcode` | Bundled terminal agent | Built-in Memorix memory access | memcode uses the same project memory pool; it is not a separate memory silo. |
package/docs/README.md CHANGED
@@ -33,10 +33,11 @@ The public docs are organized by user intent:
33
33
  | CLI commands and MCP tools | [API_REFERENCE.md](API_REFERENCE.md) |
34
34
  | Memory Autopilot, Code State, and context packs | [API_REFERENCE.md § Memory Autopilot, Code State, and Context Packs](API_REFERENCE.md#memory-autopilot-code-state-and-context-packs), [1.2 Code State](1.2.0-CODE-STATE.md), and [1.2 Workset Retrieval](1.2.0-WORKSET-RETRIEVAL.md) |
35
35
  | Reviewed episodic, semantic, and procedural long-term memory | [1.3 Memory Architecture](1.3-MEMORY-ARCHITECTURE.md) |
36
- | Browse memory and run preview-first local maintenance | [Dashboard](DASHBOARD.md) |
36
+ | Browse memory, maintenance, and read-only Coordination Status | [Dashboard](DASHBOARD.md) |
37
37
  | Reviewable knowledge pages and workflow inheritance | [API_REFERENCE.md § Knowledge Workspace and Workflows](API_REFERENCE.md#knowledge-workspace-and-workflows), [1.2 Knowledge Workspace](1.2.0-KNOWLEDGE-WORKSPACE.md), and [1.2 Workflow Inheritance](1.2.0-WORKFLOW-INHERITANCE.md) |
38
38
  | Git-derived engineering memory | [GIT_MEMORY.md](GIT_MEMORY.md) |
39
39
  | Memory formation and quality pipeline | [MEMORY_FORMATION_PIPELINE.md](MEMORY_FORMATION_PIPELINE.md) |
40
+ | Evidence cards and memory feedback | [1.8.0 Release Specification](1.8.0-RELEASE-CANDIDATE-SPEC.md) and [API_REFERENCE.md](API_REFERENCE.md) |
40
41
  | Performance and resource profile | [PERFORMANCE.md](PERFORMANCE.md) |
41
42
  | Orchestrated subagent tasks, messages, locks, handoffs | [API_REFERENCE.md § Orchestration Coordination](API_REFERENCE.md#9-orchestration-coordination-tools) |
42
43
  | Subagent orchestration | [API_REFERENCE.md](API_REFERENCE.md) and `memorix orchestrate --help` |
@@ -92,6 +93,7 @@ The public docs are organized by user intent:
92
93
  | 1.2 honest Lite and optional semantic CodeGraph provider contract | [1.2 Provider Quality](1.2.0-PROVIDER-QUALITY.md) |
93
94
  | 1.3 long-term memory model, source boundary, and lifecycle | [1.3 Memory Architecture](1.3-MEMORY-ARCHITECTURE.md) |
94
95
  | Active context-control work | [1.2.2 Memory Control Plane](1.2.2-MEMORY-CONTROL-PLANE.md) |
96
+ | 1.8 context-control acceptance contract | [1.8.0 Release Specification](1.8.0-RELEASE-CANDIDATE-SPEC.md) |
95
97
  | Historical cloud sync and multi-agent research | [CLOUD_SYNC_AND_MULTI_AGENT_RESEARCH.md](CLOUD_SYNC_AND_MULTI_AGENT_RESEARCH.md) |
96
98
  | Known issues and old roadmap notes | [KNOWN_ISSUES_AND_ROADMAP.md](KNOWN_ISSUES_AND_ROADMAP.md) |
97
99
 
@@ -119,16 +121,27 @@ Historical/deep-reference documents may describe older designs. If they conflict
119
121
 
120
122
  ## Current Product Line
121
123
 
122
- The released product is on the **1.7 line**. The current baseline has:
124
+ The current product line is **1.8.1**. The authoritative acceptance contract is
125
+ [1.8.0 Release Specification](1.8.0-RELEASE-CANDIDATE-SPEC.md).
126
+ The current baseline has:
123
127
 
124
128
  - `memorix setup --agent <agent> --global` is the default agent integration command
125
129
  - `memorix serve` is the manual stdio MCP server for external agents
126
130
  - `memorix background start` runs the shared HTTP MCP service and dashboard
127
131
  - Dashboard maintenance is preview-first, project-scoped, and uses the same
128
132
  cleanup and deduplication planners as CLI and MCP
133
+ - Dashboard Coordination Status is read-only and projects the persistent SQLite
134
+ `TeamStore` truth; its task section is `Task Status` and failed reads are
135
+ explicit `error`/`degraded` states
129
136
  - context and CodeGraph commands return bounded task receipts before detailed diagnostics
130
137
  - HTTP MCP sessions have a bounded, explicit lifecycle and fail with a reinitialize hint after expiry
131
138
  - `memorix integrate --agent <agent>` and `memorix hooks install --agent <agent>` remain manual/fallback generation commands
132
139
  - `memorix` / `memcode` open memcode, the bundled terminal agent that uses the same Memorix memory pool
133
140
  - `~/.memorix/config.toml` and project `memorix.toml` are the user-facing configuration model
134
141
  - legacy `memorix.yml`, `.env`, and `config.json` files are still read for compatibility, but new setups should use TOML
142
+
143
+ For MCP compatibility, 1.8 preserves legacy stateful Streamable HTTP and
144
+ supports 2026-07-28 stateless requests with durable project handles. Tasks and
145
+ polling are reported as unsupported when the pinned SDK cannot provide a real
146
+ durable implementation. Antigravity is the primary setup target; Gemini CLI is
147
+ the compatibility path. See the release specification for the exact contract.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memorix",
3
3
  "mcpName": "io.github.AVIDS2/memorix",
4
- "version": "1.7.3",
4
+ "version": "1.8.1",
5
5
  "description": "Local-first shared memory layer for AI coding agents across MCP clients, Git history, reasoning context, and project sessions.",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -3,7 +3,7 @@
3
3
  Use Memorix when prior workspace context, decisions, fixes, or handoff state would materially help the current task and Memorix tools are available.
4
4
 
5
5
  - Call `memorix_project_context` with the user's actual task for continuation, fresh handoff, or unfamiliar coding work so Memorix can choose a task-lensed brief.
6
- - If the MCP tool is not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text.
6
+ - If the MCP tool is not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text.
7
7
  - Use `memorix_context_pack` when you need structured refs and freshness for code-bound memories.
8
8
  - Use `memorix_graph_context` for explicit memory graph questions.
9
9
  - Use `memorix_search` for focused lookup.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/plugin.schema.json",
3
3
  "name": "memorix",
4
- "version": "1.7.3",
4
+ "version": "1.8.1",
5
5
  "description": "Shared workspace memory for Claude Code and other AI coding agents.",
6
6
  "author": {
7
7
  "name": "AVIDS2",
@@ -32,7 +32,7 @@ is not a failure by itself. Claude Code supports MCP tool search, and the
32
32
  Memorix Claude plugin asks Claude to eagerly load its small core tool set. In
33
33
  headless/print-mode, if Memorix tools are not in the first visible tool list,
34
34
  search/select `memorix_project_context` before using shell fallback. Run
35
- `memorix context --task "<task>"` only after MCP is unavailable, disabled, or
35
+ `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or
36
36
  not discoverable, and pass the user's real task text.
37
37
 
38
38
  Do not store secrets, credentials, raw private transcripts, or trivial one-off actions. Treat memory as context, not as a substitute for reading code and verifying behavior.
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
17
17
  | Need the full source for a search hit | `memorix_detail` | `memorix memory detail --id <id>` |
@@ -28,7 +28,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
28
28
  - Treat memory as background context. Still read the current code and verify behavior.
29
29
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
30
30
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
31
- - If Claude Code print-mode shows Memorix MCP as pending and the tools are not visible yet, first use Claude Code's MCP tool search/dynamic loading to find `memorix_project_context`. Run `memorix context --task "<task>"` from the shell only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on `pending`, or hand-write tool-call syntax.
31
+ - If Claude Code print-mode shows Memorix MCP as pending and the tools are not visible yet, first use Claude Code's MCP tool search/dynamic loading to find `memorix_project_context`. Run `memorix context --task "<task>" --fallback --brief-json` from the shell only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on `pending`, or hand-write tool-call syntax.
32
32
 
33
33
  ## Store Rules
34
34
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Local-first project memory for CodeBuddy Code and other coding agents.",
5
5
  "author": {
6
6
  "name": "AVIDS2",
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
17
17
  | Need the full source for a search hit | `memorix_detail` | `memorix memory detail --id <id>` |
@@ -28,7 +28,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
28
28
  - Treat memory as background context. Still read the current code and verify behavior.
29
29
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
30
30
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
31
- - If Claude Code print-mode shows Memorix MCP as pending and the tools are not visible yet, first use Claude Code's MCP tool search/dynamic loading to find `memorix_project_context`. Run `memorix context --task "<task>"` from the shell only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on `pending`, or hand-write tool-call syntax.
31
+ - If Claude Code print-mode shows Memorix MCP as pending and the tools are not visible yet, first use Claude Code's MCP tool search/dynamic loading to find `memorix_project_context`. Run `memorix context --task "<task>" --fallback --brief-json` from the shell only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on `pending`, or hand-write tool-call syntax.
32
32
 
33
33
  ## Store Rules
34
34
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Shared workspace memory for Codex and other AI coding agents.",
5
5
  "author": {
6
6
  "name": "AVIDS2",
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Explicit memory graph question | `memorix_graph_context` | `memorix memory graph-context --query "<topic>"` |
17
17
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
@@ -29,7 +29,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
29
29
  - Treat memory as background context. Still read the current code and verify behavior.
30
30
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
31
31
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
32
- - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
32
+ - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
33
33
 
34
34
  ## Store Rules
35
35
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Shared local workspace memory for GitHub Copilot CLI and other AI coding agents.",
5
5
  "author": {
6
6
  "name": "AVIDS2",
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Explicit memory graph question | `memorix_graph_context` | `memorix memory graph-context --query "<topic>"` |
17
17
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
@@ -29,7 +29,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
29
29
  - Treat memory as background context. Still read the current code and verify behavior.
30
30
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
31
31
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
32
- - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
32
+ - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
33
33
 
34
34
  ## Store Rules
35
35
 
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Explicit memory graph question | `memorix_graph_context` | `memorix memory graph-context --query "<topic>"` |
17
17
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
@@ -29,7 +29,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
29
29
  - Treat memory as background context. Still read the current code and verify behavior.
30
30
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
31
31
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
32
- - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
32
+ - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
33
33
 
34
34
  ## Store Rules
35
35
 
@@ -5,7 +5,7 @@ This extension adds Memorix memory guidance for the active Gemini CLI workspace.
5
5
  Use Memorix when prior workspace context, decisions, fixes, or handoff state would materially help the current task and Memorix tools are available.
6
6
 
7
7
  - Call `memorix_project_context` with the user's actual task for continuation, fresh handoff, or unfamiliar coding work so Memorix can choose a task-lensed brief.
8
- - If the MCP tool is not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text.
8
+ - If the MCP tool is not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text.
9
9
  - Use `memorix_context_pack` when you need structured refs and freshness for code-bound memories.
10
10
  - Use `memorix_graph_context` for explicit memory graph questions.
11
11
  - Use `memorix_search` for focused lookup.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "mcpServers": {
5
5
  "memorix": {
6
6
  "command": "memorix",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix-omp-package",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Memorix shared workspace memory package for Oh-my-Pi.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Shared workspace memory for OpenClaw and other AI coding agents.",
5
5
  "author": {
6
6
  "name": "AVIDS2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memorix-pi-package",
3
- "version": "1.7.3",
3
+ "version": "1.8.1",
4
4
  "description": "Memorix shared workspace memory package for Pi coding agent.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -11,7 +11,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
11
11
 
12
12
  | Situation | Prefer | CLI fallback |
13
13
  |---|---|---|
14
- | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>"` |
14
+ | Broad continuation, fresh handoff, or "what do we know?" | `memorix_project_context` with the user's task | `memorix context --task "<topic>" --fallback --brief-json` |
15
15
  | Need structured refs/freshness for code-bound memories | `memorix_context_pack` | `memorix codegraph context-pack --task "<topic>"` |
16
16
  | Explicit memory graph question | `memorix_graph_context` | `memorix memory graph-context --query "<topic>"` |
17
17
  | Specific past decision, bug, file, or change | `memorix_search` | `memorix memory search --query "<topic>"` |
@@ -29,7 +29,7 @@ Use Memorix as the shared memory layer for the active workspace when Memorix too
29
29
  - Treat memory as background context. Still read the current code and verify behavior.
30
30
  - Skip memory lookup for greetings, tiny one-off edits, or questions fully answered by the current file.
31
31
  - If a fresh project has no memories, proceed normally and do not repeat the same empty search in the same turn.
32
- - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>"` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
32
+ - If MCP tools are not visible yet but the client supports tool discovery or dynamic loading, search/select `memorix_project_context` first. Run `memorix context --task "<task>" --fallback --brief-json` only after MCP is unavailable, disabled, or not discoverable, and pass the user's real task text. Do not skip memory, wait indefinitely on startup, or hand-write tool-call syntax.
33
33
 
34
34
  ## Store Rules
35
35
 
package/server.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/AVIDS2/memorix",
8
8
  "source": "github"
9
9
  },
10
- "version": "1.7.3",
10
+ "version": "1.8.1",
11
11
  "websiteUrl": "https://github.com/AVIDS2/memorix#readme",
12
12
  "icons": [
13
13
  {
@@ -22,7 +22,7 @@
22
22
  {
23
23
  "registryType": "npm",
24
24
  "identifier": "memorix",
25
- "version": "1.7.3",
25
+ "version": "1.8.1",
26
26
  "runtimeHint": "npx",
27
27
  "packageArguments": [
28
28
  {
@@ -19,6 +19,8 @@ export const CLI_NATIVE_PARITY: Record<string, string> = Object.freeze({
19
19
  memorix_transfer: 'memorix transfer export|import',
20
20
  memorix_retention: 'memorix retention status|archive|stale',
21
21
  memorix_media: 'memorix media import|attach|list|show|generate|status',
22
+ memorix_evidence: 'memorix evidence list|get|sync|stale|events',
23
+ memorix_feedback: 'memorix feedback record|show|audit',
22
24
  memorix_dashboard: 'memorix dashboard',
23
25
  memorix_handoff: 'memorix handoff send',
24
26
  memorix_poll: 'memorix poll',
@@ -11,6 +11,7 @@ import { buildBoundedContextReceipt } from '../../knowledge/context-receipt.js';
11
11
  import { WORKFLOW_AGENT_TARGETS } from '../../knowledge/workflows.js';
12
12
  import type { AgentTarget } from '../../types.js';
13
13
  import { emitError, emitResult, getCliProjectContext } from './operator-shared.js';
14
+ import { CliFallbackBudget } from '../fallback-budget.js';
14
15
 
15
16
  function coerceRefreshMode(input?: string): AutoContextRefreshMode {
16
17
  const value = (input ?? 'auto').trim().toLowerCase();
@@ -42,6 +43,7 @@ export default defineCommand({
42
43
  agent: { type: 'string', description: 'Optional target agent for compatible workflow selection' },
43
44
  json: { type: 'boolean', description: 'Emit machine-readable JSON output' },
44
45
  briefJson: { type: 'boolean', description: 'Emit only the bounded agent brief and receipt JSON' },
46
+ fallback: { type: 'boolean', description: 'Mark this as the one-shot MCP-unavailable fallback for the task' },
45
47
  },
46
48
  run: async ({ args }) => {
47
49
  const asJson = !!args.json || !!args.briefJson;
@@ -51,6 +53,15 @@ export default defineCommand({
51
53
 
52
54
  try {
53
55
  const { project, dataDir, reader } = await getCliProjectContext();
56
+ if (args.fallback) {
57
+ const budget = new CliFallbackBudget();
58
+ await budget.init(dataDir);
59
+ const claim = budget.claim(project.id, task);
60
+ if (!claim.allowed) {
61
+ emitError(claim.reason ?? 'CLI fallback budget exhausted for this task.', asJson);
62
+ return;
63
+ }
64
+ }
54
65
  const context = await buildAutoProjectContext({
55
66
  project,
56
67
  dataDir,
@@ -59,7 +59,7 @@ export default defineCommand({
59
59
  const cliDir = path.dirname(fileURLToPath(import.meta.url));
60
60
  const staticDir = path.join(cliDir, '..', 'dashboard', 'static');
61
61
 
62
- await startDashboard(dataDir, port, staticDir, project.id, project.name, true, undefined, project.rootPath, true);
62
+ await startDashboard(dataDir, port, staticDir, project.id, project.name, true, project.rootPath, true);
63
63
 
64
64
  // Keep alive
65
65
  await new Promise(() => { });