superlocalmemory 3.8.10 → 3.8.12
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 +91 -0
- package/README.md +7 -3
- 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-graph/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-session/SKILL.md +1 -1
- package/plugin-src/skills/slm-status/SKILL.md +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/__init__.py +1 -1
- package/src/superlocalmemory/cli/commands.py +28 -6
- package/src/superlocalmemory/cli/daemon.py +219 -10
- package/src/superlocalmemory/cli/setup_wizard.py +45 -1
- package/src/superlocalmemory/core/component_registry.py +25 -0
- package/src/superlocalmemory/core/config.py +35 -1
- package/src/superlocalmemory/core/engine_wiring.py +81 -5
- package/src/superlocalmemory/core/recall_pipeline.py +25 -4
- package/src/superlocalmemory/core/reranker_worker.py +78 -17
- package/src/superlocalmemory/infra/daemon_identity.py +16 -0
- package/src/superlocalmemory/infra/process_identity.py +180 -0
- package/src/superlocalmemory/learning/feedback.py +328 -27
- package/src/superlocalmemory/learning/legacy_migration.py +45 -4
- package/src/superlocalmemory/learning/pattern_miner.py +31 -11
- package/src/superlocalmemory/mcp/_daemon_proxy.py +23 -1
- package/src/superlocalmemory/mcp/tools_active.py +179 -17
- package/src/superlocalmemory/mcp/tools_core.py +6 -5
- package/src/superlocalmemory/retrieval/remote_reranker.py +636 -0
- package/src/superlocalmemory/retrieval/reranker.py +52 -5
- package/src/superlocalmemory/server/unified_daemon.py +4 -0
- package/src/superlocalmemory/storage/migration_runner.py +9 -0
- package/src/superlocalmemory/storage/migrations/M033_learning_feedback_channel.py +77 -0
- package/src/superlocalmemory/storage/migrations/__init__.py +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,97 @@ All notable changes to SuperLocalMemory V3 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
|
+
## [3.8.12] - 2026-08-03 — Canonical learning signals, clock-independent daemon identity, remote reranker
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Explicit feedback now reaches the store every consumer actually reads.
|
|
12
|
+
Three tables carry a "feedback" name: `feedback_records` (memory.db, read by
|
|
13
|
+
nothing), `learning_feedback` (the pre-v3.4.22 legacy table that
|
|
14
|
+
`legacy_migration` copies forward), and `learning_signals` +
|
|
15
|
+
`learning_features` (canonical — read by the dashboard Living Brain panel,
|
|
16
|
+
the ranker-phase card, and the LightGBM retrainer). The 3.8.11 fix wrote to
|
|
17
|
+
the legacy table, so it moved a counter nothing consumes. `record_explicit`
|
|
18
|
+
now writes the legacy row and the canonical signal/feature pair in one
|
|
19
|
+
transaction, flagged `is_synthetic=1` so the LightGBM trainer's
|
|
20
|
+
`WHERE is_synthetic=0` filter excludes them from training. (#106)
|
|
21
|
+
- The recall phase gate and the dashboard no longer read different tables.
|
|
22
|
+
The gate counted `learning_feedback` while every user-visible surface counted
|
|
23
|
+
`learning_signals`, so the phase a user was shown and the phase that actually
|
|
24
|
+
ranked their results could disagree without limit. Both now resolve from the
|
|
25
|
+
canonical store, with thresholds imported from `learning.ranker` rather than
|
|
26
|
+
duplicated as literals — duplicated literals are how the two surfaces drifted
|
|
27
|
+
apart in the first place. (#106)
|
|
28
|
+
- `report_feedback` no longer reports success for a write that did not happen.
|
|
29
|
+
It fell back to the `feedback_records` count when the canonical read failed,
|
|
30
|
+
and that table increments on every call regardless, so total write failure was
|
|
31
|
+
indistinguishable from success. The cross-store fallback is removed; a failed
|
|
32
|
+
durable write returns `success: false` with `durable: false`. (#106)
|
|
33
|
+
- The CLI no longer disowns a healthy daemon after a few minutes on WSL2.
|
|
34
|
+
psutil derives `create_time` as boot time plus start ticks and re-reads
|
|
35
|
+
`/proc/stat` `btime` on every call; WSL2 resyncs its VM clock mid-session, so
|
|
36
|
+
`btime` moves and every process's computed creation time moves with it,
|
|
37
|
+
retroactively. The recorded value stopped matching the same live PID while
|
|
38
|
+
`/health` still answered in milliseconds. Ownership now compares a
|
|
39
|
+
clock-independent process token — `boot_id` plus raw start ticks on
|
|
40
|
+
Linux/WSL2, psutil's monotonic creation time elsewhere — as exact equality,
|
|
41
|
+
with no tolerance constant left to silently expire. PID-reuse protection is
|
|
42
|
+
strengthened: a creation-time mismatch no longer condemns a process outright,
|
|
43
|
+
it falls through to cryptographic identity proof over loopback. (#104)
|
|
44
|
+
- `DAEMON_UNAVAILABLE` now names one of eight specific reasons with an
|
|
45
|
+
actionable hint instead of "owned daemon is unavailable; retry later". (#104)
|
|
46
|
+
- `slm setup` no longer wipes the `retrieval` config block on every re-run.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
- Remote and custom reranker endpoints, mirroring the remote embedding support
|
|
50
|
+
added in v3.4.24. Setting `cross_encoder_backend` to `openai` (or `remote`)
|
|
51
|
+
with a `cross_encoder_endpoint` routes reranking to an OpenAI-compatible
|
|
52
|
+
`/v1/rerank` service instead of the local subprocess worker. The built-in
|
|
53
|
+
cross-encoder is English-only, silently degrading recall for non-English
|
|
54
|
+
users; this lets them bring a multilingual model. Failure degrades to fusion
|
|
55
|
+
order with `applied=False` and an error log — never a silent fall back to the
|
|
56
|
+
local English model, which would recreate the very problem this solves. The
|
|
57
|
+
new outbound HTTP surface enforces an http/https allow-list, rejects 3xx and
|
|
58
|
+
does not follow redirects, refuses credentials embedded in the URL, and
|
|
59
|
+
bounds response reads at 8 MB. (#105)
|
|
60
|
+
- `cross_encoder_endpoint` is now a real config field. It was previously
|
|
61
|
+
accepted and silently ignored — the remaining half of #103.
|
|
62
|
+
|
|
63
|
+
## [3.8.11] - 2026-08-02 — Learning-signal integrity and honest reranker diagnostics
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
- Explicit feedback reported through `report_feedback` now writes to the
|
|
67
|
+
canonical learning store (`learning.db`), which every learning consumer
|
|
68
|
+
reads: the adaptive-ranking phase gate, `pattern_miner`, and the dashboard
|
|
69
|
+
Living Brain. Previously it wrote only to a table nothing else read, so
|
|
70
|
+
feedback returned success and a rising counter while the ranker never
|
|
71
|
+
advanced past Phase 1 (#102).
|
|
72
|
+
- `learning_feedback` now has the `channel` column `pattern_miner` has always
|
|
73
|
+
queried but no schema ever defined. Every fresh database raised
|
|
74
|
+
`no such column: channel` on the first mining pass — caught, logged at
|
|
75
|
+
debug, and silently disabled both channel-performance mining and the
|
|
76
|
+
co-retrieval mining that shared its error handler. Migration `M033`
|
|
77
|
+
backfills existing databases without touching existing rows (#102).
|
|
78
|
+
- The cross-encoder reranker now reports the real reason a model load
|
|
79
|
+
failed instead of a generic timeout message, and no longer retries a
|
|
80
|
+
configuration error five times (~7.5 minutes) before giving up. An
|
|
81
|
+
unrecognized `cross_encoder_backend` value is now rejected by name;
|
|
82
|
+
SuperLocalMemory has no remote/OpenAI-compatible reranker backend, so a
|
|
83
|
+
`cross_encoder_endpoint` config key was previously accepted and silently
|
|
84
|
+
ignored (#103).
|
|
85
|
+
- `slm recall` no longer crashes when a daemon response's
|
|
86
|
+
`retrieval_time_ms` or a result's `score` is present but `null` — the
|
|
87
|
+
keyword-fallback recall path now includes `retrieval_time_ms` in every
|
|
88
|
+
response, matching every other recall path's contract.
|
|
89
|
+
- The MagicMock artifact guard (`.gitignore` and its CI test) now also
|
|
90
|
+
catches the directory-shaped leak (`MagicMock/mock/<id>/`) produced when
|
|
91
|
+
a mock-derived path reaches `mkdir()`, not just the file-shaped leak
|
|
92
|
+
(`<MagicMock id='...'>`) produced by `os.open()`.
|
|
93
|
+
|
|
94
|
+
### Documentation
|
|
95
|
+
- `docs/auto-memory.md` no longer references `slm patterns` / `slm useful`,
|
|
96
|
+
which do not exist in V3; documents the `report_feedback` MCP tool as the
|
|
97
|
+
supported path instead.
|
|
98
|
+
|
|
8
99
|
## [3.8.10] - 2026-07-29 — Reliable startup and MCP writes
|
|
9
100
|
|
|
10
101
|
### Fixed
|
package/README.md
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
<h1 align="center">SuperLocalMemory V3.8.
|
|
8
|
+
<h1 align="center">SuperLocalMemory V3.8.12</h1>
|
|
9
9
|
<p align="center"><strong>Enterprise-grade, local-first memory for AI agents and teams.</strong><br/>
|
|
10
10
|
<em>A persistent, auditable long-term brain for your agents that runs on your own infrastructure — with multi-workspace isolation, role-based access, and GDPR + EU AI Act governance controls built in.</em></p>
|
|
11
|
-
<p align="center"><code>v3.8.
|
|
11
|
+
<p align="center"><code>v3.8.12</code> — one control plane: auditable retrieval · multi-scope memory (personal / shared / global) · Cache · Compress · trusted-peer Mesh · bounded loops — across CLI, MCP, dashboard, the <strong>Claude plugin</strong>, the <strong>Codex add-on</strong>, and documented IDE integrations.<br/>
|
|
12
12
|
Proxy: <code>slm wrap claude</code> · MCP: add <code>slm_compress</code> to your config · Skill: zero-config</p>
|
|
13
13
|
<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>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/v3.8.
|
|
16
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/v3.8.12-Current_Release-2ea44f?style=for-the-badge&logo=checkmarx&logoColor=white" alt="v3.8.12 — Current Release"/></a>
|
|
17
17
|
<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>
|
|
18
18
|
<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>
|
|
19
19
|
<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>
|
|
@@ -294,6 +294,10 @@ quality must be evaluated for the target client and workload; V3.8.0 publishes n
|
|
|
294
294
|
|
|
295
295
|
**Multilingual models:** configure an OpenAI-compatible embedding endpoint such as Ollama, vLLM, LiteLLM, `bge-m3`, `multilingual-e5`, or `Qwen3-Embedding`. Language coverage and retrieval quality depend on the selected model and should be evaluated for the deployment corpus.
|
|
296
296
|
|
|
297
|
+
<a id="remote-embedding-and-rerank-endpoints"></a>
|
|
298
|
+
|
|
299
|
+
**Remote embedding + rerank endpoints.** The bundled reranker `cross-encoder/ms-marco-MiniLM-L-12-v2` is **English-only**, so a Chinese, Japanese, or Arabic corpus is scored by a model that cannot read it. Set `retrieval.cross_encoder_backend: "openai"` plus `retrieval.cross_encoder_endpoint` to route reranking to any Cohere-shaped `POST /v1/rerank` service — llama-server, text-embeddings-inference, Infinity — running a multilingual model such as `BAAI/bge-reranker-v2-m3` (v3.8.12, [#105](https://github.com/qualixar/superlocalmemory/issues/105); the same escape hatch embeddings got in v3.4.24, [#16](https://github.com/qualixar/superlocalmemory/issues/16)). No subprocess and no local model download. An unreachable, slow, or malformed endpoint logs an error and returns fusion-ranked results — SLM never silently substitutes the local English model. Keys, auth, and failure semantics: **[docs/configuration.md](docs/configuration.md#remote-embedding-and-rerank-endpoints)**.
|
|
300
|
+
|
|
297
301
|
### Cache + Compress
|
|
298
302
|
|
|
299
303
|
<a id="three-surfaces-proxy--mcp-tools--skill"></a>
|
package/package.json
CHANGED
package/plugin/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- BEGIN SuperLocalMemory v3.8.
|
|
1
|
+
<!-- BEGIN SuperLocalMemory v3.8.12 -->
|
|
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 v3.8.
|
|
42
|
+
<!-- END SuperLocalMemory v3.8.12 -->
|
|
43
43
|
|
|
44
|
-
SuperLocalMemory v3.8.
|
|
44
|
+
SuperLocalMemory v3.8.12 · 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 v3.8.
|
|
80
|
+
SuperLocalMemory v3.8.12 · 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 v3.8.
|
|
49
|
+
SuperLocalMemory v3.8.12 · 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 v3.8.
|
|
44
|
+
SuperLocalMemory v3.8.12 · Qualixar · AGPL-3.0-or-later
|
package/plugin/requirements.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==3.8.
|
|
1
|
+
superlocalmemory==3.8.12
|
|
@@ -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 v3.8.
|
|
131
|
+
SuperLocalMemory v3.8.12 · Qualixar · AGPL-3.0-or-later
|
package/pyproject.toml
CHANGED
|
@@ -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__ = "3.8.
|
|
35
|
+
__version__ = "3.8.12"
|
|
36
36
|
|
|
37
37
|
_REQUIRED_VERSIONS = {
|
|
38
38
|
"sentence_transformers": "5.3.0",
|
|
@@ -22,10 +22,21 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def _daemon_unavailable(command: str, use_json: bool) -> None:
|
|
25
|
-
"""Exit a mutation client without opening a process-local writer.
|
|
25
|
+
"""Exit a mutation client without opening a process-local writer.
|
|
26
|
+
|
|
27
|
+
The bare "owned daemon is unavailable" of earlier releases described a
|
|
28
|
+
stopped daemon, a recycled PID, an unreachable port and an identity
|
|
29
|
+
mismatch identically, which gave issue #104's reporter nothing to act on.
|
|
30
|
+
The diagnosis names the evidence and the next command to run.
|
|
31
|
+
"""
|
|
32
|
+
from superlocalmemory.cli.daemon import describe_daemon_unavailability
|
|
33
|
+
|
|
34
|
+
diagnosis = describe_daemon_unavailability()
|
|
26
35
|
error = {
|
|
27
36
|
"code": "DAEMON_UNAVAILABLE",
|
|
28
|
-
"
|
|
37
|
+
"reason": diagnosis["reason"],
|
|
38
|
+
"message": f"Owned daemon is unavailable: {diagnosis['message']}",
|
|
39
|
+
"hint": diagnosis["hint"],
|
|
29
40
|
"retryable": True,
|
|
30
41
|
}
|
|
31
42
|
if use_json:
|
|
@@ -34,7 +45,8 @@ def _daemon_unavailable(command: str, use_json: bool) -> None:
|
|
|
34
45
|
json_print(command, error=error)
|
|
35
46
|
else:
|
|
36
47
|
print(
|
|
37
|
-
"DAEMON_UNAVAILABLE:
|
|
48
|
+
f"DAEMON_UNAVAILABLE ({diagnosis['reason']}): "
|
|
49
|
+
f"{diagnosis['message']} {diagnosis['hint']}",
|
|
38
50
|
file=sys.stderr,
|
|
39
51
|
)
|
|
40
52
|
raise SystemExit(1)
|
|
@@ -1459,10 +1471,20 @@ def cmd_recall(args: Namespace) -> None:
|
|
|
1459
1471
|
if result.get("no_confident_match")
|
|
1460
1472
|
else "No matching memories found.")
|
|
1461
1473
|
return
|
|
1462
|
-
# Text output
|
|
1463
|
-
|
|
1474
|
+
# Text output.
|
|
1475
|
+
# PR #101: ``dict.get(k, 0)`` returns the DEFAULT only when the
|
|
1476
|
+
# key is ABSENT — a present-but-null value still reaches the
|
|
1477
|
+
# format spec and raises "unsupported format string passed to
|
|
1478
|
+
# NoneType.__format__". ``or 0`` covers both. Same for score,
|
|
1479
|
+
# which the keyword-fallback path returns as None.
|
|
1480
|
+
elapsed_ms = result.get('retrieval_time_ms') or 0
|
|
1481
|
+
print(
|
|
1482
|
+
"SpreadingActivation.search completed via daemon "
|
|
1483
|
+
f"({elapsed_ms:.0f}ms)"
|
|
1484
|
+
)
|
|
1464
1485
|
for i, r in enumerate(result["results"], 1):
|
|
1465
|
-
|
|
1486
|
+
score = r.get('score') or 0
|
|
1487
|
+
print(f" {i}. [{score:.2f}] {r['content']}")
|
|
1466
1488
|
return
|
|
1467
1489
|
except Exception as _exc: # noqa: BLE001
|
|
1468
1490
|
logger.warning(
|