superlocalmemory 4.0.10 → 4.1.0
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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +170 -0
- package/README.md +7 -7
- package/package.json +4 -2
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/CLAUDE.md +3 -3
- package/plugin/agents/slm-governance-advisor.md +1 -1
- package/plugin/agents/slm-loop-runner.md +4 -4
- 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 +2 -2
- package/plugin/skills/slm-mesh/SKILL.md +1 -1
- package/plugin/skills/slm-profile/SKILL.md +5 -5
- package/plugin/skills/slm-recall/SKILL.md +102 -15
- package/plugin/skills/slm-remember/SKILL.md +35 -3
- package/plugin/skills/slm-scope/SKILL.md +1 -1
- package/plugin/skills/slm-session/SKILL.md +29 -3
- package/plugin/skills/slm-status/SKILL.md +1 -1
- package/plugin-src/rules/AGENTS.md +16 -8
- 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 +2 -2
- package/plugin-src/skills/slm-mesh/SKILL.md +1 -1
- package/plugin-src/skills/slm-profile/SKILL.md +5 -5
- package/plugin-src/skills/slm-recall/SKILL.md +102 -15
- package/plugin-src/skills/slm-remember/SKILL.md +35 -3
- package/plugin-src/skills/slm-scope/SKILL.md +1 -1
- package/plugin-src/skills/slm-session/SKILL.md +29 -3
- 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 +263 -18
- package/src/superlocalmemory/cli/daemon.py +30 -0
- package/src/superlocalmemory/cli/db_migrate.py +71 -1
- package/src/superlocalmemory/cli/gdpr_cmd.py +15 -2
- package/src/superlocalmemory/cli/main.py +24 -2
- package/src/superlocalmemory/code_graph/database.py +44 -0
- package/src/superlocalmemory/compliance/gdpr.py +449 -39
- package/src/superlocalmemory/core/admission.py +231 -11
- package/src/superlocalmemory/core/backend_orchestrator.py +190 -84
- package/src/superlocalmemory/core/config.py +90 -11
- package/src/superlocalmemory/core/consolidation_engine.py +34 -0
- package/src/superlocalmemory/core/engine.py +140 -11
- package/src/superlocalmemory/core/graph_analyzer.py +76 -112
- package/src/superlocalmemory/core/graph_metrics.py +597 -0
- package/src/superlocalmemory/core/graph_pruner.py +121 -0
- package/src/superlocalmemory/core/maintenance_scheduler.py +205 -0
- package/src/superlocalmemory/core/mode_capability.py +111 -0
- package/src/superlocalmemory/core/ollama_validator.py +315 -0
- package/src/superlocalmemory/core/projection_drain.py +380 -0
- package/src/superlocalmemory/core/recall_pipeline.py +390 -3
- package/src/superlocalmemory/core/recall_worker.py +6 -3
- package/src/superlocalmemory/core/scale_autopromote.py +196 -0
- package/src/superlocalmemory/core/scale_engine.py +16 -2
- package/src/superlocalmemory/core/score_contract.py +21 -1
- package/src/superlocalmemory/core/session_identity.py +85 -0
- package/src/superlocalmemory/core/status_contract.py +108 -0
- package/src/superlocalmemory/core/worker_pool.py +4 -4
- package/src/superlocalmemory/core/working_memory.py +288 -0
- package/src/superlocalmemory/encoding/cognitive_consolidator.py +36 -6
- package/src/superlocalmemory/encoding/context_generator.py +1 -1
- package/src/superlocalmemory/encoding/entity_resolver.py +38 -0
- package/src/superlocalmemory/encoding/fact_extractor.py +18 -14
- package/src/superlocalmemory/encoding/prospective_markers.py +262 -0
- package/src/superlocalmemory/encoding/type_router.py +12 -12
- package/src/superlocalmemory/evolution/mutation_generator.py +30 -4
- package/src/superlocalmemory/graph/cozo_adjacency.py +122 -0
- package/src/superlocalmemory/graph/cozo_backend.py +103 -138
- package/src/superlocalmemory/hooks/portable_kit.py +10 -2
- package/src/superlocalmemory/learning/bandit.py +43 -0
- package/src/superlocalmemory/learning/consolidation_worker.py +54 -0
- package/src/superlocalmemory/learning/database.py +60 -3
- package/src/superlocalmemory/learning/entity_compiler.py +21 -58
- package/src/superlocalmemory/learning/feedback.py +3 -1
- package/src/superlocalmemory/learning/outcomes.py +47 -16
- package/src/superlocalmemory/learning/pattern_miner.py +28 -3
- package/src/superlocalmemory/learning/pattern_miner_constants.py +43 -0
- package/src/superlocalmemory/learning/pcos.py +291 -0
- package/src/superlocalmemory/learning/reward_from_outcomes.py +365 -0
- package/src/superlocalmemory/learning/reward_proxy.py +100 -10
- package/src/superlocalmemory/learning/signal_kinds.py +79 -0
- package/src/superlocalmemory/mcp/profiles.py +14 -2
- package/src/superlocalmemory/mcp/tools_active.py +2 -1
- package/src/superlocalmemory/mcp/tools_core.py +31 -3
- package/src/superlocalmemory/mcp/tools_v28.py +20 -1
- package/src/superlocalmemory/parameterization/pattern_extractor.py +14 -1
- package/src/superlocalmemory/parameterization/soft_prompt_generator.py +98 -0
- package/src/superlocalmemory/retrieval/bm25_channel.py +64 -3
- package/src/superlocalmemory/retrieval/channel_status.py +117 -0
- package/src/superlocalmemory/retrieval/engine.py +106 -11
- package/src/superlocalmemory/retrieval/entity_channel.py +210 -256
- package/src/superlocalmemory/retrieval/graph_adjacency.py +219 -0
- package/src/superlocalmemory/retrieval/scope_policy.py +20 -0
- package/src/superlocalmemory/retrieval/semantic_channel.py +47 -5
- package/src/superlocalmemory/retrieval/spreading.py +288 -0
- package/src/superlocalmemory/server/api.py +24 -5
- package/src/superlocalmemory/server/bandit_loops.py +17 -1
- package/src/superlocalmemory/server/rbac_enforce.py +26 -6
- package/src/superlocalmemory/server/recall_serializer.py +9 -0
- package/src/superlocalmemory/server/routes/behavioral.py +75 -10
- package/src/superlocalmemory/server/routes/compliance.py +98 -18
- package/src/superlocalmemory/server/routes/config_api.py +186 -4
- package/src/superlocalmemory/server/routes/evolution.py +178 -0
- package/src/superlocalmemory/server/routes/ingest.py +8 -0
- package/src/superlocalmemory/server/routes/learning_telemetry.py +2 -1
- package/src/superlocalmemory/server/routes/memories.py +49 -7
- package/src/superlocalmemory/server/routes/timeline.py +4 -0
- package/src/superlocalmemory/server/routes/v3_api.py +191 -15
- package/src/superlocalmemory/server/ui.py +20 -4
- package/src/superlocalmemory/server/unified_daemon.py +186 -5
- package/src/superlocalmemory/storage/_migration_internals.py +31 -0
- package/src/superlocalmemory/storage/_schema_version.py +24 -3
- package/src/superlocalmemory/storage/database.py +477 -59
- package/src/superlocalmemory/storage/embedding_codec.py +71 -0
- package/src/superlocalmemory/storage/lineage_retention.py +236 -0
- package/src/superlocalmemory/storage/logical_edges.py +43 -2
- package/src/superlocalmemory/storage/migration_runner.py +119 -0
- package/src/superlocalmemory/storage/migrations/M044_play_carries_its_own_evidence.py +127 -0
- package/src/superlocalmemory/storage/migrations/M045_fact_outcome_score.py +158 -0
- package/src/superlocalmemory/storage/migrations/M046_prospective_memory_has_its_own_name.py +620 -0
- package/src/superlocalmemory/storage/migrations/M047_fisher_vectors_are_stored_like_every_other_vector.py +306 -0
- package/src/superlocalmemory/storage/migrations/M048_upcoming_holds_only_what_is_upcoming.py +207 -0
- package/src/superlocalmemory/storage/migrations/M049_a_schema_version_marker_is_one_row.py +201 -0
- package/src/superlocalmemory/storage/migrations.py +18 -2
- package/src/superlocalmemory/storage/models.py +40 -1
- package/src/superlocalmemory/storage/projection_outbox.py +346 -0
- package/src/superlocalmemory/storage/retention_policy.py +860 -0
- package/src/superlocalmemory/storage/schema.py +12 -1
- package/src/superlocalmemory/storage/write_coordinator.py +19 -2
- package/src/superlocalmemory/trust/scorer.py +43 -1
- package/src/superlocalmemory/ui/index.html +9 -18
- package/src/superlocalmemory/ui/js/event-delegation.js +12 -1
- package/src/superlocalmemory/ui/js/od-health.js +28 -6
- package/src/superlocalmemory/ui/js/od-memories.js +19 -0
- package/src/superlocalmemory/ui/js/od-settings.js +87 -1
- package/src/superlocalmemory/ui/js/recall-lab.js +78 -3
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": {
|
|
10
10
|
"name": "Qualixar"
|
|
11
11
|
},
|
|
12
|
-
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server.
|
|
12
|
+
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server. 34-tool code profile with graph intelligence.",
|
|
13
13
|
"name": "superlocalmemory",
|
|
14
14
|
"source": "./plugin"
|
|
15
15
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,176 @@ 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.1.0] — Every door asks the same question
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Nothing was recording which memories a recall actually returned, so nothing
|
|
12
|
+
could learn from it.** The step that notes "these memories were shown, for this
|
|
13
|
+
question, in this session" had no caller anywhere — a worker started with the
|
|
14
|
+
service and waited for events that were never sent. On a real store that left
|
|
15
|
+
every one of 162 recorded outcomes with no way to trace back to the recall that
|
|
16
|
+
produced it, every per-memory usefulness score sitting at its untouched
|
|
17
|
+
starting value, and the ranking model unchanged for eleven weeks. Recalls now
|
|
18
|
+
leave that record. It costs 1.6 microseconds and is written outside the reply,
|
|
19
|
+
so recall returns the same answers in the same time — measured across 30 warmed
|
|
20
|
+
queries, the difference was 3.5 ms in favour of the change, which is to say
|
|
21
|
+
none. It records only: whether what is learned may reorder your results remains
|
|
22
|
+
a separate setting that stays off unless you turn it on.
|
|
23
|
+
- **Memories stored since the last graph analysis were ranked as unconnected.**
|
|
24
|
+
Recall weighs a memory partly by where it sits in your knowledge graph. That
|
|
25
|
+
position was only recalculated when a consolidation happened to run or you
|
|
26
|
+
asked for it by hand, so on a real store 1,036 of 4,034 memories had no
|
|
27
|
+
position recorded — including every memory from the previous four days. They
|
|
28
|
+
were still found, then ranked as though nothing linked to them. The
|
|
29
|
+
calculation now runs on a schedule and again shortly after startup, it covers
|
|
30
|
+
every memory including ones with no links yet, and it no longer ranks memories
|
|
31
|
+
the store is not allowed to return, which had been diluting the scores of the
|
|
32
|
+
ones it can.
|
|
33
|
+
- **One small calculation could push a handful of memories above everything
|
|
34
|
+
else.** A separate routine gave every memory in a group the same score and
|
|
35
|
+
wrote it where the ranking reads. On a real store that score was more than ten
|
|
36
|
+
times the highest genuine one, so those memories took the largest ranking
|
|
37
|
+
bonus available for no reason beyond having shared a subject with a few
|
|
38
|
+
others. It has been removed; nothing depended on it.
|
|
39
|
+
- **Turning on per-user access did not apply to agent connections.** Company
|
|
40
|
+
mode is set from the dashboard, and the setting it writes was read by the web
|
|
41
|
+
interface but not by the connection your AI tools use — so with per-user access
|
|
42
|
+
on, two users configured, and one of them restricted to read-only, a write
|
|
43
|
+
arriving over the tool connection was accepted as the machine owner while the
|
|
44
|
+
same write through the dashboard was refused. Both now read the same setting,
|
|
45
|
+
and a tool connection that cannot identify who is calling is refused. Personal,
|
|
46
|
+
single-user use is unchanged and needs no login.
|
|
47
|
+
- **The settings could claim a storage engine that was not there.** A store
|
|
48
|
+
recorded the fast graph and vector engines as active with neither present on
|
|
49
|
+
disk and nothing in progress to explain it, so the dashboard reported one thing
|
|
50
|
+
while retrieval used another, on every restart. The claim is now checked
|
|
51
|
+
against what is actually on disk when the service starts, and dropped if there
|
|
52
|
+
is nothing behind it. Nothing is disabled: an engine that is installed is still
|
|
53
|
+
detected and used.
|
|
54
|
+
- **A note about which schema versions had been applied was stored thousands of
|
|
55
|
+
times over.** Seven versions were recorded as 3,496 rows on one store and
|
|
56
|
+
234,348 on another, because the six places that write it all assumed a
|
|
57
|
+
uniqueness rule the table did not have. The rule is now there, so those writes
|
|
58
|
+
do what they always intended, and the duplicates are collapsed to one row each
|
|
59
|
+
keeping the original date.
|
|
60
|
+
- **A second workspace could take over a memory belonging to the first.** Where
|
|
61
|
+
two workspaces on one store were handed the same identifier for a memory or a
|
|
62
|
+
fact — an import keyed on an external record id, feeding one source into two
|
|
63
|
+
workspaces, does exactly this — the later write could claim the first
|
|
64
|
+
workspace's entry outright: new owner, new content, and the notes attached to
|
|
65
|
+
it discarded, with nothing raised. Whether it was refused or went through in
|
|
66
|
+
silence depended on unrelated details of the entry, so neither outcome could
|
|
67
|
+
be relied on. A write that would move an entry from one workspace to another
|
|
68
|
+
is now refused, and says which workspace owns it.
|
|
69
|
+
|
|
70
|
+
- **Restricting someone to read-only did not restrict every way in.** Per-user
|
|
71
|
+
access was applied where a memory is written, and not where one is deleted or
|
|
72
|
+
corrected over the network, not on four of the compliance controls, and not on
|
|
73
|
+
bulk import — which established who was calling and then never asked whether
|
|
74
|
+
they were allowed to write. Three ways of reading stored memories back asked
|
|
75
|
+
nothing at all. Every entrance now asks the same question of the same setting.
|
|
76
|
+
- **A workspace that could not answer "what is this person allowed to do?"
|
|
77
|
+
assumed the most permissive answer.** If that lookup failed — a busy store, a
|
|
78
|
+
locked file — the caller was treated as able to write. A lookup that fails is
|
|
79
|
+
not a lookup that said yes; it is now refused outright and says so, and the
|
|
80
|
+
caller can retry.
|
|
81
|
+
- **Deleting a memory left its connections behind.** The connections were
|
|
82
|
+
expected to be removed along with it and nothing removed them, so recall kept
|
|
83
|
+
walking links to memories that no longer existed. Both kinds of connection are
|
|
84
|
+
now removed with the memory. Erasing a person had the same shape: their entry
|
|
85
|
+
was removed from the store and left in the copy that search reads, name and
|
|
86
|
+
all, which is not what an erasure request means.
|
|
87
|
+
- **Housekeeping could remove connections it had no way to announce.** If the
|
|
88
|
+
copy that search reads could not be told what had gone, the removal was
|
|
89
|
+
committed anyway and the two drifted apart silently. It is now undone and
|
|
90
|
+
retried instead. `slm db regraph` rebuilds that copy from the store if they
|
|
91
|
+
have already drifted.
|
|
92
|
+
- **A request to be told what is held about you left out what had been learned
|
|
93
|
+
about how you work.** Erasure removed it; the export did not include it. Both
|
|
94
|
+
now cover the same ground.
|
|
95
|
+
- **Storing a memory waited on a model that was still loading.** A write
|
|
96
|
+
computes the memory's vector on the spot so it can be found by asking a
|
|
97
|
+
question rather than only by quoting its own words, and gives that one second
|
|
98
|
+
before handing the job to the background worker. It started that wait even
|
|
99
|
+
when the model had not loaded, which it could never win — loading takes about
|
|
100
|
+
ten seconds. On a copy of a real store the first twelve writes after a fresh
|
|
101
|
+
start took a median of 1,055 ms and eleven stored no vector; they now take
|
|
102
|
+
34 ms. Writes against a loaded model are unchanged at about 75 ms. The service
|
|
103
|
+
now loads the model on startup, in the background, so the wait is not simply
|
|
104
|
+
moved onto whoever searches first.
|
|
105
|
+
- **The dashboard reported "Healthy" whenever the service answered at all**, and
|
|
106
|
+
the page never reloaded after an upgrade because the version it looked for was
|
|
107
|
+
never filled in — so an upgraded install kept showing the previous version's
|
|
108
|
+
page until someone cleared their cache by hand. Both fixed; the card now
|
|
109
|
+
reports what the service is actually doing, including how far the search copy
|
|
110
|
+
is behind.
|
|
111
|
+
- **An unrecognised result was recorded as a mildly positive one.** A client
|
|
112
|
+
reporting "ok" instead of one of the three accepted words had that counted as
|
|
113
|
+
partial success and fed to the ranking as though somebody had meant it. It is
|
|
114
|
+
now refused. An answer can also be reported on by name: recall returns an
|
|
115
|
+
identifier and a result quoting it is matched to that exact answer rather than
|
|
116
|
+
guessed at from overlap within a time window.
|
|
117
|
+
- **A hosted model was reported as available before a key was set for it.**
|
|
118
|
+
Switching to Mode C names a provider and leaves the key empty until you supply
|
|
119
|
+
one, and every surface said nothing was wrong while each model-backed feature
|
|
120
|
+
was about to fall back to assembling from your notes. It now says which step
|
|
121
|
+
is missing.
|
|
122
|
+
- **Repeated failures in a background task looked the same as one hiccup.** A
|
|
123
|
+
step failing every cycle for days reported exactly what a single transient
|
|
124
|
+
failure reported. It now says how long it has been failing.
|
|
125
|
+
- **Upgrading a large store could appear to hang.** Collapsing duplicated
|
|
126
|
+
schema-version records compared every record against every other of the same
|
|
127
|
+
version; on a store with 234,348 of them that had not finished after 25
|
|
128
|
+
minutes. It now takes 324 ms, and the whole upgrade of that store takes 40
|
|
129
|
+
seconds with every memory, fact and connection preserved.
|
|
130
|
+
- **A refusal from the service was reported as a crash.** Commands that were
|
|
131
|
+
correctly denied printed a stack trace instead of the reason, and one denial
|
|
132
|
+
told users to run a command that does not exist.
|
|
133
|
+
- **`slm connect claude-code` told you to run a command that does not exist.**
|
|
134
|
+
It pointed at `slm plugin install`; there is no `slm plugin` subcommand, so
|
|
135
|
+
the only instruction it gave ended in an error with nothing else offered. It
|
|
136
|
+
now names the two Claude Code commands that actually install the plugin, and
|
|
137
|
+
the setup wizard that runs both for you. Reported by @barrygfox (#123).
|
|
138
|
+
- **The bridge install in the IDE guide named a package that is not on npm.**
|
|
139
|
+
`@modelcontextprotocol/client-cli` has never existed, so the documented
|
|
140
|
+
install could not produce the `mcp-remote` binary that the config we write
|
|
141
|
+
points at. All three places now name `mcp-remote`, which does provide it.
|
|
142
|
+
Reported by @tonydzi (#122).
|
|
143
|
+
- **Two settings did not survive a restart.** The consistency threshold and the
|
|
144
|
+
per-channel retrieval weights were never written to the config file and never
|
|
145
|
+
read back, so tuning either one — by hand or by switching mode — lasted until
|
|
146
|
+
the next restart and then reverted to the default with nothing said. Both are
|
|
147
|
+
now saved and restored, a pair stays a pair through the file, and a section
|
|
148
|
+
someone has hand-edited into nonsense falls back to defaults instead of
|
|
149
|
+
stopping `slm` from running. Reported by @barrygfox (#124).
|
|
150
|
+
- **A migration failure said which, never why.** A migration recorded complete
|
|
151
|
+
is re-checked by its own verification on every start; when that check stops
|
|
152
|
+
passing, the log still reads complete while the health endpoint reports a
|
|
153
|
+
failure, and nothing said the two were answering different questions. The
|
|
154
|
+
health output now carries the reason for each failure, and `slm db migrate
|
|
155
|
+
--status` marks any migration whose recorded state and actual end-state
|
|
156
|
+
disagree instead of only reprinting the log. Reported by @unfall103-debug
|
|
157
|
+
(#125).
|
|
158
|
+
### Changed
|
|
159
|
+
- **Every table that only grows now has a stated limit, or states why it has
|
|
160
|
+
none.** Three of them had a cleanup routine, each written and wired
|
|
161
|
+
separately; the fourth was found by reading a disk-usage report and the fifth
|
|
162
|
+
by reading the fourth. All 45 are now declared in one place with the reasoning
|
|
163
|
+
attached, one pass enforces them, and a table added without a decision is
|
|
164
|
+
something the tests can see. On a real store the first pass removed 7,342 rows
|
|
165
|
+
in 0.4 s, and 123,918 on a larger one — the biggest single group being 83,623
|
|
166
|
+
records describing memories that had already been deleted.
|
|
167
|
+
Nothing that holds your memories, your corrections, an erasure record, or the
|
|
168
|
+
feedback that improves ranking is touched; each of those says so explicitly.
|
|
169
|
+
Two tables are recorded as growing faster than the store with no rule decided
|
|
170
|
+
yet, rather than being quietly given one.
|
|
171
|
+
- **Recall assembles your knowledge graph from the graph store.** On a store with
|
|
172
|
+
208,000 connections that assembly took 2.5 seconds and now takes 0.4. It runs
|
|
173
|
+
whenever the graph changes, so it was on the path of a recall. The answers are
|
|
174
|
+
the same — every probe query returns the same memories with the same scores
|
|
175
|
+
from either source. Recalls that also span shared or global memories continue
|
|
176
|
+
to read SQLite, which is the only store that holds them.
|
|
177
|
+
|
|
8
178
|
## [4.0.10] — Your memories, not the summarizer's
|
|
9
179
|
|
|
10
180
|
### 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.1.0</h1>
|
|
9
9
|
|
|
10
10
|
<h2 align="center">Rent the LLM. Own the memory.</h2>
|
|
11
11
|
|
|
@@ -27,12 +27,12 @@ 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.1.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 & 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
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.1.0-Current_Release-2ea44f?style=for-the-badge&logo=checkmarx&logoColor=white" alt="v4.1.0 — Current Release"/></a>
|
|
36
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
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>
|
|
38
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>
|
|
@@ -45,7 +45,7 @@ Proxy: <code>slm wrap claude</code> · MCP: add <code>slm_compress</
|
|
|
45
45
|
<a href="https://superlocalmemory.com"><img src="https://img.shields.io/badge/Web-superlocalmemory.com-ff6b35?style=for-the-badge" alt="Website"/></a>
|
|
46
46
|
<a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/MCP-Native-blue?style=for-the-badge" alt="MCP Native"/></a>
|
|
47
47
|
<a href="#dual-interface-mcp--cli"><img src="https://img.shields.io/badge/CLI-Agent--Native-green?style=for-the-badge" alt="CLI Agent-Native"/></a>
|
|
48
|
-
<a href="#multilingual-embedding-support"><img src="https://img.shields.io/badge/Multilingual-
|
|
48
|
+
<a href="#multilingual-embedding-support"><img src="https://img.shields.io/badge/Multilingual-via_your_embedding_model-ff69b4?style=for-the-badge" alt="Multilingual via your embedding model"/></a>
|
|
49
49
|
</p>
|
|
50
50
|
|
|
51
51
|
---
|
|
@@ -310,7 +310,7 @@ can run without a cloud LLM:
|
|
|
310
310
|
|
|
311
311
|
1. **Fisher-informed scoring** — dense candidate generation uses cosine similarity; Fisher-derived terms can modify later scoring when their state is available.
|
|
312
312
|
2. **Sheaf Cohomology for Consistency** — algebraic topology detects contradictions via coboundary norms on the knowledge graph.
|
|
313
|
-
3. **Riemannian Langevin Lifecycle** — memory positions evolve on the Poincare ball
|
|
313
|
+
3. **Riemannian Langevin Lifecycle** — memory positions evolve continuously on the Poincare ball, and where a memory sits decides its lifecycle stage. There is no retention timer counting down against a memory: what moves it outward is being left alone, and what pulls it back is being used. The stage boundaries themselves are fixed radii.
|
|
314
314
|
|
|
315
315
|
Auto-capture hooks are installed explicitly with `slm hooks install` (Claude
|
|
316
316
|
Code) or `slm hooks install --agent codex` (Codex). Hook latency and capture
|
|
@@ -386,7 +386,7 @@ Full docs: [docs/multi-machine.md](docs/multi-machine.md) · [docs/distributed-d
|
|
|
386
386
|
| **Python CLI + SDK** (primary) | Activate a Python virtual environment, then `python -m pip install superlocalmemory` | Python 3.11+; the `slm` CLI and importable SDK stay inside that environment |
|
|
387
387
|
| **Repository clone — macOS/Linux** | `./scripts/install.sh install` | Research/contributor path; delegates to an existing uv or pipx installation |
|
|
388
388
|
| **Repository clone — Windows** | `.\scripts\install.ps1 -Action Install` | Research/contributor path; delegates to an existing uv or pipx installation |
|
|
389
|
-
| **Claude Code Plugin** | `/plugin marketplace add qualixar/superlocalmemory` then `/plugin install superlocalmemory@qualixar` | Self-bootstraps venv, isolated SLM_DATA_DIR, additive —
|
|
389
|
+
| **Claude Code Plugin** | `/plugin marketplace add qualixar/superlocalmemory` then `/plugin install superlocalmemory@qualixar` | Self-bootstraps venv, isolated SLM_DATA_DIR, additive — 34-tool code profile. Ships the skills/agents/hooks/commands |
|
|
390
390
|
| **Portable / IDE connect** | `slm connect <ide> [--here]` | Wire any IDE without reinstalling; `slm connect claude-code` → plugin pointer |
|
|
391
391
|
|
|
392
392
|
After any install path: `slm setup` → `slm doctor` → `slm warmup` (optional, pre-downloads ~500MB embedding model).
|
|
@@ -477,7 +477,7 @@ then install:
|
|
|
477
477
|
```
|
|
478
478
|
|
|
479
479
|
- Self-bootstraps a Python venv, installs all deps in an isolated `SLM_DATA_DIR`
|
|
480
|
-
- Registers the
|
|
480
|
+
- Registers the 34-tool `code` MCP surface — the 18-tool `core` memory surface plus code-graph, portable-evidence, bounded-loop and usefulness-report tools
|
|
481
481
|
- Ships the SLM skills / agents / hooks / commands / rules
|
|
482
482
|
- Additive — does not replace an existing SLM install
|
|
483
483
|
- `slm connect claude-code` detects an existing plugin install and links them
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
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",
|
|
@@ -50,7 +50,9 @@
|
|
|
50
50
|
"check:plugin": "node scripts/build-plugin.mjs --check",
|
|
51
51
|
"build:copilot-plugin": "node scripts/build-copilot-plugin.mjs",
|
|
52
52
|
"check:copilot-plugin": "node scripts/build-copilot-plugin.mjs --check",
|
|
53
|
-
"
|
|
53
|
+
"build:codex-plugin": "node scripts/build-codex-plugin.mjs",
|
|
54
|
+
"check:codex-plugin": "node scripts/build-codex-plugin.mjs --check",
|
|
55
|
+
"prepack": "node scripts/build-plugin.mjs && node scripts/build-copilot-plugin.mjs && node scripts/build-codex-plugin.mjs && node scripts/prepack.js",
|
|
54
56
|
"postinstall": "node scripts/postinstall.js",
|
|
55
57
|
"preuninstall": "node scripts/preuninstall.js",
|
|
56
58
|
"test": "node scripts/run-ui-tests.mjs"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "Qualixar",
|
|
4
4
|
"url": "https://github.com/qualixar/superlocalmemory"
|
|
5
5
|
},
|
|
6
|
-
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server.
|
|
6
|
+
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server. 34-tool code profile with graph intelligence.",
|
|
7
7
|
"displayName": "SuperLocalMemory",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"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
|
|
18
|
+
"version": "4.1.0"
|
|
19
19
|
}
|
package/plugin/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- BEGIN SuperLocalMemory v4.0
|
|
1
|
+
<!-- BEGIN SuperLocalMemory v4.1.0 -->
|
|
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.1.0 -->
|
|
43
43
|
|
|
44
|
-
SuperLocalMemory v4.0
|
|
44
|
+
SuperLocalMemory v4.1.0 · 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.1.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -8,7 +8,7 @@ description: >
|
|
|
8
8
|
completion with an auditable, resumable ledger persisted in SLM. Reports the
|
|
9
9
|
exact terminal status (DONE/HALT/PAUSE/KILLED/ERROR) and never dresses a
|
|
10
10
|
non-DONE outcome up as success.
|
|
11
|
-
tools: Bash,
|
|
11
|
+
tools: Bash, recall, remember, Read
|
|
12
12
|
model: inherit
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -57,8 +57,8 @@ bounds, or report the exact non-DONE status.
|
|
|
57
57
|
|
|
58
58
|
# Memory hygiene
|
|
59
59
|
|
|
60
|
-
- At the start, `
|
|
61
|
-
- On a substantial outcome, `
|
|
60
|
+
- At the start, `recall` prior runs of the same loop to resume context.
|
|
61
|
+
- On a substantial outcome, `remember` a one-paragraph summary (what the
|
|
62
62
|
gate was, the final status, the run_id) so the next session can find it.
|
|
63
63
|
|
|
64
64
|
# Anti-rationalization
|
|
@@ -68,4 +68,4 @@ assessment. The gate is the authority.
|
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
|
-
SuperLocalMemory v4.0
|
|
71
|
+
SuperLocalMemory v4.1.0 · 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.1.0 · 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.1.0 · Qualixar · AGPL-3.0-or-later
|
package/plugin/requirements.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==4.0
|
|
1
|
+
superlocalmemory==4.1.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: slm-loop
|
|
3
3
|
description: Run gate-verified bounded loops with SuperLocalMemory as the durable ledger. Use when a task has a checkable acceptance condition (tests, schema, lint, reconciliation) and you must iterate until an INDEPENDENT gate passes — never stopping just because the agent believes it is done. `slm loop demo` runs a keyless convergence demo; `slm loop history` and `slm loop show <run_id>` inspect past runs whose every lap is persisted as queryable SLM memory (tag `loop:<name>`). Terminal statuses are DONE / HALT / PAUSE / KILLED / ERROR — report them exactly, never converting HALT/PAUSE/ERROR into success.
|
|
4
4
|
when_to_use: "run a bounded loop, gate-verified task, iterate until tests pass, verify against an independent gate, don't trust the agent's own done claim, slm loop, convergence loop, loop until green, loop ledger, resume a loop"
|
|
5
|
-
allowed-tools: Bash,
|
|
5
|
+
allowed-tools: Bash, recall
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# slm-loop — Bounded, gate-verified agent loops
|
|
@@ -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
|
|
99
|
+
SuperLocalMemory v4.1.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -30,10 +30,10 @@ project, a client engagement, a production vs staging environment.
|
|
|
30
30
|
|
|
31
31
|
| Profile | Tools | When to use |
|
|
32
32
|
|---------|-------|-------------|
|
|
33
|
-
| `core` |
|
|
34
|
-
| `code` |
|
|
35
|
-
| `full` |
|
|
36
|
-
| `power` |
|
|
33
|
+
| `core` | 18 tools — remember, recall, search, session, optimize | Minimal footprint, no code tools |
|
|
34
|
+
| `code` | 34 tools — core + portable Brain evidence + code graph + profile switching + bounded loops | Default for IDE/coding agents |
|
|
35
|
+
| `full` | 50 tools — code + all memory ops + mesh + bounded loops | Multi-session, team workflows |
|
|
36
|
+
| `power` | 62 tools — full + governance + behavioral tools | Enterprise, admin, audit use cases |
|
|
37
37
|
| `mesh` | 8 tools — mesh coordination only | Lightweight cross-session signalling |
|
|
38
38
|
|
|
39
39
|
The profile is set at MCP server startup via `SLM_MCP_PROFILE` in the MCP config.
|
|
@@ -146,4 +146,4 @@ Name them differently in your MCP config (e.g. `superlocalmemory-personal` and
|
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
149
|
-
*SuperLocalMemory v4.0
|
|
149
|
+
*SuperLocalMemory v4.1.0 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -50,7 +50,7 @@ recall(
|
|
|
50
50
|
query="authentication strategy decision",
|
|
51
51
|
limit=20, # default 20; reduce to 5 for quick pre-task checks
|
|
52
52
|
session_id="<sid>", # pass the session_id returned by session_init
|
|
53
|
-
fast=
|
|
53
|
+
fast=None, # leave unset; see "Fast mode" below for what it controls
|
|
54
54
|
)
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -65,12 +65,12 @@ Real response shape (`--json` equivalent):
|
|
|
65
65
|
"score": 0.87,
|
|
66
66
|
"confidence": 0.91,
|
|
67
67
|
"trust_score": 0.84,
|
|
68
|
-
"fact_type": "
|
|
68
|
+
"fact_type": "semantic",
|
|
69
69
|
"channel_scores": {
|
|
70
70
|
"semantic": 0.88,
|
|
71
|
-
"
|
|
71
|
+
"bm25": 0.61,
|
|
72
72
|
"temporal": 0.72,
|
|
73
|
-
"
|
|
73
|
+
"hopfield": 0.55
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
],
|
|
@@ -78,32 +78,92 @@ Real response shape (`--json` equivalent):
|
|
|
78
78
|
"query_type": "semantic",
|
|
79
79
|
"channel_weights": {
|
|
80
80
|
"semantic": 0.4,
|
|
81
|
-
"
|
|
81
|
+
"bm25": 0.2,
|
|
82
82
|
"temporal": 0.2,
|
|
83
|
-
"
|
|
83
|
+
"hopfield": 0.2
|
|
84
84
|
},
|
|
85
|
+
"channel_status": {
|
|
86
|
+
"semantic": "ok",
|
|
87
|
+
"bm25": "ok",
|
|
88
|
+
"temporal": "empty",
|
|
89
|
+
"hopfield": "ok",
|
|
90
|
+
"spreading_activation": "no_candidates",
|
|
91
|
+
"entity_graph": "no_embedding",
|
|
92
|
+
"profile": "disabled"
|
|
93
|
+
},
|
|
94
|
+
"incomplete_channels": [],
|
|
85
95
|
"retrieval_time_ms": 134,
|
|
86
96
|
"no_confident_match": false
|
|
87
97
|
}
|
|
88
98
|
```
|
|
89
99
|
|
|
100
|
+
**Read `channel_status` before concluding that nothing is stored.** It reports
|
|
101
|
+
what each retrieval channel did on this query. `channel_weights` says how much
|
|
102
|
+
each channel counts; `channel_status` says whether it ran at all.
|
|
103
|
+
|
|
104
|
+
| status | meaning |
|
|
105
|
+
|---|---|
|
|
106
|
+
| `ok` | the channel ran and contributed candidates |
|
|
107
|
+
| `empty` | it ran and there was genuinely nothing to return |
|
|
108
|
+
| `no_candidates` | it ran but nothing survived fusion |
|
|
109
|
+
| `error` | it raised — **its results are missing from this answer** |
|
|
110
|
+
| `timeout` | it exceeded its guard — **results missing** |
|
|
111
|
+
| `no_embedding` | the query could not be embedded, so it could not run |
|
|
112
|
+
| `disabled` | switched off by configuration |
|
|
113
|
+
| `not_configured` | the backing service is not set up |
|
|
114
|
+
|
|
115
|
+
`semantic`, `bm25`, `temporal`, `hopfield` and `spreading_activation` each
|
|
116
|
+
search and return their own candidates. `profile` is a shortcut that runs before
|
|
117
|
+
them and can answer directly. `entity_graph` produces nothing of its own — it
|
|
118
|
+
re-scores what the others found, by how well each result connects to the
|
|
119
|
+
entities in your question, which is why it reports `no_candidates` when the
|
|
120
|
+
rest come back empty.
|
|
121
|
+
|
|
122
|
+
`empty`, `no_candidates`, `disabled` and `not_configured` are normal. `error`,
|
|
123
|
+
`timeout` and `no_embedding` mean the answer is **incomplete, not negative** —
|
|
124
|
+
say so to the user rather than reporting "no memories found". `incomplete_channels`
|
|
125
|
+
carries the same warning as a plain list.
|
|
126
|
+
|
|
90
127
|
**Refine on low confidence.** `recall` returns confidence signals with every result. If `no_confident_match` is `true` (or `answer_confidence` is low / `abstained` is `true`), do NOT invent a memory — rewrite the query into 1–3 more specific sub-queries (split multi-hop questions; try entity names, synonyms, or broader phrasing) and call `recall` again before concluding nothing was found. A confident match → use it directly. SLM returns fast local results (~1–2s, no server-side LLM round on the hot path) and lets you, the calling model, drive this refinement.
|
|
91
128
|
|
|
92
129
|
### 2. Passing session_id
|
|
93
130
|
|
|
94
|
-
Pass the `session_id` returned by `session_init
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
131
|
+
Pass the `session_id` returned by `session_init`, on **every** recall in that
|
|
132
|
+
session. It does two things.
|
|
133
|
+
|
|
134
|
+
1. **It carries the conversation forward.** Each recall offers its five
|
|
135
|
+
best-ranked results to a small per-session working set of seven slots. A
|
|
136
|
+
memory that keeps coming back is reinforced rather than duplicated, and the
|
|
137
|
+
least-activated slot is the one evicted, so something referenced across
|
|
138
|
+
several turns is hard to lose. Later recalls in the same session rank the
|
|
139
|
+
held memories higher, and turn three is not as cold as turn one. The bias is
|
|
140
|
+
deliberately small — it nudges the order, it never overrides an exact match.
|
|
141
|
+
2. **It attributes engagement to the session**, so a later `report_outcome`
|
|
142
|
+
can close the loop on the right recall.
|
|
143
|
+
|
|
144
|
+
Omitting it costs both: recall still returns correct results, but every turn
|
|
145
|
+
starts cold and no feedback is attributable.
|
|
146
|
+
|
|
147
|
+
**Use the real id, not a made-up one.** An id beginning `http:`, `mcp:`, `cli:`
|
|
148
|
+
or `probe:` is treated as a synthetic per-request label, not a conversation, and
|
|
149
|
+
is excluded from the working set — inventing one per call would otherwise fill
|
|
150
|
+
the registry and evict genuine conversations.
|
|
98
151
|
|
|
99
152
|
### 3. Fast mode
|
|
100
153
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
154
|
+
`fast` controls **one** thing: whether the server runs its own internal LLM
|
|
155
|
+
reformulation round. It does **not** disable any retrieval channel — every
|
|
156
|
+
channel and the reranker run either way. There are four always: meaning,
|
|
157
|
+
keyword, entity graph and time. Spreading activation and Hopfield register as a
|
|
158
|
+
fifth and sixth when their prerequisites are present, so a store sees up to six.
|
|
159
|
+
|
|
160
|
+
Leave it unset. Unset resolves to "skip the internal round", because you are the
|
|
161
|
+
reasoner: you refine the query yourself using the confidence signals above, and
|
|
162
|
+
you do it better than a local model would. Pass `fast=False` only when SLM is
|
|
163
|
+
deployed with no capable client in front of it.
|
|
104
164
|
|
|
105
165
|
```
|
|
106
|
-
recall(query="rate limiting approach", limit=5, session_id="<sid>"
|
|
166
|
+
recall(query="rate limiting approach", limit=5, session_id="<sid>")
|
|
107
167
|
```
|
|
108
168
|
|
|
109
169
|
### 4. Keyword fallback via search
|
|
@@ -138,6 +198,33 @@ once you have the `fact_id` for full content.
|
|
|
138
198
|
|
|
139
199
|
---
|
|
140
200
|
|
|
201
|
+
### 7. Close the loop — say which memories helped
|
|
202
|
+
|
|
203
|
+
Retrieval ranks a memory partly on whether it has actually been useful before.
|
|
204
|
+
That evidence only exists if you supply it.
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
report_outcome(
|
|
208
|
+
memory_ids="f8a2bc91,c31d0f77", # the ids you actually used
|
|
209
|
+
outcome="success", # "success" | "failure" | "partial"
|
|
210
|
+
context="used the JWT expiry decision to write the refresh handler",
|
|
211
|
+
)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Call it when a recall visibly changed what you did: you applied the decision,
|
|
215
|
+
followed the convention, or avoided the gotcha. Report `failure` when a
|
|
216
|
+
confidently-returned memory turned out to be wrong or stale — a negative signal
|
|
217
|
+
is worth as much as a positive one, and it is the only way a stale memory stops
|
|
218
|
+
being promoted.
|
|
219
|
+
|
|
220
|
+
Report only ids you genuinely used. Reporting every returned id marks the
|
|
221
|
+
irrelevant ones useful and trains the ranker toward noise.
|
|
222
|
+
|
|
223
|
+
`report_feedback(fact_id, feedback, query)` is the finer-grained form for a
|
|
224
|
+
single fact and the query that surfaced it.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
141
228
|
## How multi-channel retrieval works
|
|
142
229
|
|
|
143
230
|
`recall` runs multiple candidate producers in parallel — semantic vector similarity,
|
|
@@ -236,4 +323,4 @@ before recalling, then switch back. See `slm-profile` for workspace switching.
|
|
|
236
323
|
|
|
237
324
|
---
|
|
238
325
|
|
|
239
|
-
*SuperLocalMemory v4.0
|
|
326
|
+
*SuperLocalMemory v4.1.0 · Qualixar · AGPL-3.0-or-later*
|