memorix 1.0.5 → 1.0.6

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,49 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ### Fixed
8
+ - **API-first auto embedding selection** — `MEMORIX_EMBEDDING=auto` now prefers a configured remote embedding API before falling back to local `fastembed` or `transformers`, preventing unexpected local-model activation when API credentials are already present.
9
+ - **Embedding cache isolation across config changes** — API embedding cache keys and probe-dimension metadata now stay isolated per `baseUrl + model + requestedDimensions`, so switching between shortened and native dimensions no longer reuses stale cached embeddings or stale dimension probes.
10
+
11
+ ## [1.0.6] - 2026-04-05
12
+
13
+ ### Added — Memory Provenance and Layered Retrieval
14
+ - **Provenance foundation** — Observations now carry `sourceDetail` (`explicit` / `hook` / `git-ingest`) and `valueCategory` (`core` / `contextual` / `ephemeral`). All ten write-path call sites annotated. Backward-compatible: old data without new fields parses cleanly.
15
+ - **Layered disclosure (L1/L2/L3)** — `memorix_session_start` now separates routing hints (L1), working context (L2), and deep evidence (L3). Session injection scores observations by source and value category so hook noise stays out of working context.
16
+ - **Evidence retrieval** — `memorix_detail` and `memorix_timeline` now surface provenance cues (source badge, evidence basis) so operators can trace why a memory exists and what supports it.
17
+ - **Verification-aware evidence** — Detail and timeline outputs distinguish direct, summarized, derived, and repository-backed evidence without requiring a full citation framework.
18
+ - **Citation-lite** — Evidence-bearing surfaces emit lightweight citation hints (`[source: git]`, `[verified: repo-backed]`) to support "why surfaced" and "what supports this" queries.
19
+ - **Retrieval tuning** — Source-aware boost treats `git-ingest` as first-class git evidence for intent-aware ranking. Lightweight provenance tiebreaking for ambiguous retrieval results. L1 routing surfaces active entities as next-hop search guidance.
20
+ - **Graph routing hints** — Knowledge graph neighborhood is used for lightweight retrieval enrichment and entity-affinity scoring without a full graph rewrite.
21
+
22
+ ### Added — Task-Line Scoping, Secret Safety, and Attribution Hardening
23
+ - **Task-line scoping** — Search and session context now bias toward the current entity/task-line/subdomain, reducing cross-workstream contamination within a single project bucket.
24
+ - **Secret safety** — Store-time detection blocks obvious credentials, passwords, and tokens from entering durable memory. Retrieval-time redaction acts as a second safety net for already-stored sensitive data.
25
+ - **Project attribution hardening** — Write-path consistency checks reduce wrong-bucket writes. `memorix_audit_project` scans for misattributed observations and reports them with confidence levels.
26
+ - **Ambiguous-target attribution fix** — Observations stored during ambiguous project context are now flagged rather than silently written to the wrong bucket.
27
+
28
+ ### Added — Retention, Cleanup, and Operator Remediation
29
+ - **Retention calibration** — Source-aware retention multipliers (hook 0.5×, git-ingest 1.5×) and value-category multipliers (ephemeral 0.5×, core 2.0×) with a 7-day minimum floor. Immunity refined: only `critical` importance and `core` valueCategory grant permanent immunity; `high`-importance types keep long retention but can now decay.
30
+ - **Retention explainability** — `memorix_retention action="stale"` shows a full table with per-observation retention explanation (importance, multipliers, effective days, zone, immunity reason).
31
+ - **Cleanup remediation loop** — `memorix_retention` (stale/report), `memorix_audit_project`, and `memorix_resolve` now form a coherent operator loop. Each output includes structured `Suggested IDs: [...]` blocks and explicit next-step guidance. `memorix_resolve` links back to retention report for closed-loop cleanup.
32
+
33
+ ### Added — OpenCode Plugin Improvements
34
+ - **`post_compact` event** — New `post_compact` hook event type. OpenCode's `session.compacted` event correctly maps to `post_compact` (was incorrectly mapped to `pre_compact`). Plugin event handler triggers `runHook` side-effect on compaction completion.
35
+ - **Structured compaction prompt** — OpenCode compaction prompt rewritten as a structured continuation format requesting current task, key decisions, active files, blockers, next steps, active entities, and memorix context. No longer promises automatic `memorix_store` / `memorix_session_start` invocation during compaction.
36
+
37
+ ### Fixed
38
+ - **#45 OpenCode compaction** — Compaction prompt no longer makes misleading tool-call promises. `session.compacted` event now fires a real side-effect via `runHook`. Normalizer mapping corrected to `post_compact`.
39
+ - **#46 Dotenv load order** — `loadDotenv()` now runs before `getEmbeddingProvider()` in `status`, `doctor`, and TUI entry points, fixing "No API key" errors when `.env` credentials were present.
40
+ - **#48 Ingest log dedup** — `memorix ingest log` now deduplicates by commit hash, matching the behavior of `ingest commit` and TUI batch ingest. Repeated runs skip already-ingested commits.
41
+
42
+ ### Stats
43
+ - **Tests:** 1439 passed | 2 skipped (102 files)
44
+ - **Phases landed:** 11 (provenance → layered disclosure → evidence → verification → citation-lite → retrieval tuning → graph routing → task-line/secret → attribution → retention → cleanup ergonomics)
45
+
46
+ ---
47
+
5
48
  ## [1.0.5] - 2026-03-24
6
49
 
7
50
  ### Added
@@ -46,7 +89,7 @@ All notable changes to this project will be documented in this file.
46
89
  ### Changed
47
90
  - **Documentation consolidation** — Reworked README, README.zh-CN, setup, architecture, API reference, configuration, Git Memory, and development guides so they match the current product model: local-first platform, `memorix.yml + .env`, Git Memory, HTTP dashboard, and the four-layer architecture.
48
91
  - **Project detection model** — Project identity now centers on real Git roots, MCP roots support, system-directory fallback handling, and runtime project switching instead of older placeholder-style fallback identities.
49
- - **Dashboard usage model** — `memorix serve-http --port 3211` is now the primary control plane entrypoint when you want HTTP transport, collaboration features, and dashboard access in one place.
92
+ - **Dashboard usage model** — `memorix background start` is now the primary long-lived HTTP control-plane entrypoint when you want HTTP transport, collaboration features, and dashboard access in one place. `memorix serve-http --port 3211` remains the foreground/debug variant.
50
93
 
51
94
  ### Fixed
52
95
  - **Project identity drift** — Fixed Codex/Windsurf startup issues that produced `local/System32`, IDE-installation-directory identities, or other incorrect local project bindings.
@@ -60,7 +103,7 @@ All notable changes to this project will be documented in this file.
60
103
 
61
104
  ### Stats
62
105
  - **Tests:** 879/879 passing across 68 files
63
- - **Runtime modes:** stdio MCP (`memorix serve`), HTTP MCP + dashboard (`memorix serve-http --port 3211`), and standalone dashboard remain supported
106
+ - **Runtime modes:** stdio MCP (`memorix serve`), HTTP MCP + dashboard (`memorix background start` by default, or `memorix serve-http --port 3211` in the foreground), and standalone dashboard remain supported
64
107
 
65
108
  ---
66
109
 
package/CLAUDE.md CHANGED
@@ -7,7 +7,7 @@ You have access to Memorix, an open-source cross-agent memory layer for coding a
7
7
  At the beginning of every conversation:
8
8
 
9
9
  1. Call `memorix_session_start` to load the previous session summary and recent high-value context.
10
- 2. If you are connected to the HTTP control plane (`memorix serve-http`) and you know the current workspace path, pass:
10
+ 2. If you are connected to the HTTP control-plane mode (normally started with `memorix background start`; `memorix serve-http` is the foreground variant) and you know the current workspace path, pass:
11
11
  - `agent`
12
12
  - `projectRoot` = the absolute path of the current workspace or repo root
13
13
  3. If you are using stdio / Quick Mode and Memorix is already project-bound, calling `memorix_session_start` without `projectRoot` is acceptable.