superlocalmemory 4.0.0 → 4.0.2

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 (83) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +11 -11
  3. package/package.json +1 -1
  4. package/plugin/.claude-plugin/plugin.json +1 -1
  5. package/plugin/CLAUDE.md +3 -3
  6. package/plugin/agents/slm-governance-advisor.md +1 -1
  7. package/plugin/agents/slm-loop-runner.md +1 -1
  8. package/plugin/agents/slm-memory-advisor.md +1 -1
  9. package/plugin/agents/slm-optimize-advisor.md +1 -1
  10. package/plugin/requirements.txt +1 -1
  11. package/plugin/skills/slm-cache/SKILL.md +1 -1
  12. package/plugin/skills/slm-compress/SKILL.md +1 -1
  13. package/plugin/skills/slm-governance/SKILL.md +1 -1
  14. package/plugin/skills/slm-graph/SKILL.md +1 -1
  15. package/plugin/skills/slm-loop/SKILL.md +1 -1
  16. package/plugin/skills/slm-mesh/SKILL.md +1 -1
  17. package/plugin/skills/slm-profile/SKILL.md +1 -1
  18. package/plugin/skills/slm-recall/SKILL.md +1 -1
  19. package/plugin/skills/slm-remember/SKILL.md +1 -1
  20. package/plugin/skills/slm-scope/SKILL.md +1 -1
  21. package/plugin/skills/slm-session/SKILL.md +1 -1
  22. package/plugin/skills/slm-status/SKILL.md +1 -1
  23. package/plugin-src/rules/AGENTS.md +1 -1
  24. package/plugin-src/skills/slm-cache/SKILL.md +1 -1
  25. package/plugin-src/skills/slm-compress/SKILL.md +1 -1
  26. package/plugin-src/skills/slm-governance/SKILL.md +1 -1
  27. package/plugin-src/skills/slm-graph/SKILL.md +1 -1
  28. package/plugin-src/skills/slm-loop/SKILL.md +1 -1
  29. package/plugin-src/skills/slm-mesh/SKILL.md +1 -1
  30. package/plugin-src/skills/slm-profile/SKILL.md +1 -1
  31. package/plugin-src/skills/slm-recall/SKILL.md +1 -1
  32. package/plugin-src/skills/slm-remember/SKILL.md +1 -1
  33. package/plugin-src/skills/slm-scope/SKILL.md +1 -1
  34. package/plugin-src/skills/slm-session/SKILL.md +1 -1
  35. package/plugin-src/skills/slm-status/SKILL.md +1 -1
  36. package/pyproject.toml +5 -4
  37. package/src/superlocalmemory/__init__.py +1 -1
  38. package/src/superlocalmemory/cli/commands.py +60 -1
  39. package/src/superlocalmemory/cli/main.py +24 -1
  40. package/src/superlocalmemory/compliance/gdpr.py +104 -73
  41. package/src/superlocalmemory/contracts/__init__.py +1 -0
  42. package/src/superlocalmemory/contracts/schemas/agent-experience-v1.schema.json +92 -0
  43. package/src/superlocalmemory/contracts/schemas/agent-integration-contract-v2.schema.json +46 -0
  44. package/src/superlocalmemory/contracts/schemas/cognitive-turn-receipt-v1.schema.json +59 -0
  45. package/src/superlocalmemory/contracts/v402.py +62 -0
  46. package/src/superlocalmemory/core/engine.py +10 -0
  47. package/src/superlocalmemory/core/recall_pipeline.py +6 -0
  48. package/src/superlocalmemory/core/recall_worker.py +12 -0
  49. package/src/superlocalmemory/core/worker_pool.py +12 -0
  50. package/src/superlocalmemory/hooks/hook_handlers.py +16 -0
  51. package/src/superlocalmemory/hooks/post_tool_outcome_hook.py +12 -6
  52. package/src/superlocalmemory/hooks/session_registry.py +136 -3
  53. package/src/superlocalmemory/hooks/user_prompt_hook.py +9 -2
  54. package/src/superlocalmemory/integrations/__init__.py +1 -0
  55. package/src/superlocalmemory/integrations/bounded_loops_v051.py +236 -0
  56. package/src/superlocalmemory/learning/database.py +21 -14
  57. package/src/superlocalmemory/mcp/_daemon_proxy.py +9 -0
  58. package/src/superlocalmemory/mcp/server.py +5 -0
  59. package/src/superlocalmemory/mcp/tools_brain.py +132 -0
  60. package/src/superlocalmemory/mcp/tools_core.py +25 -6
  61. package/src/superlocalmemory/mcp/tools_v3.py +16 -2
  62. package/src/superlocalmemory/retrieval/engine.py +43 -1
  63. package/src/superlocalmemory/retrieval/temporal_utils.py +16 -1
  64. package/src/superlocalmemory/retrieval/temporal_validity_filter.py +151 -0
  65. package/src/superlocalmemory/server/routes/brain.py +206 -1
  66. package/src/superlocalmemory/server/routes/helpers.py +53 -35
  67. package/src/superlocalmemory/server/routes/v3_api.py +118 -11
  68. package/src/superlocalmemory/server/ui.py +7 -2
  69. package/src/superlocalmemory/server/unified_daemon.py +37 -4
  70. package/src/superlocalmemory/storage/_migration_internals.py +4 -0
  71. package/src/superlocalmemory/storage/_schema_version.py +2 -2
  72. package/src/superlocalmemory/storage/agent_experience.py +490 -0
  73. package/src/superlocalmemory/storage/database.py +189 -34
  74. package/src/superlocalmemory/storage/migration_runner.py +8 -0
  75. package/src/superlocalmemory/storage/migrations/M015_add_pinned_column.py +18 -0
  76. package/src/superlocalmemory/storage/migrations/M040_agent_experience_receipts.py +254 -0
  77. package/src/superlocalmemory/storage/migrations/__init__.py +2 -0
  78. package/src/superlocalmemory/storage/schema.py +4 -0
  79. package/src/superlocalmemory/ui/index.html +2 -2
  80. package/src/superlocalmemory/ui/js/auto-settings.js +18 -14
  81. package/src/superlocalmemory/ui/js/brain.js +57 -1
  82. package/src/superlocalmemory/ui/js/od-brain.js +114 -40
  83. package/src/superlocalmemory/ui/js/od-settings.js +8 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,41 @@ All notable changes to SuperLocalMemory will be documented in this file.
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
+ ## [4.0.2] - 2026-08-15 — Portable Living Brain evidence
9
+
10
+ ### Added
11
+ - Profile-scoped Agent Experience and Cognitive Turn receipts live in the
12
+ separate `learning.db` plane, with contract validation, short bounded writes,
13
+ idempotency, migration verification, and profile-erasure cleanup.
14
+ - A portable Brain evidence interface for MCP clients, a read-only
15
+ `slm brain --json` CLI view, and an honest Living Brain dashboard panel.
16
+ - A bounded-loops 0.5.1 public-CLI observation adapter that preserves the
17
+ unverified boundary: imported loop output cannot teach SLM automatically.
18
+
19
+ ### Fixed
20
+ - Current recall now excludes system-superseded facts, including candidates
21
+ reintroduced by bridge/scene expansion and stale session pins. Historical
22
+ `as_of` recall preserves the prior record where appropriate.
23
+ - Dashboard model configuration preserves unspecified provider/mode fields and
24
+ does not overwrite redacted endpoint values on a reload/save cycle.
25
+
26
+ ### Safety
27
+ - Receipt writes use a separate SQLite writer domain with a sub-second busy
28
+ deadline. Mixed foreground memory traffic under receipt load is regression
29
+ tested with a p95 budget below two seconds; receipt evidence remains
30
+ observation-only and never changes retrieval, ranking, or routing by itself.
31
+
32
+ ## [4.0.1] - 2026-08-09 — Dashboard and operations-status correctness
33
+
34
+ ### Fixed
35
+ - The packaged dashboard identifies itself as SuperLocalMemory V4 and uses an
36
+ absolute packaged favicon path. Both unified and standalone dashboard servers
37
+ now provide the conventional `/favicon.ico` route by redirecting to the
38
+ packaged SVG icon.
39
+ - The daemon's operations-status counters now receive their FastAPI application
40
+ explicitly, so persisted dead-letter, degraded-manifest, and exhausted-
41
+ obligation counts cannot be silently reported as zero.
42
+
8
43
  ## [4.0.0] - 2026-08-01 — Verifiable memory transactions
9
44
 
10
45
  Version 4.0 hardens the full lifecycle of a memory operation — admission,
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </picture>
6
6
  </p>
7
7
 
8
- <h1 align="center">SuperLocalMemory V4.0.0</h1>
8
+ <h1 align="center">SuperLocalMemory V4.0.2</h1>
9
9
 
10
10
  <h2 align="center">Rent the LLM. Own the memory.</h2>
11
11
 
@@ -27,12 +27,14 @@ guarantee here is stated as a falsifiable invariant, tested under an adversarial
27
27
  negative control, and shipped with the harness that regenerates the evidence:
28
28
  <code>python benchmark/run_all.py --trials 200 --output-dir results/</code>. What each experiment
29
29
  does <em>not</em> exercise is stated too.</p>
30
- <p align="center"><code>v4.0.0</code> — one control plane: <strong>SLM-Mesh</strong> peer coordination · multi-scope memory (personal / shared / global) · profiles · Cache · Compress · 7-layer retrieval · code graph · Entity Explorer · skill evolution · Modes A/B/C · GDPR retention &amp; audit chain · bounded loops — across CLI, MCP, dashboard, the <strong>Claude plugin</strong>, the <strong>Codex add-on</strong>, and documented IDE integrations.<br/>
30
+ <p align="center"><code>v4.0.2</code> — one control plane: <strong>SLM-Mesh</strong> peer coordination · multi-scope memory (personal / shared / global) · profiles · Cache · Compress · 7-layer retrieval · code graph · Entity Explorer · skill evolution · Modes A/B/C · GDPR retention &amp; audit chain · bounded loops — across CLI, MCP, dashboard, the <strong>Claude plugin</strong>, the <strong>Codex add-on</strong>, and documented IDE integrations.<br/>
31
31
  Proxy: <code>slm wrap claude</code> &nbsp;·&nbsp; MCP: add <code>slm_compress</code> to your config &nbsp;·&nbsp; Skill: zero-config</p>
32
- <p align="center"><strong>3 public research preprints</strong> (arXiv + Zenodo archives) · <a href="https://arxiv.org/abs/2603.02240">arXiv:2603.02240</a> · <a href="https://arxiv.org/abs/2603.14588">arXiv:2603.14588</a> · <a href="https://arxiv.org/abs/2604.04514">arXiv:2604.04514</a></p>
32
+ <p align="center"><strong>Four public arXiv preprints</strong> · V4: <a href="https://arxiv.org/abs/2608.08253">arXiv:2608.08253</a> · companion archive: <a href="https://zenodo.org/records/21853302">Zenodo 21853302</a> (<a href="https://doi.org/10.5281/zenodo.21853302">DOI 10.5281/zenodo.21853302</a>) · prior preprints: <a href="https://arxiv.org/abs/2603.02240">2603.02240</a> · <a href="https://arxiv.org/abs/2603.14588">2603.14588</a> · <a href="https://arxiv.org/abs/2604.04514">2604.04514</a>.</p>
33
33
 
34
34
  <p align="center">
35
- <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/v4.0.0-Current_Release-2ea44f?style=for-the-badge&logo=checkmarx&logoColor=white" alt="v4.0.0 — Current Release"/></a>
35
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/v4.0.2-Current_Release-2ea44f?style=for-the-badge&logo=checkmarx&logoColor=white" alt="v4.0.2 — Current Release"/></a>
36
+ <a href="https://arxiv.org/abs/2608.08253"><img src="https://img.shields.io/badge/arXiv-2608.08253-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white" alt="SuperLocalMemory 4.0 paper on arXiv:2608.08253"/></a>
37
+ <a href="https://zenodo.org/records/21853302"><img src="https://img.shields.io/badge/Zenodo-10.5281%2Fzenodo.21853302-1682D4?style=for-the-badge&logo=zenodo&logoColor=white" alt="V4 paper on Zenodo: 10.5281/zenodo.21853302"/></a>
36
38
  <a href="https://arxiv.org/abs/2603.14588"><img src="https://img.shields.io/badge/arXiv-2603.14588-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white" alt="arXiv Paper"/></a>
37
39
  <a href="#three-surfaces-proxy--mcp-tools--skill"><img src="https://img.shields.io/badge/Proxy_|_MCP_|_Skill-22c55e?style=for-the-badge" alt="Three Surfaces: Proxy, MCP Tools, Skill"/></a>
38
40
  <a href="https://pypi.org/project/superlocalmemory/"><img src="https://img.shields.io/pypi/v/superlocalmemory?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI"/></a>
@@ -60,7 +62,7 @@ SuperLocalMemory V4 combines conventional dense and lexical retrieval with graph
60
62
 
61
63
  **Memory with a sense of time.** SLM does not only store *what* an agent learned — it records *when*. Every fact carries ingestion timing and provenance; recall runs a dedicated temporal candidate channel alongside semantic, lexical, and associative retrieval; scenes and entity timelines reconstruct sequence; and the lifecycle lets neglected memory decay and self-archive instead of growing without bound. Time is a first-class ranking and lifecycle signal rather than a timestamp column an agent never reads — which is what lets a long-lived agent reason about how its context changed, not only what it currently holds.
62
64
 
63
- **What V4.0.0 ships.** V4 is a *governed* local-first control plane — every canonical write is admitted, policy-authorized, tracked as durable per-store obligations (lexical, temporal, vector), and sealed by a completion manifest, so it is either fully applied or explicitly marked degraded, never silently half-done. Flagship surfaces in this release:
65
+ **What V4.0.2 ships.** V4 is a *governed* local-first control plane — every canonical write is admitted, policy-authorized, tracked as durable per-store obligations (lexical, temporal, vector), and sealed by a completion manifest, so it is either fully applied or explicitly marked degraded, never silently half-done. Flagship surfaces in this release:
64
66
 
65
67
  - **[SLM-Mesh](#slm-mesh-cross-session--cross-machine-coordination)** — authenticated cross-session and cross-machine peer coordination (messages, locks, shared state, inbox/outbox, optional discovery). Coordination only — not automatic replicated memory.
66
68
  - **Multi-scope memory & profiles** — workspaces (profiles) plus `personal` / `shared` / `global` scopes; cross-profile recall is default-deny.
@@ -693,11 +695,11 @@ configuration for that framework.
693
695
  Open the web dashboard with `slm dashboard`; workspaces appear only when their
694
696
  runtime capability is enabled and healthy. See [CHANGELOG.md](CHANGELOG.md) for
695
697
  the complete release history.
696
-
697
698
  ## Research Papers
698
699
 
699
- SuperLocalMemory is backed by three preprints by Varun Pratap Bhardwaj (2026):
700
+ SuperLocalMemory has a V4 arXiv preprint with a companion Zenodo archive, plus three earlier arXiv preprints (2026):
700
701
 
702
+ - **SuperLocalMemory 4.0: The Governed Memory Operating System for AI Agents:** [arXiv:2608.08253](https://arxiv.org/abs/2608.08253) · [Zenodo 21853302](https://zenodo.org/records/21853302) · [DOI 10.5281/zenodo.21853302](https://doi.org/10.5281/zenodo.21853302).
701
703
  - **The Living Brain (V3.3):** [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) · [Zenodo 19435120](https://zenodo.org/records/19435120)
702
704
  - **Information-Geometric Foundations (V3):** [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) · [Zenodo 19038659](https://zenodo.org/records/19038659)
703
705
  - **Trust & Behavioral Foundations (V2):** [arXiv:2603.02240](https://arxiv.org/abs/2603.02240) · [Zenodo 18709670](https://zenodo.org/records/18709670)
@@ -705,11 +707,9 @@ SuperLocalMemory is backed by three preprints by Varun Pratap Bhardwaj (2026):
705
707
  Use the citation metadata on the linked arXiv or Zenodo records.
706
708
 
707
709
  ## Support / License / Qualixar
708
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation.
709
- GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE).
710
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines, the [Wiki](https://github.com/qualixar/superlocalmemory/wiki) for detailed documentation, and [LICENSE](LICENSE) for the GNU Affero General Public License v3.0 (AGPL-3.0).
710
711
  For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
711
- Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
712
- Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
712
+ Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar · Part of [Qualixar](https://qualixar.com) · Author: [Varun Pratap Bhardwaj](https://varunpratap.com)
713
713
  Acknowledgments: [Everything Claude Code](https://github.com/affaan-m/everything-claude-code) informed skill observation; [HKUDS/OpenSpace](https://github.com/HKUDS/OpenSpace) informed skill-evolution verification.
714
714
  Qualixar builds open-source infrastructure for AI reliability engineering. Start at [qualixar.com](https://qualixar.com) or browse the [research archive](https://huggingface.co/Qualixar).
715
715
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlocalmemory",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Local-first agent memory with MCP and an agent-native CLI. Documented clients include Claude Code, Cursor, and Windsurf.",
5
5
  "keywords": [
6
6
  "ai-memory",
@@ -15,5 +15,5 @@
15
15
  "mcpServers": "./.mcp.json",
16
16
  "name": "superlocalmemory",
17
17
  "repository": "https://github.com/qualixar/superlocalmemory",
18
- "version": "4.0.0"
18
+ "version": "4.0.2"
19
19
  }
package/plugin/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- BEGIN SuperLocalMemory v4.0.0 -->
1
+ <!-- BEGIN SuperLocalMemory v4.0.2 -->
2
2
 
3
3
  ## SuperLocalMemory (SLM) — Agent Rules
4
4
 
@@ -39,6 +39,6 @@ slm-recall · slm-remember · slm-session · slm-status · slm-cache · slm-comp
39
39
  ### Subagents
40
40
  slm-memory-advisor (memory decisions, session hygiene, scope/profile guidance) · slm-optimize-advisor (context compression + KV cache) · slm-governance-advisor (scope/roles/compliance/GDPR)
41
41
 
42
- <!-- END SuperLocalMemory v4.0.0 -->
42
+ <!-- END SuperLocalMemory v4.0.2 -->
43
43
 
44
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
44
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -77,4 +77,4 @@ slm-scope · slm-governance · slm-profile · slm-remember · slm-recall
77
77
  # What NOT to do
78
78
  Never session_init twice; never forget without dry-run preview; never store secrets; never bypass role checks; never claim an erasure succeeded without verifying via recall.
79
79
 
80
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
80
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -68,4 +68,4 @@ assessment. The gate is the authority.
68
68
 
69
69
  ---
70
70
 
71
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
71
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -46,4 +46,4 @@ slm-recall · slm-remember · slm-session · slm-scope · slm-profile · slm-gov
46
46
  # What NOT to do
47
47
  Never session_init twice; never forget dry_run=False without reporting preview; never dump a whole file into remember; never invent a memory; never claim "saved" without success:true / clean CLI exit; never bypass scope or governance restrictions.
48
48
 
49
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
49
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -41,4 +41,4 @@ slm-compress · slm-cache · slm-status · slm-profile
41
41
  # What NOT to do
42
42
  Never compress code-for-edit/JSON-to-parse/<500 chars; never store secrets/ccr_ids; never let optimize failure block/alter the task; never claim a specific savings %; never carry ccr_ids across profile switches.
43
43
 
44
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
44
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -1 +1 @@
1
- superlocalmemory==4.0.0
1
+ superlocalmemory==4.0.2
@@ -145,4 +145,4 @@ These subcommands control daemon-level cache settings. They do not read or write
145
145
 
146
146
  ---
147
147
 
148
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
148
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -147,4 +147,4 @@ Content over 1 MB (1 000 000 bytes UTF-8) is processed but `reversible` is force
147
147
 
148
148
  ---
149
149
 
150
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
150
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -245,4 +245,4 @@ Before running any destructive operation (`forget`, `compact_memories`):
245
245
 
246
246
  ---
247
247
 
248
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
248
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -311,4 +311,4 @@ profile. See `slm-profile` for the full profile switching workflow.
311
311
 
312
312
  ---
313
313
 
314
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
314
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -96,4 +96,4 @@ paused, name the approval needed; when errored, quote the short detail.
96
96
 
97
97
  ---
98
98
 
99
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
99
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -279,4 +279,4 @@ mesh availability.
279
279
 
280
280
  ---
281
281
 
282
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
282
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -145,4 +145,4 @@ Name them differently in your MCP config (e.g. `superlocalmemory-personal` and
145
145
 
146
146
  ---
147
147
 
148
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
148
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -236,4 +236,4 @@ before recalling, then switch back. See `slm-profile` for workspace switching.
236
236
 
237
237
  ---
238
238
 
239
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
239
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -238,4 +238,4 @@ different workspace, use `switch_profile` first. See `slm-profile`.
238
238
 
239
239
  ---
240
240
 
241
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
241
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -173,4 +173,4 @@ to review the impact. See `slm-remember` for the full deletion discipline.
173
173
 
174
174
  ---
175
175
 
176
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
176
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -227,4 +227,4 @@ explicitly and call `recall` with `include_global`/`include_shared` after
227
227
 
228
228
  ---
229
229
 
230
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
230
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -163,4 +163,4 @@ multi-profile setup. To switch the active profile, see `slm-profile`.
163
163
 
164
164
  ---
165
165
 
166
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
166
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -128,4 +128,4 @@ When the SLM MCP server is unavailable, use these CLI equivalents:
128
128
  - **slm-optimize-advisor** — context compression and KV cache
129
129
  - **slm-governance-advisor** — scope/role compliance, retention policies, GDPR
130
130
 
131
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
131
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -145,4 +145,4 @@ These subcommands control daemon-level cache settings. They do not read or write
145
145
 
146
146
  ---
147
147
 
148
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
148
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -147,4 +147,4 @@ Content over 1 MB (1 000 000 bytes UTF-8) is processed but `reversible` is force
147
147
 
148
148
  ---
149
149
 
150
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
150
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -245,4 +245,4 @@ Before running any destructive operation (`forget`, `compact_memories`):
245
245
 
246
246
  ---
247
247
 
248
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
248
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -311,4 +311,4 @@ profile. See `slm-profile` for the full profile switching workflow.
311
311
 
312
312
  ---
313
313
 
314
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
314
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -96,4 +96,4 @@ paused, name the approval needed; when errored, quote the short detail.
96
96
 
97
97
  ---
98
98
 
99
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
99
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
@@ -279,4 +279,4 @@ mesh availability.
279
279
 
280
280
  ---
281
281
 
282
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
282
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -145,4 +145,4 @@ Name them differently in your MCP config (e.g. `superlocalmemory-personal` and
145
145
 
146
146
  ---
147
147
 
148
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
148
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -236,4 +236,4 @@ before recalling, then switch back. See `slm-profile` for workspace switching.
236
236
 
237
237
  ---
238
238
 
239
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
239
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -238,4 +238,4 @@ different workspace, use `switch_profile` first. See `slm-profile`.
238
238
 
239
239
  ---
240
240
 
241
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
241
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -173,4 +173,4 @@ to review the impact. See `slm-remember` for the full deletion discipline.
173
173
 
174
174
  ---
175
175
 
176
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
176
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -227,4 +227,4 @@ explicitly and call `recall` with `include_global`/`include_shared` after
227
227
 
228
228
  ---
229
229
 
230
- *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
230
+ *SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later*
@@ -163,4 +163,4 @@ multi-profile setup. To switch the active profile, see `slm-profile`.
163
163
 
164
164
  ---
165
165
 
166
- SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
166
+ SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "superlocalmemory"
3
- version = "4.0.0"
3
+ version = "4.0.2"
4
4
  description = "Local-first agent memory with auditable hybrid retrieval"
5
5
  readme = "README.md"
6
6
  license = "AGPL-3.0-or-later"
@@ -37,6 +37,7 @@ dependencies = [
37
37
  "scipy==1.17.1",
38
38
  "networkx==3.6.1",
39
39
  "mcp==2.0.0",
40
+ "jsonschema==4.26.0",
40
41
  "python-dateutil==2.9.0.post0",
41
42
  "rank-bm25==0.2.2",
42
43
  "vadersentiment==3.3.2",
@@ -90,8 +91,8 @@ dependencies = [
90
91
  # the ~560MB model downloads on first setup/warmup (fail-open). Verified the
91
92
  # pin does NOT disturb the transformers/torch/numpy pins above.
92
93
  "llmlingua==0.2.2",
93
- # LLMLingua pulls NLTK transitively. Pin the patched release so clean
94
- # installs cannot resolve to the vulnerable 3.9.x line.
94
+ # LLMLingua pulls NLTK transitively. Pin above the disclosed traversal
95
+ # advisories so clean installs cannot resolve to the vulnerable 3.9.x line.
95
96
  "nltk==3.10.0",
96
97
  ]
97
98
 
@@ -170,7 +171,7 @@ build-backend = "setuptools.build_meta"
170
171
  where = ["src"]
171
172
 
172
173
  [tool.setuptools.package-data]
173
- superlocalmemory = ["ui/**/*", "optimize/NOTICE"]
174
+ superlocalmemory = ["ui/**/*", "optimize/NOTICE", "contracts/schemas/*.json"]
174
175
 
175
176
  [tool.setuptools.data-files]
176
177
  "share/superlocalmemory/codex/skills/slm-cache" = ["plugin-src/skills/slm-cache/SKILL.md"]
@@ -32,7 +32,7 @@ if "OMP_NUM_THREADS" not in os.environ:
32
32
  os.environ["OMP_NUM_THREADS"] = "2"
33
33
  # ---------------------------------------------------------------------------
34
34
 
35
- __version__ = "4.0.0"
35
+ __version__ = "4.0.2"
36
36
 
37
37
  _REQUIRED_VERSIONS = {
38
38
  "sentence_transformers": "5.3.0",
@@ -349,6 +349,7 @@ def dispatch(args: Namespace) -> None:
349
349
  "delete": cmd_delete,
350
350
  "update": cmd_update,
351
351
  "status": cmd_status,
352
+ "brain": cmd_brain,
352
353
  "health": cmd_health,
353
354
  "doctor": cmd_doctor,
354
355
  "trace": cmd_trace,
@@ -1486,10 +1487,27 @@ def cmd_recall(args: Namespace) -> None:
1486
1487
  _sys.exit(1)
1487
1488
  _as_of = _as_of_norm
1488
1489
  as_of_qs = f"&as_of={quote(_as_of)}" if _as_of else ""
1490
+ def _strict_time_qs(attr: str, parameter: str) -> str:
1491
+ raw = getattr(args, attr, "") or ""
1492
+ if not raw:
1493
+ return ""
1494
+ from superlocalmemory.retrieval.temporal_utils import normalize_as_of
1495
+ normalized = normalize_as_of(raw)
1496
+ if normalized is None:
1497
+ import sys as _sys
1498
+ _sys.stderr.write(
1499
+ f"Error: invalid --{attr.replace('_', '-')} value: {raw!r}\n"
1500
+ )
1501
+ _sys.exit(1)
1502
+ return f"&{parameter}={quote(normalized)}"
1503
+ known_as_of_qs = _strict_time_qs("known_as_of", "known_as_of")
1504
+ valid_at_qs = _strict_time_qs("valid_at", "valid_at")
1505
+ unknown_qs = "&include_unknown=true" if getattr(args, "include_unknown", False) else ""
1489
1506
  result = daemon_request(
1490
1507
  "GET",
1491
1508
  f"/recall?q={quote(args.query)}&limit={args.limit}"
1492
- f"&session_id={quote(session_id)}{fast_qs}{scope_qs}{window_qs}{as_of_qs}",
1509
+ f"&session_id={quote(session_id)}{fast_qs}{scope_qs}{window_qs}{as_of_qs}"
1510
+ f"{known_as_of_qs}{valid_at_qs}{unknown_qs}",
1493
1511
  )
1494
1512
  if result and "results" in result:
1495
1513
  # Format daemon response same as engine response
@@ -3680,6 +3698,47 @@ def cmd_session_context(args: Namespace) -> None:
3680
3698
  logger.debug("session-context (fast) failed: %s", exc)
3681
3699
 
3682
3700
 
3701
+ def cmd_brain(args: Namespace) -> None:
3702
+ """Read the portable, profile-scoped Agent Experience evidence summary.
3703
+
3704
+ This command deliberately opens no memory engine and starts no daemon. It
3705
+ is an indexed ``learning.db`` read, so support scripts and non-technical
3706
+ users can inspect the Living Brain without affecting recall latency.
3707
+ """
3708
+ from superlocalmemory.core.config import SLMConfig
3709
+ from superlocalmemory.infra.data_root import state_path
3710
+ from superlocalmemory.storage.agent_experience import get_profile_receipt_summary
3711
+
3712
+ config = SLMConfig.load()
3713
+ profile_id = config.active_profile
3714
+ data = {
3715
+ "profile_id": profile_id,
3716
+ "agent_experience": get_profile_receipt_summary(
3717
+ state_path("learning.db"), profile_id
3718
+ ),
3719
+ "control_plane": "observation_only",
3720
+ }
3721
+ if getattr(args, "json", False):
3722
+ from superlocalmemory.cli.json_output import json_print
3723
+
3724
+ json_print("brain", data=data, next_actions=[
3725
+ {"command": "slm dashboard", "description": "Open the Living Brain dashboard"},
3726
+ ])
3727
+ return
3728
+ evidence = data["agent_experience"]
3729
+ print("SuperLocalMemory Living Brain")
3730
+ print(f" Profile: {profile_id}")
3731
+ print(f" Agent experiences: {evidence['experiences_total']}")
3732
+ print(f" Claimed evidence authority: {evidence['claimed_evidence_experiences']}")
3733
+ print(f" Cognitive turns: {evidence['turns_total']}")
3734
+ if evidence["turns_by_state"]:
3735
+ states = ", ".join(
3736
+ f"{state}: {count}" for state, count in sorted(evidence["turns_by_state"].items())
3737
+ )
3738
+ print(f" Turn states: {states}")
3739
+ print(" Retrieval control: observation only")
3740
+
3741
+
3683
3742
  def cmd_observe(args: Namespace) -> None:
3684
3743
  """Evaluate and auto-capture content from stdin or argument.
3685
3744
 
@@ -64,7 +64,7 @@ examples:
64
64
  documentation:
65
65
  Website: https://superlocalmemory.com
66
66
  GitHub: https://github.com/qualixar/superlocalmemory
67
- Paper: https://arxiv.org/abs/2603.14588
67
+ Paper: https://arxiv.org/abs/2608.08253
68
68
  """
69
69
 
70
70
 
@@ -75,6 +75,8 @@ _NO_DAEMON_COMMANDS = {
75
75
  "disable", "enable", "clear-cache", "reconfigure", "benchmark",
76
76
  "rotate-token",
77
77
  "evidence",
78
+ # v4.0.2 receipt summary is a direct read-only learning.db query.
79
+ "brain",
78
80
  "diagnostics",
79
81
  # LLD-06 — agents launched through wrap start the daemon on demand.
80
82
  "wrap",
@@ -394,6 +396,18 @@ def main() -> None:
394
396
  "(2026-01-01T00:00:00+00:00) that pins retrieval to a temporal "
395
397
  "snapshot. Default: current-state recall.",
396
398
  )
399
+ recall_p.add_argument(
400
+ "--known-as-of", dest="known_as_of", default="",
401
+ help="Strict transaction-time boundary: return only facts SLM knew by this ISO-8601 time.",
402
+ )
403
+ recall_p.add_argument(
404
+ "--valid-at", dest="valid_at", default="",
405
+ help="Strict event-time boundary: return only facts valid at this ISO-8601 time.",
406
+ )
407
+ recall_p.add_argument(
408
+ "--include-unknown", action="store_true",
409
+ help="Include pre-4.0.2 facts with unknown temporal provenance in strict time-travel.",
410
+ )
397
411
  recall_p.add_argument(
398
412
  "--fast", action="store_true",
399
413
  help="Force-skip the internal agentic verification round (all six retrieval "
@@ -606,6 +620,15 @@ def main() -> None:
606
620
  obs_p = sub.add_parser("observe", help="Auto-capture content (pipe or argument)")
607
621
  obs_p.add_argument("content", nargs="?", default="", help="Content to evaluate")
608
622
 
623
+ brain_p = sub.add_parser(
624
+ "brain", help="Show the local, profile-scoped Living Brain evidence summary"
625
+ )
626
+ brain_p.add_argument(
627
+ "action", nargs="?", default="status", choices=["status"],
628
+ help="Read-only Brain action (default: status)",
629
+ )
630
+ brain_p.add_argument("--json", action="store_true", help="Output structured JSON")
631
+
609
632
  # -- V3.3 Commands -------------------------------------------------
610
633
  decay_p = sub.add_parser("decay", help="Run Ebbinghaus forgetting decay cycle")
611
634
  decay_p.add_argument(