superlocalmemory 3.8.14 → 4.0.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 (211) hide show
  1. package/ATTRIBUTION.md +4 -4
  2. package/CHANGELOG.md +124 -137
  3. package/README.md +69 -66
  4. package/docs/pi-dev-integration.md +1 -1
  5. package/package.json +6 -1
  6. package/plugin/.claude-plugin/plugin.json +1 -1
  7. package/plugin/CLAUDE.md +3 -3
  8. package/plugin/agents/slm-governance-advisor.md +1 -1
  9. package/plugin/agents/slm-loop-runner.md +1 -1
  10. package/plugin/agents/slm-memory-advisor.md +1 -1
  11. package/plugin/agents/slm-optimize-advisor.md +1 -1
  12. package/plugin/requirements.txt +1 -1
  13. package/plugin/skills/slm-cache/SKILL.md +1 -1
  14. package/plugin/skills/slm-compress/SKILL.md +1 -1
  15. package/plugin/skills/slm-governance/SKILL.md +1 -1
  16. package/plugin/skills/slm-graph/SKILL.md +1 -1
  17. package/plugin/skills/slm-loop/SKILL.md +1 -1
  18. package/plugin/skills/slm-mesh/SKILL.md +1 -1
  19. package/plugin/skills/slm-profile/SKILL.md +1 -1
  20. package/plugin/skills/slm-recall/SKILL.md +1 -1
  21. package/plugin/skills/slm-remember/SKILL.md +1 -1
  22. package/plugin/skills/slm-scope/SKILL.md +1 -1
  23. package/plugin/skills/slm-session/SKILL.md +1 -1
  24. package/plugin/skills/slm-status/SKILL.md +1 -1
  25. package/plugin-src/rules/AGENTS.md +1 -1
  26. package/plugin-src/skills/slm-cache/SKILL.md +1 -1
  27. package/plugin-src/skills/slm-compress/SKILL.md +1 -1
  28. package/plugin-src/skills/slm-governance/SKILL.md +248 -0
  29. package/plugin-src/skills/slm-graph/SKILL.md +1 -1
  30. package/plugin-src/skills/slm-loop/SKILL.md +99 -0
  31. package/plugin-src/skills/slm-mesh/SKILL.md +282 -0
  32. package/plugin-src/skills/slm-profile/SKILL.md +148 -0
  33. package/plugin-src/skills/slm-recall/SKILL.md +1 -1
  34. package/plugin-src/skills/slm-remember/SKILL.md +1 -1
  35. package/plugin-src/skills/slm-scope/SKILL.md +176 -0
  36. package/plugin-src/skills/slm-session/SKILL.md +1 -1
  37. package/plugin-src/skills/slm-status/SKILL.md +1 -1
  38. package/pyproject.toml +11 -4
  39. package/src/superlocalmemory/__init__.py +1 -1
  40. package/src/superlocalmemory/cli/commands.py +125 -11
  41. package/src/superlocalmemory/cli/daemon.py +5 -1
  42. package/src/superlocalmemory/cli/main.py +35 -2
  43. package/src/superlocalmemory/cli/ops_cmd.py +281 -0
  44. package/src/superlocalmemory/cli/setup_wizard.py +1 -1
  45. package/src/superlocalmemory/compliance/audit.py +65 -0
  46. package/src/superlocalmemory/compliance/eu_ai_act.py +27 -57
  47. package/src/superlocalmemory/compliance/gdpr.py +416 -20
  48. package/src/superlocalmemory/compliance/retention.py +74 -22
  49. package/src/superlocalmemory/compliance/scheduler.py +78 -9
  50. package/src/superlocalmemory/core/actor_context.py +166 -0
  51. package/src/superlocalmemory/core/admission.py +549 -0
  52. package/src/superlocalmemory/core/backend_orchestrator.py +23 -10
  53. package/src/superlocalmemory/core/config.py +202 -24
  54. package/src/superlocalmemory/core/consolidation_engine.py +13 -13
  55. package/src/superlocalmemory/core/context_cache.py +28 -0
  56. package/src/superlocalmemory/core/embeddings.py +64 -2
  57. package/src/superlocalmemory/core/engine.py +7 -2
  58. package/src/superlocalmemory/core/engine_ingestion.py +65 -3
  59. package/src/superlocalmemory/core/engine_wiring.py +32 -5
  60. package/src/superlocalmemory/core/ingest_policy.py +38 -0
  61. package/src/superlocalmemory/core/maintenance.py +255 -0
  62. package/src/superlocalmemory/core/modes.py +40 -13
  63. package/src/superlocalmemory/core/mutations.py +437 -44
  64. package/src/superlocalmemory/core/operation_policy.py +92 -0
  65. package/src/superlocalmemory/core/operation_policy_registry.py +542 -0
  66. package/src/superlocalmemory/core/operation_request.py +127 -0
  67. package/src/superlocalmemory/core/ops_remediation.py +542 -0
  68. package/src/superlocalmemory/core/recall_pipeline.py +7 -0
  69. package/src/superlocalmemory/core/remember_runtime.py +202 -4
  70. package/src/superlocalmemory/core/remote_mode.py +20 -5
  71. package/src/superlocalmemory/core/store_pipeline.py +150 -0
  72. package/src/superlocalmemory/core/topic_signature.py +19 -4
  73. package/src/superlocalmemory/core/transactions/__init__.py +78 -0
  74. package/src/superlocalmemory/core/transactions/concrete_owners.py +597 -0
  75. package/src/superlocalmemory/core/transactions/erasure.py +825 -0
  76. package/src/superlocalmemory/core/transactions/manifest.py +255 -0
  77. package/src/superlocalmemory/core/transactions/manifest_key.py +155 -0
  78. package/src/superlocalmemory/core/transactions/obligations.py +272 -0
  79. package/src/superlocalmemory/core/transactions/owners.py +114 -0
  80. package/src/superlocalmemory/core/transactions/reconciler.py +285 -0
  81. package/src/superlocalmemory/core/transactions/service.py +330 -0
  82. package/src/superlocalmemory/core/worker_pool.py +33 -5
  83. package/src/superlocalmemory/encoding/cognitive_consolidator.py +70 -28
  84. package/src/superlocalmemory/encoding/emotional.py +75 -14
  85. package/src/superlocalmemory/encoding/temporal_parser.py +4 -0
  86. package/src/superlocalmemory/evolution/blind_verifier.py +11 -4
  87. package/src/superlocalmemory/evolution/evolution_store.py +244 -4
  88. package/src/superlocalmemory/evolution/llm_dispatch.py +40 -0
  89. package/src/superlocalmemory/evolution/model_selection.py +18 -3
  90. package/src/superlocalmemory/evolution/mutation_generator.py +3 -0
  91. package/src/superlocalmemory/evolution/skill_activator.py +270 -0
  92. package/src/superlocalmemory/evolution/skill_evolver.py +281 -59
  93. package/src/superlocalmemory/evolution/types.py +30 -8
  94. package/src/superlocalmemory/graph/cozo_backend.py +17 -9
  95. package/src/superlocalmemory/hooks/auto_invoker.py +2 -1
  96. package/src/superlocalmemory/hooks/auto_recall.py +64 -30
  97. package/src/superlocalmemory/hooks/codex_assets.py +14 -1
  98. package/src/superlocalmemory/infra/backup.py +434 -7
  99. package/src/superlocalmemory/infra/process_reaper.py +18 -0
  100. package/src/superlocalmemory/infra/self_heal.py +401 -0
  101. package/src/superlocalmemory/learning/feedback.py +52 -9
  102. package/src/superlocalmemory/loops/engine.py +10 -0
  103. package/src/superlocalmemory/mcp/_daemon_proxy.py +3 -0
  104. package/src/superlocalmemory/mcp/http_transport.py +30 -331
  105. package/src/superlocalmemory/mcp/profiles.py +5 -0
  106. package/src/superlocalmemory/mcp/resources.py +8 -0
  107. package/src/superlocalmemory/mcp/server.py +51 -4
  108. package/src/superlocalmemory/mcp/shared.py +19 -0
  109. package/src/superlocalmemory/mcp/tools_active.py +25 -4
  110. package/src/superlocalmemory/mcp/tools_code_graph.py +26 -18
  111. package/src/superlocalmemory/mcp/tools_context.py +50 -8
  112. package/src/superlocalmemory/mcp/tools_core.py +69 -21
  113. package/src/superlocalmemory/mcp/tools_evolution.py +9 -2
  114. package/src/superlocalmemory/mcp/tools_learning.py +21 -10
  115. package/src/superlocalmemory/mcp/tools_loops.py +29 -18
  116. package/src/superlocalmemory/mcp/tools_mesh.py +8 -0
  117. package/src/superlocalmemory/mcp/tools_ops.py +115 -0
  118. package/src/superlocalmemory/mcp/tools_optimize.py +4 -0
  119. package/src/superlocalmemory/mcp/tools_v28.py +10 -3
  120. package/src/superlocalmemory/mcp/tools_v3.py +34 -14
  121. package/src/superlocalmemory/mcp/tools_v33.py +18 -33
  122. package/src/superlocalmemory/mesh/broker.py +124 -46
  123. package/src/superlocalmemory/mesh/broker_security.py +470 -0
  124. package/src/superlocalmemory/mesh/discovery.py +365 -0
  125. package/src/superlocalmemory/mesh/lock_protocol.py +313 -0
  126. package/src/superlocalmemory/mesh/node_identity.py +97 -0
  127. package/src/superlocalmemory/mesh/outbox_remote.py +429 -0
  128. package/src/superlocalmemory/mesh/remote_sync.py +511 -28
  129. package/src/superlocalmemory/mesh/state_sync.py +286 -0
  130. package/src/superlocalmemory/optimize/config/store.py +45 -0
  131. package/src/superlocalmemory/parameterization/cross_project.py +12 -0
  132. package/src/superlocalmemory/parameterization/prompt_injector.py +13 -11
  133. package/src/superlocalmemory/parameterization/prompt_lifecycle.py +8 -2
  134. package/src/superlocalmemory/parameterization/workflow_miner.py +17 -0
  135. package/src/superlocalmemory/retrieval/ann_index.py +5 -0
  136. package/src/superlocalmemory/retrieval/bm25_channel.py +49 -2
  137. package/src/superlocalmemory/retrieval/engine.py +19 -4
  138. package/src/superlocalmemory/retrieval/fusion.py +4 -1
  139. package/src/superlocalmemory/retrieval/hopfield_channel.py +9 -3
  140. package/src/superlocalmemory/retrieval/remote_reranker.py +47 -22
  141. package/src/superlocalmemory/retrieval/reranker.py +32 -1
  142. package/src/superlocalmemory/retrieval/temporal_channel.py +16 -3
  143. package/src/superlocalmemory/retrieval/temporal_utils.py +107 -0
  144. package/src/superlocalmemory/retrieval/temporal_validity_filter.py +155 -42
  145. package/src/superlocalmemory/retrieval/vector_store.py +214 -8
  146. package/src/superlocalmemory/server/api.py +5 -5
  147. package/src/superlocalmemory/server/egress_policy.py +258 -0
  148. package/src/superlocalmemory/server/rbac_enforce.py +32 -0
  149. package/src/superlocalmemory/server/route_mutations.py +20 -0
  150. package/src/superlocalmemory/server/routes/compliance.py +153 -7
  151. package/src/superlocalmemory/server/routes/data_io.py +43 -2
  152. package/src/superlocalmemory/server/routes/events.py +15 -0
  153. package/src/superlocalmemory/server/routes/memories.py +56 -3
  154. package/src/superlocalmemory/server/routes/mesh.py +82 -1
  155. package/src/superlocalmemory/server/routes/mesh_lock.py +54 -0
  156. package/src/superlocalmemory/server/routes/mesh_state.py +63 -0
  157. package/src/superlocalmemory/server/routes/v3_api.py +50 -27
  158. package/src/superlocalmemory/server/routes/ws.py +86 -0
  159. package/src/superlocalmemory/server/ui.py +12 -7
  160. package/src/superlocalmemory/server/unified_daemon.py +951 -120
  161. package/src/superlocalmemory/storage/_migration_internals.py +568 -0
  162. package/src/superlocalmemory/storage/_schema_version.py +110 -0
  163. package/src/superlocalmemory/storage/database.py +329 -24
  164. package/src/superlocalmemory/storage/embedding_migrator.py +246 -51
  165. package/src/superlocalmemory/storage/erasure_fence.py +45 -0
  166. package/src/superlocalmemory/storage/generation_fence.py +63 -0
  167. package/src/superlocalmemory/storage/migration_runner.py +140 -424
  168. package/src/superlocalmemory/storage/migrations/M009_model_lineage.py +40 -0
  169. package/src/superlocalmemory/storage/migrations/M033_projection_transactions.py +148 -0
  170. package/src/superlocalmemory/storage/migrations/M034_obligation_integrity.py +58 -0
  171. package/src/superlocalmemory/storage/migrations/M035_erasure_receipts.py +113 -0
  172. package/src/superlocalmemory/storage/migrations/M036_vector_row_map.py +107 -0
  173. package/src/superlocalmemory/storage/migrations/M037_manifest_hmac_version.py +162 -0
  174. package/src/superlocalmemory/storage/migrations/{M033_learning_feedback_channel.py → M038_learning_feedback_channel.py} +3 -3
  175. package/src/superlocalmemory/storage/migrations/{M034_scene_fact_members.py → M039_scene_fact_members.py} +15 -5
  176. package/src/superlocalmemory/storage/migrations/__init__.py +4 -4
  177. package/src/superlocalmemory/storage/schema.py +10 -2
  178. package/src/superlocalmemory/storage/write_coordinator.py +125 -0
  179. package/src/superlocalmemory/trust/scorer.py +28 -4
  180. package/src/superlocalmemory/ui/index.html +16 -5
  181. package/src/superlocalmemory/ui/js/auto-settings.js +12 -1
  182. package/src/superlocalmemory/ui/js/brain.js +6 -4
  183. package/src/superlocalmemory/ui/js/compliance.js +66 -12
  184. package/src/superlocalmemory/ui/js/dashboard.js +13 -3
  185. package/src/superlocalmemory/ui/js/feedback.js +8 -2
  186. package/src/superlocalmemory/ui/js/lifecycle.js +7 -1
  187. package/src/superlocalmemory/ui/js/modal.js +272 -5
  188. package/src/superlocalmemory/ui/js/od-backup.js +9 -2
  189. package/src/superlocalmemory/ui/js/od-compliance-ext.js +301 -0
  190. package/src/superlocalmemory/ui/js/od-operations.js +154 -23
  191. package/src/superlocalmemory/ui/js/od-ops-health.js +417 -0
  192. package/src/superlocalmemory/ui/js/od-optimize.js +35 -21
  193. package/src/superlocalmemory/ui/js/od-team.js +9 -2
  194. package/src/superlocalmemory/ui/js/optimize.js +13 -16
  195. package/src/superlocalmemory/ui/js/profiles.js +7 -3
  196. package/src/superlocalmemory/ui/js/settings.js +7 -1
  197. package/src/superlocalmemory/vector/lancedb_backend.py +19 -9
  198. package/src/superlocalmemory/attribution/mathematical_dna.py +0 -235
  199. package/src/superlocalmemory/cli/post_install.py +0 -114
  200. package/src/superlocalmemory/core/clock_monitor.py +0 -45
  201. package/src/superlocalmemory/core/db_pool.py +0 -80
  202. package/src/superlocalmemory/core/error_catalog.py +0 -113
  203. package/src/superlocalmemory/core/loop_watchdog.py +0 -56
  204. package/src/superlocalmemory/core/priority_queue.py +0 -61
  205. package/src/superlocalmemory/core/pruning_engine.py +0 -216
  206. package/src/superlocalmemory/core/queue_dispatcher.py +0 -73
  207. package/src/superlocalmemory/core/slmignore.py +0 -125
  208. package/src/superlocalmemory/infra/heartbeat_monitor.py +0 -140
  209. package/src/superlocalmemory/infra/webhook_dispatcher.py +0 -247
  210. package/src/superlocalmemory/learning/quantization_scheduler.py +0 -320
  211. package/src/superlocalmemory/storage/access_control.py +0 -182
package/ATTRIBUTION.md CHANGED
@@ -38,7 +38,7 @@ is_valid = QualixarSigner.verify(signed_output)
38
38
 
39
39
  ### Research Papers
40
40
 
41
- SuperLocalMemory is backed by three peer-reviewed research papers:
41
+ SuperLocalMemory is backed by three public research preprints (arXiv preprints):
42
42
 
43
43
  1. **Paper 1 — Trust & Behavioral Foundations** (arXiv:2603.02240)
44
44
  Bayesian trust defense, behavioral pattern mining, OWASP-aligned memory poisoning protection.
@@ -47,7 +47,7 @@ SuperLocalMemory is backed by three peer-reviewed research papers:
47
47
  Fisher-Rao geodesic distance, cellular sheaf cohomology, Riemannian Langevin lifecycle dynamics.
48
48
 
49
49
  3. **Paper 3 — The Living Brain** (arXiv:2604.04514)
50
- FRQAD mixed-precision metric, Ebbinghaus adaptive forgetting, 7-channel cognitive retrieval, memory parameterization, trust-weighted forgetting.
50
+ FRQAD mixed-precision metric, Ebbinghaus adaptive forgetting, five candidate producers plus entity-graph enhancement, memory parameterization, trust-weighted forgetting.
51
51
 
52
52
  ### Research Initiative
53
53
 
@@ -61,11 +61,11 @@ SuperLocalMemory uses the following open-source libraries:
61
61
  - NumPy (BSD-3-Clause) — Numerical operations
62
62
  - SciPy (BSD-3-Clause) — Numerical optimization (used by vCache MLE logistic refit)
63
63
 
64
- See [requirements.txt](requirements.txt) for the full dependency list.
64
+ See [pyproject.toml](pyproject.toml) for the full dependency list.
65
65
 
66
66
  ### Optimize Module — Research Citations (v3.6)
67
67
 
68
- The Optimize module (LLD-03 / LLD-04) builds on peer-reviewed work.
68
+ The Optimize module (LLD-03 / LLD-04) builds on cited public research.
69
69
  The Implementer verified each arXiv ID against arxiv.org before citation.
70
70
 
71
71
  | Component | Source | License / Note |
package/CHANGELOG.md CHANGED
@@ -1,146 +1,133 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to SuperLocalMemory V3 will be documented in this file.
3
+ All notable changes to SuperLocalMemory will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [3.8.14] - 2026-08-05Bounded scene assignment at mature scale
9
-
10
- ### Fixed
11
- - Scene assignment no longer expands and compares every historical scene for
12
- every materialized fact. v3.8.13 crossed a severe CPU and latency cliff on
13
- mature databases because both candidate selection and anchor-embedding
14
- loading scaled with the full scene population.
15
- - A forward-only M034 migration adds an indexed, trigger-maintained
16
- `scene_fact_members` projection while retaining `fact_ids_json` for backward
17
- compatibility. The existing fact-vector index now selects semantically near
18
- scenes, with a bounded live-recency fallback when vector search is
19
- unavailable. Profile isolation and deleted-fact handling remain enforced.
20
- - On the 11,519-scene production-data repro used for this repair, the complete
21
- scene-assignment path measured 214 ms median and 231 ms maximum across ten
22
- post-warmup runs. The migrated copy passes SQLite `quick_check`.
23
-
24
- ## [3.8.13] - 2026-08-03 Stale-process detection
25
-
26
- ### Fixed
27
- - A running process can now tell when it is serving superseded code. Python
28
- imports a module once, so `__version__` is frozen at process start and
29
- upgrading the package underneath a long-lived `slm mcp` server changes
30
- nothing for that server — it keeps serving the code it read at startup,
31
- indefinitely. Nothing detected this. The stale process did not error; it
32
- returned confident, plausible, wrong answers and reported a
33
- `serverInfo.version` matching the code it had loaded, which is
34
- self-consistent and therefore useless as a staleness signal. During the
35
- 3.8.12 work one machine had eighteen `slm mcp` processes alive at once
36
- spanning four days and two releases, and one of them made issue #106 look
37
- unfixed across two debugging sessions. (#107)
38
-
39
- The existing process reaper does not cover this: it kills *orphans*, whose
40
- parent has died. A server whose IDE is still running is never an orphan.
41
-
42
- Staleness is now reported by `slm doctor` (as a warning, with a restart
43
- hint), on the loopback `/health` payload as `version_integrity`, and in the
44
- `slm mcp` startup log. The MCP path logs to stderr only — that transport is
45
- JSON-RPC over stdio, where a printed warning would corrupt the protocol and
46
- turn a cosmetic problem into a dead session.
47
-
48
- Running *ahead* of the installed distribution — normal for an editable
49
- checkout — is deliberately reported separately and does not warn. A warning
50
- that fires on every developer machine is one everybody learns to ignore, and
51
- then it goes unread on the day it matters. Every failure path resolves to
52
- `unknown` rather than to a false `current`.
53
-
54
- ## [3.8.12] - 2026-08-03 — Canonical learning signals, clock-independent daemon identity, remote reranker
55
-
56
- ### Fixed
57
- - Explicit feedback now reaches the store every consumer actually reads.
58
- Three tables carry a "feedback" name: `feedback_records` (memory.db, read by
59
- nothing), `learning_feedback` (the pre-v3.4.22 legacy table that
60
- `legacy_migration` copies forward), and `learning_signals` +
61
- `learning_features` (canonical — read by the dashboard Living Brain panel,
62
- the ranker-phase card, and the LightGBM retrainer). The 3.8.11 fix wrote to
63
- the legacy table, so it moved a counter nothing consumes. `record_explicit`
64
- now writes the legacy row and the canonical signal/feature pair in one
65
- transaction, flagged `is_synthetic=1` so the LightGBM trainer's
66
- `WHERE is_synthetic=0` filter excludes them from training. (#106)
67
- - The recall phase gate and the dashboard no longer read different tables.
68
- The gate counted `learning_feedback` while every user-visible surface counted
69
- `learning_signals`, so the phase a user was shown and the phase that actually
70
- ranked their results could disagree without limit. Both now resolve from the
71
- canonical store, with thresholds imported from `learning.ranker` rather than
72
- duplicated as literals — duplicated literals are how the two surfaces drifted
73
- apart in the first place. (#106)
74
- - `report_feedback` no longer reports success for a write that did not happen.
75
- It fell back to the `feedback_records` count when the canonical read failed,
76
- and that table increments on every call regardless, so total write failure was
77
- indistinguishable from success. The cross-store fallback is removed; a failed
78
- durable write returns `success: false` with `durable: false`. (#106)
79
- - The CLI no longer disowns a healthy daemon after a few minutes on WSL2.
80
- psutil derives `create_time` as boot time plus start ticks and re-reads
81
- `/proc/stat` `btime` on every call; WSL2 resyncs its VM clock mid-session, so
82
- `btime` moves and every process's computed creation time moves with it,
83
- retroactively. The recorded value stopped matching the same live PID while
84
- `/health` still answered in milliseconds. Ownership now compares a
85
- clock-independent process token — `boot_id` plus raw start ticks on
86
- Linux/WSL2, psutil's monotonic creation time elsewhere — as exact equality,
87
- with no tolerance constant left to silently expire. PID-reuse protection is
88
- strengthened: a creation-time mismatch no longer condemns a process outright,
89
- it falls through to cryptographic identity proof over loopback. (#104)
90
- - `DAEMON_UNAVAILABLE` now names one of eight specific reasons with an
91
- actionable hint instead of "owned daemon is unavailable; retry later". (#104)
92
- - `slm setup` no longer wipes the `retrieval` config block on every re-run.
8
+ ## [4.0.1] - 2026-08-09Dashboard and operations-status correctness
9
+
10
+ ### Fixed
11
+ - The packaged dashboard identifies itself as SuperLocalMemory V4 and uses an
12
+ absolute packaged favicon path. Both unified and standalone dashboard servers
13
+ now provide the conventional `/favicon.ico` route by redirecting to the
14
+ packaged SVG icon.
15
+ - The daemon's operations-status counters now receive their FastAPI application
16
+ explicitly, so persisted dead-letter, degraded-manifest, and exhausted-
17
+ obligation counts cannot be silently reported as zero.
18
+
19
+ ## [4.0.0] - 2026-08-01 Verifiable memory transactions
20
+
21
+ Version 4.0 hardens the full lifecycle of a memory operation admission,
22
+ canonical commit, projection to every store, migration, backup, and erasure —
23
+ so each step is authorized and verifiable. Existing memories and
24
+ configuration are preserved; M038 (eager) and M039 (deferred) migrations are
25
+ automatically applied at startup — no manual migration is normally required
26
+ (see `src/superlocalmemory/storage/migration_runner.py`; `slm db migrate` is
27
+ forward-only: `status`/`--dry-run`/apply, no rollback). Schema downgrade is
28
+ unsupported restore a verified pre-upgrade backup instead.
29
+
30
+ ### Changed
31
+ - **MCP SDK 2.0.0 (fully-stateless Streamable HTTP).** Pinned `mcp==2.0.0`.
32
+ Replaced deleted `mcp.server.fastmcp.FastMCP` with
33
+ `mcp.server.mcpserver.MCPServer` (same `@tool` decorator and
34
+ `run(transport="stdio")`). Transport knobs
35
+ (`stateless_http`, `json_response`, `streamable_http_path`,
36
+ `transport_security`) are now kwargs to `streamable_http_app()`
37
+ `_configure_mcp_transport_settings()` returns that kwargs dict.
38
+ **Stateless is the default** (opt out with `SLM_MCP_STATEFUL=1`). Session
39
+ idle-timeout and EventStore SSE resumability are unused under
40
+ `stateless_http=True`. Application-level `session_init` / `close_session`
41
+ are unchanged (orthogonal to transport sessions). SDK lowlevel already
42
+ registers `server/discover` not hand-written. Product version is passed
43
+ as `MCPServer(version=...)` (no private `_mcp_server.version` poke).
93
44
 
94
45
  ### Added
95
- - Remote and custom reranker endpoints, mirroring the remote embedding support
96
- added in v3.4.24. Setting `cross_encoder_backend` to `openai` (or `remote`)
97
- with a `cross_encoder_endpoint` routes reranking to an OpenAI-compatible
98
- `/v1/rerank` service instead of the local subprocess worker. The built-in
99
- cross-encoder is English-only, silently degrading recall for non-English
100
- users; this lets them bring a multilingual model. Failure degrades to fusion
101
- order with `applied=False` and an error log — never a silent fall back to the
102
- local English model, which would recreate the very problem this solves. The
103
- new outbound HTTP surface enforces an http/https allow-list, rejects 3xx and
104
- does not follow redirects, refuses credentials embedded in the URL, and
105
- bounds response reads at 8 MB. (#105)
106
- - `cross_encoder_endpoint` is now a real config field. It was previously
107
- accepted and silently ignored the remaining half of #103.
108
-
109
- ## [3.8.11] - 2026-08-02 Learning-signal integrity and honest reranker diagnostics
110
-
111
- ### Fixed
112
- - Explicit feedback reported through `report_feedback` now writes to the
113
- canonical learning store (`learning.db`), which every learning consumer
114
- reads: the adaptive-ranking phase gate, `pattern_miner`, and the dashboard
115
- Living Brain. Previously it wrote only to a table nothing else read, so
116
- feedback returned success and a rising counter while the ranker never
117
- advanced past Phase 1 (#102).
118
- - `learning_feedback` now has the `channel` column `pattern_miner` has always
119
- queried but no schema ever defined. Every fresh database raised
120
- `no such column: channel` on the first mining pass — caught, logged at
121
- debug, and silently disabled both channel-performance mining and the
122
- co-retrieval mining that shared its error handler. Migration `M033`
123
- backfills existing databases without touching existing rows (#102).
124
- - The cross-encoder reranker now reports the real reason a model load
125
- failed instead of a generic timeout message, and no longer retries a
126
- configuration error five times (~7.5 minutes) before giving up. An
127
- unrecognized `cross_encoder_backend` value is now rejected by name;
128
- SuperLocalMemory has no remote/OpenAI-compatible reranker backend, so a
129
- `cross_encoder_endpoint` config key was previously accepted and silently
130
- ignored (#103).
131
- - `slm recall` no longer crashes when a daemon response's
132
- `retrieval_time_ms` or a result's `score` is present but `null` — the
133
- keyword-fallback recall path now includes `retrieval_time_ms` in every
134
- response, matching every other recall path's contract.
135
- - The MagicMock artifact guard (`.gitignore` and its CI test) now also
136
- catches the directory-shaped leak (`MagicMock/mock/<id>/`) produced when
137
- a mock-derived path reaches `mkdir()`, not just the file-shaped leak
138
- (`<MagicMock id='...'>`) produced by `os.open()`.
46
+ - A unified admission gateway resolves one authenticated actor, active profile,
47
+ and policy decision for every write across the CLI, MCP, HTTP, WebSocket, and
48
+ hook surfaces.
49
+ - Every completed operation carries a durable receipt and a hash-verifiable
50
+ completion manifest spanning all representations.
51
+ - **BackupCoordinator** is available as a coherent, checksum-verified backup
52
+ set primitive (`src/superlocalmemory/infra/backup.py`: `BackupCoordinator.create_backup_set()` /
53
+ `restore_from_manifest()` shared epoch, per-store SHA-256, manifest hash,
54
+ atomic publish, pre-restore snapshot + rollback). Production backup,
55
+ dashboard, cloud, and export routes currently use the **legacy
56
+ `BackupManager`** independent per-file SQLite `sqlite3.backup()` snapshots
57
+ (one file at a time); companion-store failures are logged as non-critical
58
+ and do not fail the primary `memory.db` snapshot (`_backup_all_dbs`). See
59
+ correction note below.
60
+ - **SLM-Mesh** remains the peer-coordination plane (cross-session / cross-machine
61
+ messages, locks, shared state, inbox/outbox) with mesh MCP tools on the
62
+ `full` / `power` / `mesh` profiles.
63
+ - Documented MCP profile counts for the V4 surface: `full` 42 (default everyday),
64
+ `power` 54, `whole` 87 registered tools; `core` 14, `code` 24, `mesh` 8.
65
+ - Product documentation reframes the release as V4: multi-scope memory and
66
+ profiles, cache/compress context optimization, Entity Explorer and skill
67
+ evolution, Modes A/B/C locality choices, GDPR export/erasure/retention and
68
+ hash-chained audit controls, and the seven-layer retrieval/operations stack.
139
69
 
140
- ### Documentation
141
- - `docs/auto-memory.md` no longer references `slm patterns` / `slm useful`,
142
- which do not exist in V3; documents the `report_feedback` MCP tool as the
143
- supported path instead.
70
+ ### Security
71
+ - Outbound provider requests are validated against server-side request forgery,
72
+ blocking internal metadata endpoints and unresolved hosts.
73
+ - Secrets are scrubbed from content before it is persisted or indexed, on both
74
+ the canonical write path and import.
75
+ - Profile erasure removes every representation — main store, projections,
76
+ full-text and semantic indexes, and the context cache — and reports each count.
77
+ - Mesh peers receive server-assigned identities bound to tenant and project;
78
+ production remote transport rejects plaintext, and shared state rejects
79
+ secret-looking values.
80
+
81
+ ### Fixed
82
+ - A corrected fact is re-indexed everywhere, so semantic and keyword recall
83
+ reflect the new content instead of a stale copy.
84
+ - Archived facts are excluded from every read path, including keyword search
85
+ and direct fetch.
86
+ - Schema migrations refuse to run against a database written by a newer build,
87
+ and a migration whose dependency did not complete is held back.
88
+ - In-memory configuration changes are preserved across a save, and unknown or
89
+ externally tuned settings survive a load/save cycle.
90
+
91
+ ### Backup scope and offline guidance (correction)
92
+
93
+ *Correction 2026-08-08 — the 2026-08-01 text “Backups are captured as a
94
+ coherent, checksum-verified set and restored atomically …” described the
95
+ `BackupCoordinator` primitive, not the wired production path. The production
96
+ path ( `BackupManager.create_backup()` / `server/routes/backup.py` /
97
+ `maintenance_scheduler` auto-backup / cloud sync / dashboard **Export**
98
+ ) remains independent per-file `sqlite3.backup()` snapshots; this entry is
99
+ preserved with this pointer rather than silently rewritten.*
100
+
101
+ - Included stores (legacy path): `memory.db`, `learning.db`, `audit_chain.db`,
102
+ `code_graph.db`, `pending.db`, `audit.db` — only those present on disk; no
103
+ other files are backed up. `memory-*.db` is the primary snapshot;
104
+ `_backup_all_dbs()` copies remaining managed DBs one-by-one.
105
+ Companion-copy exceptions are caught and logged at `warning` as non-critical.
106
+ `lance/` (LanceDB directory) is **not** included by the legacy path; the
107
+ coherent primitive handles it as an out-of-manifest companion.
108
+ - Exclusions: nothing outside `MANAGED_DATABASES`; no coherent epoch or
109
+ cross-store manifest/rollback claim for the production path.
110
+ - Dashboard **Export** (`POST /api/backup/export`) creates a single compressed
111
+ `.db.gz` from the latest `memory.db` snapshot only (`memory-*.db` → gzip).
112
+ It is not a coherent whole-root export.
113
+ - No `BackupCoordinator` epoch/atomic-set / whole-root backup is wired to
114
+ production routes or `slm` subcommands in this release.
115
+ - Legacy backup destination files follow the process **umask**, not source-file
116
+ permission inheritance; there is no unwired whole-root restore route. For
117
+ offline whole-root backup/restore, `slm serve stop` (stop the daemon) first
118
+ so WAL/SHM are checkpointed, then copy the complete data-root store set
119
+ (all present `*.db` plus `-wal`/`-shm` sidecars and `lance/` if present)
120
+ with the destination directory on an encrypted/private volume; verify
121
+ resulting files are owner-only (`0600`/`0700`) after copy.
122
+ - Legacy backup destination follows process umask; do not claim source
123
+ permission inheritance.
124
+
125
+ ### Notes
126
+ - Existing memories and configuration are preserved. V4.0.0 M038 (eager) and
127
+ M039 (deferred) are auto-applied at startup; no manual `slm db migrate` is
128
+ normally required. Downgrade requires a verified pre-upgrade complete backup
129
+ (stop daemon before offline copy, include WAL/SHM). No `slm db migrate
130
+ --rollback`; use restore of that backup instead.
144
131
 
145
132
  ## [3.8.10] - 2026-07-29 — Reliable startup and MCP writes
146
133
 
@@ -2403,7 +2390,7 @@ Hardening release — correctness, stability, and security fixes.
2403
2390
  **Varun Pratap Bhardwaj**
2404
2391
  *Solution Architect*
2405
2392
 
2406
- SuperLocalMemory V3 - Intelligent local memory system for AI coding assistants.
2393
+ SuperLocalMemory V4 - Intelligent local memory system for AI coding assistants.
2407
2394
 
2408
2395
  ---
2409
2396
 
@@ -2841,7 +2828,7 @@ We use [Semantic Versioning](https://semver.org/):
2841
2828
  - **MINOR:** New features (backward compatible, e.g., 2.0.0 → 2.1.0)
2842
2829
  - **PATCH:** Bug fixes (backward compatible, e.g., 2.1.0 → 2.1.1)
2843
2830
 
2844
- **Current Version:** v3.3.0
2831
+ **Current Version:** v4.0.0 (see top of this file for the active release entry)
2845
2832
  **Website:** [superlocalmemory.com](https://superlocalmemory.com)
2846
2833
  **npm:** `npm install -g superlocalmemory`
2847
2834
 
@@ -2849,7 +2836,7 @@ We use [Semantic Versioning](https://semver.org/):
2849
2836
 
2850
2837
  ## License
2851
2838
 
2852
- SuperLocalMemory V3 is released under the [Elastic License 2.0](LICENSE).
2839
+ Early SuperLocalMemory V3 packaging used the [Elastic License 2.0](LICENSE); the current public project license is AGPL-3.0-or-later (see LICENSE at the repository root).
2853
2840
 
2854
2841
  ---
2855
2842