superlocalmemory 4.0.1 → 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.
- package/CHANGELOG.md +24 -0
- package/README.md +10 -11
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/CLAUDE.md +3 -3
- package/plugin/agents/slm-governance-advisor.md +1 -1
- package/plugin/agents/slm-loop-runner.md +1 -1
- package/plugin/agents/slm-memory-advisor.md +1 -1
- package/plugin/agents/slm-optimize-advisor.md +1 -1
- package/plugin/requirements.txt +1 -1
- package/plugin/skills/slm-cache/SKILL.md +1 -1
- package/plugin/skills/slm-compress/SKILL.md +1 -1
- package/plugin/skills/slm-governance/SKILL.md +1 -1
- package/plugin/skills/slm-graph/SKILL.md +1 -1
- package/plugin/skills/slm-loop/SKILL.md +1 -1
- package/plugin/skills/slm-mesh/SKILL.md +1 -1
- package/plugin/skills/slm-profile/SKILL.md +1 -1
- package/plugin/skills/slm-recall/SKILL.md +1 -1
- package/plugin/skills/slm-remember/SKILL.md +1 -1
- package/plugin/skills/slm-scope/SKILL.md +1 -1
- package/plugin/skills/slm-session/SKILL.md +1 -1
- package/plugin/skills/slm-status/SKILL.md +1 -1
- package/plugin-src/rules/AGENTS.md +1 -1
- package/plugin-src/skills/slm-cache/SKILL.md +1 -1
- package/plugin-src/skills/slm-compress/SKILL.md +1 -1
- package/plugin-src/skills/slm-governance/SKILL.md +1 -1
- package/plugin-src/skills/slm-graph/SKILL.md +1 -1
- package/plugin-src/skills/slm-loop/SKILL.md +1 -1
- package/plugin-src/skills/slm-mesh/SKILL.md +1 -1
- package/plugin-src/skills/slm-profile/SKILL.md +1 -1
- package/plugin-src/skills/slm-recall/SKILL.md +1 -1
- package/plugin-src/skills/slm-remember/SKILL.md +1 -1
- package/plugin-src/skills/slm-scope/SKILL.md +1 -1
- package/plugin-src/skills/slm-session/SKILL.md +1 -1
- package/plugin-src/skills/slm-status/SKILL.md +1 -1
- package/pyproject.toml +3 -2
- package/src/superlocalmemory/__init__.py +1 -1
- package/src/superlocalmemory/cli/commands.py +60 -1
- package/src/superlocalmemory/cli/main.py +24 -1
- package/src/superlocalmemory/compliance/gdpr.py +104 -73
- package/src/superlocalmemory/contracts/__init__.py +1 -0
- package/src/superlocalmemory/contracts/schemas/agent-experience-v1.schema.json +92 -0
- package/src/superlocalmemory/contracts/schemas/agent-integration-contract-v2.schema.json +46 -0
- package/src/superlocalmemory/contracts/schemas/cognitive-turn-receipt-v1.schema.json +59 -0
- package/src/superlocalmemory/contracts/v402.py +62 -0
- package/src/superlocalmemory/core/engine.py +10 -0
- package/src/superlocalmemory/core/recall_pipeline.py +6 -0
- package/src/superlocalmemory/core/recall_worker.py +12 -0
- package/src/superlocalmemory/core/worker_pool.py +12 -0
- package/src/superlocalmemory/hooks/hook_handlers.py +16 -0
- package/src/superlocalmemory/hooks/post_tool_outcome_hook.py +12 -6
- package/src/superlocalmemory/hooks/session_registry.py +136 -3
- package/src/superlocalmemory/hooks/user_prompt_hook.py +9 -2
- package/src/superlocalmemory/integrations/__init__.py +1 -0
- package/src/superlocalmemory/integrations/bounded_loops_v051.py +236 -0
- package/src/superlocalmemory/learning/database.py +21 -14
- package/src/superlocalmemory/mcp/_daemon_proxy.py +9 -0
- package/src/superlocalmemory/mcp/server.py +5 -0
- package/src/superlocalmemory/mcp/tools_brain.py +132 -0
- package/src/superlocalmemory/mcp/tools_core.py +25 -6
- package/src/superlocalmemory/mcp/tools_v3.py +16 -2
- package/src/superlocalmemory/retrieval/engine.py +43 -1
- package/src/superlocalmemory/retrieval/temporal_utils.py +16 -1
- package/src/superlocalmemory/retrieval/temporal_validity_filter.py +151 -0
- package/src/superlocalmemory/server/routes/brain.py +206 -1
- package/src/superlocalmemory/server/routes/helpers.py +53 -35
- package/src/superlocalmemory/server/routes/v3_api.py +118 -11
- package/src/superlocalmemory/server/unified_daemon.py +25 -0
- package/src/superlocalmemory/storage/_migration_internals.py +4 -0
- package/src/superlocalmemory/storage/_schema_version.py +2 -2
- package/src/superlocalmemory/storage/agent_experience.py +490 -0
- package/src/superlocalmemory/storage/database.py +189 -34
- package/src/superlocalmemory/storage/migration_runner.py +8 -0
- package/src/superlocalmemory/storage/migrations/M015_add_pinned_column.py +18 -0
- package/src/superlocalmemory/storage/migrations/M040_agent_experience_receipts.py +254 -0
- package/src/superlocalmemory/storage/migrations/__init__.py +2 -0
- package/src/superlocalmemory/storage/schema.py +4 -0
- package/src/superlocalmemory/ui/js/auto-settings.js +18 -14
- package/src/superlocalmemory/ui/js/brain.js +57 -1
- package/src/superlocalmemory/ui/js/od-brain.js +114 -40
- package/src/superlocalmemory/ui/js/od-settings.js +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ 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
|
+
|
|
8
32
|
## [4.0.1] - 2026-08-09 — Dashboard and operations-status correctness
|
|
9
33
|
|
|
10
34
|
### Fixed
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
<h1 align="center">SuperLocalMemory V4.0.
|
|
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,13 @@ 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.
|
|
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 & 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> · MCP: add <code>slm_compress</code> to your config · Skill: zero-config</p>
|
|
32
|
-
<p align="center"><strong>
|
|
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.
|
|
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>
|
|
36
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>
|
|
37
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>
|
|
38
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>
|
|
@@ -61,7 +62,7 @@ SuperLocalMemory V4 combines conventional dense and lexical retrieval with graph
|
|
|
61
62
|
|
|
62
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.
|
|
63
64
|
|
|
64
|
-
**What V4.0.
|
|
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:
|
|
65
66
|
|
|
66
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.
|
|
67
68
|
- **Multi-scope memory & profiles** — workspaces (profiles) plus `personal` / `shared` / `global` scopes; cross-profile recall is default-deny.
|
|
@@ -696,9 +697,9 @@ runtime capability is enabled and healthy. See [CHANGELOG.md](CHANGELOG.md) for
|
|
|
696
697
|
the complete release history.
|
|
697
698
|
## Research Papers
|
|
698
699
|
|
|
699
|
-
SuperLocalMemory has a V4
|
|
700
|
+
SuperLocalMemory has a V4 arXiv preprint with a companion Zenodo archive, plus three earlier arXiv preprints (2026):
|
|
700
701
|
|
|
701
|
-
- **SuperLocalMemory 4.0: The Governed Memory Operating System for AI Agents:** [Zenodo 21853302](https://zenodo.org/records/21853302) · [DOI 10.5281/zenodo.21853302](https://doi.org/10.5281/zenodo.21853302).
|
|
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).
|
|
702
703
|
- **The Living Brain (V3.3):** [arXiv:2604.04514](https://arxiv.org/abs/2604.04514) · [Zenodo 19435120](https://zenodo.org/records/19435120)
|
|
703
704
|
- **Information-Geometric Foundations (V3):** [arXiv:2603.14588](https://arxiv.org/abs/2603.14588) · [Zenodo 19038659](https://zenodo.org/records/19038659)
|
|
704
705
|
- **Trust & Behavioral Foundations (V2):** [arXiv:2603.02240](https://arxiv.org/abs/2603.02240) · [Zenodo 18709670](https://zenodo.org/records/18709670)
|
|
@@ -706,11 +707,9 @@ SuperLocalMemory has a V4 Zenodo preprint and three earlier arXiv preprints (202
|
|
|
706
707
|
Use the citation metadata on the linked arXiv or Zenodo records.
|
|
707
708
|
|
|
708
709
|
## Support / License / Qualixar
|
|
709
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines
|
|
710
|
-
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).
|
|
711
711
|
For commercial licensing (closed-source, proprietary, or hosted use), see [COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md) or contact varun.pratap.bhardwaj@gmail.com.
|
|
712
|
-
Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar.
|
|
713
|
-
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)
|
|
714
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.
|
|
715
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).
|
|
716
715
|
|
package/package.json
CHANGED
package/plugin/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- BEGIN SuperLocalMemory v4.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.
|
|
42
|
+
<!-- END SuperLocalMemory v4.0.2 -->
|
|
43
43
|
|
|
44
|
-
SuperLocalMemory v4.0.
|
|
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.
|
|
80
|
+
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.
|
|
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.
|
|
44
|
+
SuperLocalMemory v4.0.2 · Qualixar · AGPL-3.0-or-later
|
package/plugin/requirements.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==4.0.
|
|
1
|
+
superlocalmemory==4.0.2
|
|
@@ -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.
|
|
131
|
+
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.
|
|
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",
|
|
@@ -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.
|
|
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/
|
|
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(
|