superlocalmemory 4.1.23 → 4.2.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.
Files changed (161) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +343 -0
  3. package/README.md +216 -278
  4. package/antigravity-plugin/_GENERATED.md +2 -1
  5. package/antigravity-plugin/agents/slm-governance-advisor.md +10 -4
  6. package/antigravity-plugin/agents/slm-loop-runner.md +1 -1
  7. package/antigravity-plugin/agents/slm-memory-advisor.md +8 -4
  8. package/antigravity-plugin/agents/slm-optimize-advisor.md +1 -1
  9. package/antigravity-plugin/plugin.json +1 -1
  10. package/antigravity-plugin/skills/slm-bot-memory/SKILL.md +36 -1
  11. package/antigravity-plugin/skills/slm-cache/SKILL.md +1 -1
  12. package/antigravity-plugin/skills/slm-compress/SKILL.md +1 -1
  13. package/antigravity-plugin/skills/slm-getting-started-bot/SKILL.md +58 -7
  14. package/antigravity-plugin/skills/slm-governance/SKILL.md +61 -5
  15. package/antigravity-plugin/skills/slm-graph/SKILL.md +1 -1
  16. package/antigravity-plugin/skills/slm-loop/SKILL.md +22 -2
  17. package/antigravity-plugin/skills/slm-media/SKILL.md +334 -0
  18. package/antigravity-plugin/skills/slm-mesh/SKILL.md +110 -8
  19. package/antigravity-plugin/skills/slm-profile/SKILL.md +17 -12
  20. package/antigravity-plugin/skills/slm-recall/SKILL.md +91 -3
  21. package/antigravity-plugin/skills/slm-remember/SKILL.md +6 -1
  22. package/antigravity-plugin/skills/slm-scope/SKILL.md +1 -1
  23. package/antigravity-plugin/skills/slm-session/SKILL.md +1 -1
  24. package/antigravity-plugin/skills/slm-status/SKILL.md +48 -2
  25. package/antigravity-plugin/skills/slm-web-access/SKILL.md +94 -6
  26. package/bin/slm-npm +1 -1
  27. package/codex-plugin/.claude-plugin/plugin.json +1 -1
  28. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  29. package/codex-plugin/AGENTS.md +38 -9
  30. package/codex-plugin/README.md +8 -6
  31. package/codex-plugin/_GENERATED.md +2 -1
  32. package/codex-plugin/agents/slm-governance-advisor.md +10 -4
  33. package/codex-plugin/agents/slm-loop-runner.md +1 -1
  34. package/codex-plugin/agents/slm-memory-advisor.md +8 -4
  35. package/codex-plugin/agents/slm-optimize-advisor.md +1 -1
  36. package/codex-plugin/skills/slm-bot-memory/SKILL.md +36 -1
  37. package/codex-plugin/skills/slm-cache/SKILL.md +1 -1
  38. package/codex-plugin/skills/slm-compress/SKILL.md +1 -1
  39. package/codex-plugin/skills/slm-getting-started-bot/SKILL.md +58 -7
  40. package/codex-plugin/skills/slm-governance/SKILL.md +61 -5
  41. package/codex-plugin/skills/slm-graph/SKILL.md +1 -1
  42. package/codex-plugin/skills/slm-loop/SKILL.md +22 -2
  43. package/codex-plugin/skills/slm-media/SKILL.md +334 -0
  44. package/codex-plugin/skills/slm-mesh/SKILL.md +110 -8
  45. package/codex-plugin/skills/slm-profile/SKILL.md +17 -12
  46. package/codex-plugin/skills/slm-recall/SKILL.md +91 -3
  47. package/codex-plugin/skills/slm-remember/SKILL.md +6 -1
  48. package/codex-plugin/skills/slm-scope/SKILL.md +1 -1
  49. package/codex-plugin/skills/slm-session/SKILL.md +1 -1
  50. package/codex-plugin/skills/slm-status/SKILL.md +48 -2
  51. package/codex-plugin/skills/slm-web-access/SKILL.md +94 -6
  52. package/copilot-plugin/.github/agents/slm-governance-advisor.agent.md +11 -5
  53. package/copilot-plugin/.github/agents/slm-loop-runner.agent.md +2 -2
  54. package/copilot-plugin/.github/agents/slm-memory-advisor.agent.md +9 -5
  55. package/copilot-plugin/.github/agents/slm-optimize-advisor.agent.md +2 -2
  56. package/copilot-plugin/.github/copilot-instructions.md +14 -5
  57. package/copilot-plugin/.github/prompts/slm-bot-memory.prompt.md +35 -2
  58. package/copilot-plugin/.github/prompts/slm-cache.prompt.md +2 -2
  59. package/copilot-plugin/.github/prompts/slm-compress.prompt.md +2 -2
  60. package/copilot-plugin/.github/prompts/slm-getting-started-bot.prompt.md +57 -8
  61. package/copilot-plugin/.github/prompts/slm-governance.prompt.md +60 -5
  62. package/copilot-plugin/.github/prompts/slm-graph.prompt.md +2 -2
  63. package/copilot-plugin/.github/prompts/slm-loop.prompt.md +28 -2
  64. package/copilot-plugin/.github/prompts/slm-media.prompt.md +335 -0
  65. package/copilot-plugin/.github/prompts/slm-mesh.prompt.md +108 -8
  66. package/copilot-plugin/.github/prompts/slm-profile.prompt.md +18 -13
  67. package/copilot-plugin/.github/prompts/slm-recall.prompt.md +92 -3
  68. package/copilot-plugin/.github/prompts/slm-remember.prompt.md +7 -2
  69. package/copilot-plugin/.github/prompts/slm-scope.prompt.md +2 -2
  70. package/copilot-plugin/.github/prompts/slm-session.prompt.md +2 -2
  71. package/copilot-plugin/.github/prompts/slm-status.prompt.md +48 -2
  72. package/copilot-plugin/.github/prompts/slm-web-access.prompt.md +94 -6
  73. package/copilot-plugin/README.md +3 -3
  74. package/copilot-plugin/_GENERATED.md +2 -1
  75. package/hermes-plugin/__init__.py +15 -5
  76. package/hermes-plugin/agents/slm-governance-advisor.md +10 -4
  77. package/hermes-plugin/agents/slm-loop-runner.md +1 -1
  78. package/hermes-plugin/agents/slm-memory-advisor.md +8 -4
  79. package/hermes-plugin/agents/slm-optimize-advisor.md +1 -1
  80. package/hermes-plugin/command-inventory.json +3 -3
  81. package/hermes-plugin/plugin.yaml +1 -1
  82. package/hermes-plugin/skills/slm-bot-memory/SKILL.md +36 -1
  83. package/hermes-plugin/skills/slm-cache/SKILL.md +1 -1
  84. package/hermes-plugin/skills/slm-compress/SKILL.md +1 -1
  85. package/hermes-plugin/skills/slm-getting-started-bot/SKILL.md +58 -7
  86. package/hermes-plugin/skills/slm-governance/SKILL.md +61 -5
  87. package/hermes-plugin/skills/slm-graph/SKILL.md +1 -1
  88. package/hermes-plugin/skills/slm-loop/SKILL.md +22 -2
  89. package/hermes-plugin/skills/slm-media/SKILL.md +334 -0
  90. package/hermes-plugin/skills/slm-mesh/SKILL.md +110 -8
  91. package/hermes-plugin/skills/slm-profile/SKILL.md +17 -12
  92. package/hermes-plugin/skills/slm-recall/SKILL.md +91 -3
  93. package/hermes-plugin/skills/slm-remember/SKILL.md +6 -1
  94. package/hermes-plugin/skills/slm-scope/SKILL.md +1 -1
  95. package/hermes-plugin/skills/slm-session/SKILL.md +1 -1
  96. package/hermes-plugin/skills/slm-status/SKILL.md +48 -2
  97. package/hermes-plugin/skills/slm-web-access/SKILL.md +94 -6
  98. package/ide/configs/cody-commands.json +1 -1
  99. package/ide/configs/continue-mcp.yaml +9 -14
  100. package/ide/configs/continue-skills.yaml +8 -3
  101. package/ide/configs/opencode-mcp.json +4 -5
  102. package/package.json +38 -21
  103. package/plugin/.claude-plugin/plugin.json +2 -2
  104. package/plugin/.cursor-plugin/plugin.json +1 -1
  105. package/plugin/CLAUDE.md +13 -4
  106. package/plugin/agents/slm-governance-advisor.md +10 -4
  107. package/plugin/agents/slm-loop-runner.md +1 -1
  108. package/plugin/agents/slm-memory-advisor.md +8 -4
  109. package/plugin/agents/slm-optimize-advisor.md +1 -1
  110. package/plugin/cursor-skills/slm-bot-memory/SKILL.md +36 -1
  111. package/plugin/cursor-skills/slm-getting-started-bot/SKILL.md +58 -7
  112. package/plugin/cursor-skills/slm-recall/SKILL.md +91 -3
  113. package/plugin/cursor-skills/slm-remember/SKILL.md +6 -1
  114. package/plugin/cursor-skills/slm-scope/SKILL.md +1 -1
  115. package/plugin/cursor-skills/slm-session/SKILL.md +1 -1
  116. package/plugin/mcp.cursor.json +1 -1
  117. package/plugin/requirements.txt +1 -1
  118. package/plugin/skills/slm-bot-memory/SKILL.md +36 -1
  119. package/plugin/skills/slm-cache/SKILL.md +1 -1
  120. package/plugin/skills/slm-compress/SKILL.md +1 -1
  121. package/plugin/skills/slm-getting-started-bot/SKILL.md +58 -7
  122. package/plugin/skills/slm-governance/SKILL.md +61 -5
  123. package/plugin/skills/slm-graph/SKILL.md +1 -1
  124. package/plugin/skills/slm-loop/SKILL.md +22 -2
  125. package/plugin/skills/slm-media/SKILL.md +334 -0
  126. package/plugin/skills/slm-mesh/SKILL.md +110 -8
  127. package/plugin/skills/slm-profile/SKILL.md +17 -12
  128. package/plugin/skills/slm-recall/SKILL.md +91 -3
  129. package/plugin/skills/slm-remember/SKILL.md +6 -1
  130. package/plugin/skills/slm-scope/SKILL.md +1 -1
  131. package/plugin/skills/slm-session/SKILL.md +1 -1
  132. package/plugin/skills/slm-status/SKILL.md +48 -2
  133. package/plugin/skills/slm-web-access/SKILL.md +94 -6
  134. package/plugin-src/agents/slm-governance-advisor.md +10 -4
  135. package/plugin-src/agents/slm-loop-runner.md +1 -1
  136. package/plugin-src/agents/slm-memory-advisor.md +8 -4
  137. package/plugin-src/agents/slm-optimize-advisor.md +1 -1
  138. package/plugin-src/rules/AGENTS.md +38 -9
  139. package/plugin-src/rules/CLAUDE.md.fragment +13 -4
  140. package/plugin-src/skills/slm-bot-memory/SKILL.md +36 -1
  141. package/plugin-src/skills/slm-cache/SKILL.md +1 -1
  142. package/plugin-src/skills/slm-compress/SKILL.md +1 -1
  143. package/plugin-src/skills/slm-getting-started-bot/SKILL.md +58 -7
  144. package/plugin-src/skills/slm-governance/SKILL.md +61 -5
  145. package/plugin-src/skills/slm-graph/SKILL.md +1 -1
  146. package/plugin-src/skills/slm-loop/SKILL.md +22 -2
  147. package/plugin-src/skills/slm-media/SKILL.md +334 -0
  148. package/plugin-src/skills/slm-mesh/SKILL.md +110 -8
  149. package/plugin-src/skills/slm-profile/SKILL.md +17 -12
  150. package/plugin-src/skills/slm-recall/SKILL.md +91 -3
  151. package/plugin-src/skills/slm-remember/SKILL.md +6 -1
  152. package/plugin-src/skills/slm-scope/SKILL.md +1 -1
  153. package/plugin-src/skills/slm-session/SKILL.md +1 -1
  154. package/plugin-src/skills/slm-status/SKILL.md +48 -2
  155. package/plugin-src/skills/slm-web-access/SKILL.md +94 -6
  156. package/scripts/postinstall/engine-upgrade.js +112 -0
  157. package/scripts/postinstall/media-request.js +203 -0
  158. package/scripts/postinstall/node-arch.js +27 -0
  159. package/scripts/postinstall-interactive.js +15 -19
  160. package/scripts/postinstall.js +99 -13
  161. package/scripts/preuninstall.js +55 -3
@@ -8,7 +8,7 @@ when_to_use: |
8
8
  - "Find stored information about authentication / the database / error handling"
9
9
  - "Search for what I said about Y"
10
10
  - Automatically before any non-trivial task, to surface prior context
11
- allowed-tools: recall, search, fetch, list_recent, get_memory_summary, run_view, report_outcome, report_feedback, Bash
11
+ allowed-tools: recall, search, fetch, expand, list_recent, get_memory_summary, run_view, report_outcome, report_feedback, Bash
12
12
  ---
13
13
 
14
14
  # slm-recall — Search & Retrieve Memory
@@ -25,6 +25,7 @@ multi-channel retrieval. The golden rule: **recall before you remember**.
25
25
  | Conceptual or paraphrase query ("what did we agree on for auth?") | `recall` — full multi-channel retrieval + rerank |
26
26
  | Exact keyword match needed ("find facts containing BM25") | `search` — FTS5 BM25 only, lower latency |
27
27
  | You have a specific `fact_id` from a prior result | `fetch` — exact lookup, full detail |
28
+ | One result looks right and you need what surrounds it | `expand` — source memory, session neighbours, same-entity facts, the correction that replaced it |
28
29
  | Browse newest entries without a query | `list_recent` |
29
30
  | A day, a project or a session in readable form | `get_memory_summary` |
30
31
  | A question the user saved under a name | `run_view` |
@@ -67,6 +68,7 @@ wraps the same data in a `data` envelope):
67
68
  "memory_id": "m7e19ca0",
68
69
  "content": "Decided to use JWT with 1h expiry for API auth (2026-06-10)",
69
70
  "score": 0.87,
71
+ "tier": "supported",
70
72
  "confidence": 0.91,
71
73
  "trust_score": 0.84,
72
74
  "fact_type": "semantic",
@@ -107,12 +109,25 @@ wraps the same data in a `data` envelope):
107
109
  "answer_confidence": null,
108
110
  "abstained": false,
109
111
  "abstention_reason": null,
112
+ "abstention_note": "",
113
+ "tier": "supported",
114
+ "warming_up": false,
115
+ "status_note": "",
110
116
  "answer_check_status": "off",
111
117
  "answerability": "unjudged",
112
118
  "answerability_reason": "disabled"
113
119
  }
114
120
  ```
115
121
 
122
+ A result that came from a saved picture or a PDF page also carries a `media`
123
+ block (`media_id`, `kind` of `image` or `page`, `thumbnail_uri`, `page`,
124
+ `document_id`, `citation` such as `page 12`). Pictures and pages are searched
125
+ by a normal `recall` while pictures and documents are on; nothing changes when
126
+ they are off. From an app on this computer, up to three thumbnails follow the
127
+ JSON as image blocks; `get_media(media_id)` shows any other. Look at a
128
+ thumbnail before saying a picture shows something, and give the page when you
129
+ quote a PDF. See `slm-media`.
130
+
116
131
  Other fields that can appear: `profile` (the namespace that answered),
117
132
  `project_scope` (what a `project` filter did), `tag_scope` (what a `tags`
118
133
  filter did), `temporal_frame`, `reranker_status`, and `thematic_context`.
@@ -145,6 +160,14 @@ rest come back empty.
145
160
  `empty`, `no_candidates`, `disabled` and `not_configured` are normal. `error`,
146
161
  `timeout`, `no_embedding` and `warming` mean the answer is **incomplete, not
147
162
  negative** — say so to the user rather than reporting "no memories found".
163
+
164
+ **Busy is not empty.** When many agents ask at once, recall waits up to about
165
+ twelve seconds for a free slot. If it still cannot start, it returns
166
+ `code: "RECALL_BUSY"`, `retryable: true` and a plain sentence ("Ask again in
167
+ about N seconds"). Wait that long and ask again; never tell the user the memory
168
+ lacks the answer. The same question asked twice at once runs once, and an answer
169
+ is reused for a few seconds only while nothing is written, so a `remember` you
170
+ just made is always visible to your next `recall`.
148
171
  `incomplete_channels` lists the channels abandoned at the time limit, so two
149
172
  runs of the same question that differ only there are an incomplete answer, not
150
173
  a changed memory.
@@ -153,6 +176,15 @@ a changed memory.
153
176
 
154
177
  **`abstained` means the results shown do not answer the question.** If `abstained` is `true`, say you don't have it, or ask — never present the returned memories as the answer anyway. `abstention_reason` distinguishes why: `"judged_insufficient"` means candidates were found and scored, but none of them actually answers this question; `"evidence_floor"` / `"no_candidates"` means nothing was found at all. `answer_confidence` is a measurement, not a guarantee — treat a low number the same way you'd treat `abstained: true`. `calibration_status: "uncalibrated"` means no judge is configured for this recall; in that case `abstained` only ever reflects the older "nothing found" signal.
155
178
 
179
+ **Scores rank results; they are not probabilities.** `score` (an alias of
180
+ `relevance_score`) says how relevant a memory is to this query compared with
181
+ the others. It does not say how likely an answer is to be right, so never turn
182
+ it into a percentage, average it, or compare it across releases or
183
+ configurations. `answer_confidence` is `null` unless an answer check ran. When
184
+ the answer check is on and judges that the memories do not answer the
185
+ question, `abstained` is `true` and you say you do not have it. See
186
+ `docs/retrieval-score-contract.md`.
187
+
156
188
  **`abstained: false` does not mean the answer was checked.** `answerability` says
157
189
  whether it was: `supported` (the answer check ran and judged the shown memories
158
190
  sufficient), `unsupported` (it ran and judged them insufficient) or `unjudged`
@@ -163,6 +195,55 @@ or `judged_from_memo` for a verdict, and for `unjudged` one of `disabled`,
163
195
  `no_results`, which is not evidence that no answer exists (check
164
196
  `channel_status`). `answer_check_note` carries a sentence you can show a person.
165
197
 
198
+ ### 1b. Tiers: supported, related, none
199
+
200
+ Every recall says which of three answers it is, in `tier` (on the response and
201
+ on each result):
202
+
203
+ | `tier` | what it means | what you do |
204
+ |---|---|---|
205
+ | `supported` | a memory carries the answer | use it |
206
+ | `related` | the question is real, but nothing answers it exactly | `abstention_note` is "I don't have this exactly — here are the closest memories." Say you don't have it exactly; you may mention the closest memories (each labelled `tier: related`, a short preview), never present them as the answer |
207
+ | `none` | nonsense, or nothing close | `abstention_note` is "That isn't in SuperLocalMemory." **Stop. Do not invent an answer**, and do not keep rephrasing the same question |
208
+
209
+ The MCP `recall` returns `supported` results only. Pass `include_related=true`
210
+ to see up to three related memories when there is no supported one (without
211
+ it, a related answer comes back empty with "I don't have this exactly. Closer
212
+ memories exist; ask with include_related to see them."). `search`, the CLI and
213
+ the dashboard show related memories by default, labelled. `show_weak=true`
214
+ shows every weak match anyway, each labelled `weak: true`.
215
+
216
+ **`warming_up: true` means ask again shortly.** Right after a start, while the
217
+ models and inputs are still loading, recall returns what keyword search found
218
+ (as `related`) with `status_note`: "SuperLocalMemory is still warming up —
219
+ results may be incomplete. Try again in a few minutes." Tell the user that, and
220
+ do not conclude the memory is absent: SLM never says "That isn't in
221
+ SuperLocalMemory." while warming up.
222
+
223
+ ### 1c. Depth, max_tokens and expand
224
+
225
+ Recall in layers and spend context only where it pays:
226
+
227
+ | `depth` | returns |
228
+ |---|---|
229
+ | `0` glance | ids, `tier`, score and a one-line preview — the cheapest look |
230
+ | `1` recall | the full facts (the default) |
231
+ | `2` context | + `context`: the source memory, up to three facts from the same session, up to three about the same entities, and `superseded_by` when a correction replaced it |
232
+
233
+ `max_tokens` caps the whole result list and is never exceeded: context goes
234
+ first, then the last memory is shortened, then memories are left out, and
235
+ `layers` says what was trimmed. Start at `depth=0` or `1`; when one result is
236
+ the right one, drill into it with `expand`:
237
+
238
+ ```
239
+ recall(query="hub resultType fix", depth=0, max_tokens=400, session_id="<sid>")
240
+ expand(memory_id="f8a2bc91", depth=2, max_tokens=800)
241
+ ```
242
+
243
+ `expand` takes a result's `fact_id` or `memory_id` and runs the same profile,
244
+ quarantine and visibility checks as `fetch`; every memory it adds passes them
245
+ too.
246
+
166
247
  ### 2. Passing session_id
167
248
 
168
249
  Pass the `session_id` returned by `session_init`, on **every** recall in that
@@ -344,8 +425,10 @@ No benchmark numbers are cited here; performance is workload-dependent.
344
425
  ## CLI fallback (when MCP is unavailable)
345
426
 
346
427
  ```bash
347
- # Multi-channel recall
428
+ # Multi-channel recall (related memories are shown, labelled [related])
348
429
  slm recall "<query>" [--limit N] [--json]
430
+ slm recall "<query>" --depth 0|1|2 [--max-tokens N] # glance, full, with context
431
+ slm recall "<query>" --show-weak # every weak match, labelled [weak]
349
432
 
350
433
  # Narrow it (all optional, combined as AND)
351
434
  slm recall "<query>" --project <name-or-path> [--project-strict] [--prefer-project <path>]
@@ -383,6 +466,10 @@ configuration. See [docs/shared-memory.md](../../../docs/shared-memory.md).
383
466
 
384
467
  ## Never fabricate a memory
385
468
 
469
+ "That isn't in SuperLocalMemory." (`tier: none`) is final for that question:
470
+ stop and say so; do not invent an answer. While `warming_up` is true, say SLM
471
+ is still warming up and to try again in a few minutes instead.
472
+
386
473
  After re-querying with refined sub-queries (see **Refine on low confidence** above), if `no_confident_match` is still `true` or results are empty, report it plainly.
387
474
  Never construct a response as if a memory was found when it was not. The user
388
475
  trusts that what you surface came from the store.
@@ -424,7 +511,8 @@ See `slm-profile`.
424
511
  - `slm-session` — session lifecycle (must call before first recall)
425
512
  - `slm-scope` — multi-scope sharing model (personal / shared / global)
426
513
  - `slm-profile` — workspace isolation and profile switching
514
+ - `slm-media` — pictures and PDF pages in results, and how to save them
427
515
 
428
516
  ---
429
517
 
430
- *SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
518
+ *SuperLocalMemory v4.2.0 · Qualixar · AGPL-3.0-or-later*
@@ -28,6 +28,10 @@ sessions. One fact per call. Recall before you remember.
28
28
  - Security rules ("Rate limit all public endpoints at 100 req/min")
29
29
 
30
30
  **Do not store:**
31
+ - Pictures or PDFs through `remember`. It stores text. A screenshot, photo or
32
+ PDF goes through `remember_media` or `remember_document`; see `slm-media`.
33
+ Add the reason it matters in the text of a normal memory if you also want a
34
+ fact about it.
31
35
  - Transient context that is only relevant within this conversation
32
36
  - Large blobs of code or full file contents (those belong in the project, not memory)
33
37
  - Facts the project README already captures
@@ -364,7 +368,8 @@ sessions on this machine, so use it only when the user asks to move. See
364
368
  - `slm-session` — session lifecycle; session_id is required for attribution
365
369
  - `slm-scope` — complete guide to personal / shared / global scopes
366
370
  - `slm-profile` — workspace isolation and profile switching
371
+ - `slm-media` — saving pictures and PDFs (`remember_media`, `remember_document`)
367
372
 
368
373
  ---
369
374
 
370
- *SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
375
+ *SuperLocalMemory v4.2.0 · Qualixar · AGPL-3.0-or-later*
@@ -180,4 +180,4 @@ to review the impact. See `slm-remember` for the full deletion discipline.
180
180
 
181
181
  ---
182
182
 
183
- *SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
183
+ *SuperLocalMemory v4.2.0 · Qualixar · AGPL-3.0-or-later*
@@ -288,4 +288,4 @@ answered. To also surface shared or global facts, call `recall` with
288
288
 
289
289
  ---
290
290
 
291
- *SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
291
+ *SuperLocalMemory v4.2.0 · Qualixar · AGPL-3.0-or-later*
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: slm-status
3
3
  description: Health and optimization stats for SuperLocalMemory — call slm_optimize_stats() for live compression and cache counters (compress_runs, tokens_saved_compress, cache_proxy_hits, cache_proxy_misses, cache_kv_hits, cache_kv_misses); run slm status [--json] for system state (mode, profile, DB size, fact/entity/edge counts) and slm doctor [--json] for preflight including the "Optimize (Surface B)" health line; use together to confirm optimization is actually saving tokens.
4
- when_to_use: "check slm status, health check, is slm working, optimize stats, tokens saved, cache hits, compress runs, slm doctor, preflight, db size, slm info, diagnose slm"
4
+ when_to_use: "check slm status, health check, is slm working, optimize stats, tokens saved, cache hits, compress runs, slm doctor, preflight, db size, slm info, diagnose slm, slm media status, are pictures on, slm features, picture search not working, slm media repair, embedder status, memory health, slm enrich, repair memories, undo a repair"
5
5
  allowed-tools: slm_optimize_stats, get_status, get_brain_evidence_status, Bash
6
6
  ---
7
7
 
@@ -153,6 +153,49 @@ operations and, for an owner or admin, resolves them. The MCP counterpart for
153
153
  Living Brain totals is `get_brain_evidence_status(profile_id="")`; it only
154
154
  observes and does not change recall, ranking or review.
155
155
 
156
+ ## Memory health: SLM looks after older memories
157
+
158
+ While the computer is idle, Memory health describes older memories (event dates,
159
+ names, projects, tags and kinds) by adding only — it never changes or deletes what
160
+ was written. Repairs that move or delete anything wait for the owner's **Fix**, and
161
+ every run that changed something can be undone.
162
+
163
+ ```bash
164
+ slm enrich status # progress, repairs waiting, the id of every run that changed something
165
+ slm enrich pause <run> # recall and remember keep working
166
+ slm enrich resume <run>
167
+ slm enrich fix entity-links # apply a suggested repair (asks first)
168
+ slm enrich undo # undo the latest run that changed something (asks first)
169
+ ```
170
+
171
+ `repair-saves` keeps no undo record; it says so and takes a safety copy before it
172
+ runs. An undone repair is not suggested again until you ask with
173
+ `--include-undone`. The dashboard shows the same state on the **Memory health**
174
+ card at the top of the Health pane. Guide: `docs/memory-health.md`.
175
+
176
+ ## Pictures and documents: status and repair
177
+
178
+ Pictures and documents are an optional feature, off by default. Check them with
179
+ the CLI (the MCP `get_status` does not report them):
180
+
181
+ ```bash
182
+ slm media status [--json] # off | on, setting up (state, percent) | on | failed, with the step
183
+ slm features [--json] # what is on and what can be turned on: pictures and documents, folder sources, bot messages
184
+ slm media repair --dry-run # count pictures that cannot be found by what they show yet (owner or admin)
185
+ slm media repair # re-embed them; up to four minutes per run, run again if it says some are left
186
+ slm media gc # report picture records without a memory, files without a record (removes nothing)
187
+ slm embedder status # progress of an embedding-model switch or the memory-engine upgrade
188
+ ```
189
+
190
+ If `slm media status` says "set-up failed", run `slm doctor` for the step that
191
+ failed. The five picture tools (`remember_media`, `get_media`,
192
+ `remember_document`, `media_status`, `media_upload_link`) are listed only while
193
+ the feature is on and only in the `full`, `power` and `whole` tool sets; a
194
+ restart (`slm restart`) starts the picture worker. A document's own progress
195
+ is the `media_status` MCP tool, not this command. Details, limits and the
196
+ 16 GB requirement: `slm-media`. `slm status` also prints an "Embedding switch" line while a model switch or
197
+ the memory-engine upgrade is pending.
198
+
156
199
  ## Recommended Health Workflow
157
200
 
158
201
  1. Run `slm doctor --json` at session start to confirm all subsystems are up.
@@ -160,6 +203,7 @@ observes and does not change recall, ranking or review.
160
203
  3. Run `slm status --json` when you need DB size or memory counts.
161
204
  4. If `ok: false` on any MCP tool — check `note` field, then run `slm doctor` to isolate the failure.
162
205
  5. If recall seems to miss memories that were saved, run `slm db integrity` before concluding anything.
206
+ 6. If a picture will not come back for a question about what it shows, run `slm media status`, then `slm media repair --dry-run`.
163
207
 
164
208
  ## Fail-Open
165
209
 
@@ -179,7 +223,9 @@ observes and does not change recall, ranking or review.
179
223
  - `slm-profile` — workspace isolation and profile switching
180
224
  - `slm-cache` — KV cache performance metrics
181
225
  - `slm-compress` — reversible context compression
226
+ - `slm-media` — pictures, PDFs and folders
227
+ - `slm-web-access` — the Connected apps page and web-app connection states
182
228
 
183
229
  ---
184
230
 
185
- SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
231
+ SuperLocalMemory v4.2.0 · Qualixar · AGPL-3.0-or-later
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: slm-web-access
3
- description: Set up and troubleshoot SuperLocalMemory Web access, the optional link that lets web apps (ChatGPT, Claude on the web, Muse, Composio, other remote MCP clients) use the memory on this computer. Covers turning it on from the dashboard, adding and removing apps, read/save/session permissions, renewal, the connection states, the errors a web app can see, and the copy-paste instructions for web agents.
4
- when_to_use: "web access, connected apps, connect chatgpt, connect claude web, connect muse, connect composio, remote mcp, mcp.superlocalmemory.com, connector_asleep, DAILY_LIMIT_REACHED, web app cannot reach memory, instructions for web agent"
3
+ description: Set up and troubleshoot SuperLocalMemory Web access, the optional link that lets web apps (ChatGPT, Claude on the web, Muse, Composio, other remote MCP clients) use the memory on this computer. Covers turning it on from the dashboard, adding and removing apps, read/save/session permissions, the second yes for bot messages and pictures (the Web access switches in Connected apps), one-time upload links for pictures and PDFs, what leaves the computer, renewal, the connection states, the errors a web app can see, and the copy-paste instructions for web agents.
4
+ when_to_use: "web access, connected apps, connect chatgpt, connect claude web, connect muse, connect composio, connect grok bot, remote mcp, mcp.superlocalmemory.com, connector_asleep, DAILY_LIMIT_REACHED, web app cannot reach memory, instructions for web agent, web app bot messages, web app upload link, Let these apps message your other bots, Let these apps save and read pictures and documents, not_for_remote"
5
5
  allowed-tools: get_status, Read, Bash
6
6
  ---
7
7
 
@@ -29,7 +29,8 @@ named keys, for tools on another computer in your own network.
29
29
  app** (reading is always included). **Allow saving memories** adds the
30
30
  `remember` tool and **Allow session tools** adds `session_init`,
31
31
  `close_session`, `report_feedback` and `report_outcome`; both are separate
32
- opt-ins.
32
+ opt-ins. Bot messages and pictures are two more opt-ins that the app asks
33
+ for on its own approval page; see "The second yes" below.
33
34
  4. Select **Link this computer with GitHub** and finish sign-in in the page
34
35
  that opens. Wait until the row reads "On. Apps you approve can reach your
35
36
  memory while this computer is online."
@@ -52,12 +53,88 @@ setup. `scope` must be personal, `shared_with` is refused, and `replaces` is
52
53
  refused (`CORRECTION_DENIED`): corrections, deletes and sharing stay on this
53
54
  computer.
54
55
 
56
+ Two more groups need the second yes (next section):
57
+
58
+ - **Bot messages:** `mesh_peers`, `mesh_send`, `mesh_inbox`, `mesh_wait`,
59
+ `mesh_state` (read only). See `slm-mesh`.
60
+ - **Pictures and documents:** `get_media`, `media_status`; with Save also
61
+ `remember_media`, `remember_document` and `media_upload_link`. See
62
+ `slm-media`.
63
+
64
+ Everything else (`mesh_lock`, `mesh_summary`, `mesh_events`, `mesh_status`,
65
+ `switch_profile`, maintenance, code graph, loops, `forget`) stays on this
66
+ computer.
67
+
68
+ ## The second yes: Web access switches
69
+
70
+ Bot messages and pictures need two yeses. Without both, the call is refused.
71
+
72
+ 1. **The app's approval page.** Tick **Allow talking to your other bots** and
73
+ **Allow images and documents**. Both start unticked and appear only when the
74
+ app asks for them. Saving files also needs **Allow saving memories**.
75
+ 2. **This computer.** In **Connected apps**, the **Web access** row has two
76
+ switches: **Let these apps message your other bots (SLM Mesh)** and **Let
77
+ these apps save and read pictures and documents**. They apply to every app on
78
+ that connection on its next request. From a terminal the same switches are
79
+ on the connection's remote key, named `web-<connection id>`:
80
+
81
+ ```bash
82
+ slm remote keys list
83
+ slm remote keys allow web-<connection id> mesh
84
+ slm remote keys allow web-<connection id> media
85
+ slm remote keys disallow web-<connection id> mesh
86
+ ```
87
+
88
+ Turning pictures off also ends any upload link the connection has not used.
89
+ The owner flips these; an agent must not. Pictures also need the feature
90
+ itself to be on (`slm media status`; see `slm-media`).
91
+
92
+ ChatGPT keeps the permissions it saw when the app was created: after a new
93
+ permission, uninstall the app and add it again. Composio needs a manual
94
+ toolkit re-sync to see new tools.
95
+
96
+ ## Adding a picture or PDF from a web app
97
+
98
+ A chat cannot type a file into a tool call. The app asks for an upload link
99
+ (`media_upload_link`, kind `image` or `document`) and shows it to the person.
100
+ The person opens it in any browser, picks the file and presses Save; the page
101
+ says "Saved to your memory" when this computer has it. The file streams to this
102
+ computer through the gateway, which keeps no copy. A link belongs to the app
103
+ that asked for it, works once, expires in 10 minutes, and must not be shared.
104
+ Each connection can have 3 open links and 20 uploads a day. Pictures can be up
105
+ to 25 MB (PNG, JPEG, GIF, WebP), PDFs up to 100 MB. This computer must be awake
106
+ and running SLM. If SLM was updated, links made before the update stop working:
107
+ ask the app for a new one.
108
+
109
+ ChatGPT can instead hand over a file attached to the chat. This computer
110
+ downloads it only from ChatGPT's own file hosts plus hosts in
111
+ `SLM_MEDIA_URL_HOSTS`, which is empty by default; a refusal such as "That host
112
+ is not on the allowed list" means the owner must add the host. Per-app steps
113
+ are in `docs/remote-access/hosts.md`.
114
+
115
+ ## What leaves the computer
116
+
117
+ The memory database never leaves the computer. Each tool call and its result
118
+ pass through SuperLocalMemory's connection gateway and the app that made the
119
+ call. Memory text the app recalls is visible to that app. Bot messages and peer
120
+ summaries are secret-redacted before a web app sees them; a picture or page
121
+ whose text held a secret or personal data is not shown to web apps at all, and
122
+ connected folders are never shown to them.
123
+ Uploaded files travel through the gateway to this computer and are not stored
124
+ there. An app cannot change, delete, pin or replace a memory it is not allowed
125
+ to see; it is answered as if that memory did not exist.
126
+
55
127
  ## Instructions for the web agent
56
128
 
57
129
  The app also needs to know when to use the tools. Give the owner
58
- `docs/web-agents/instructions.md` (full and short blocks) or the Agent Skill
59
- folder `docs/web-agents/superlocalmemory-web/`. The dashboard's **How to add an
60
- app** panel has a **Copy instructions** button with the short block.
130
+ `docs/web-agents/setup-prompt.md` (paste it into a chat with the app once
131
+ connected), `docs/web-agents/instructions.md` (full and short blocks) or the
132
+ Agent Skill folder `docs/web-agents/superlocalmemory-web/`. The dashboard's
133
+ **How to add an app** panel has a **Copy instructions** button with the short
134
+ block. All of them cover recall, saving, upload links for pictures, bot
135
+ messages with `mesh_wait` and `ack`, and what to do on errors.
136
+ Exact per-app steps (ChatGPT, ChatGPT dots, Grok Bot, Composio, Muse) are in
137
+ `docs/remote-access/hosts.md`.
61
138
 
62
139
  ## Renewal
63
140
 
@@ -77,6 +154,8 @@ affected.
77
154
  | `relay_busy` | Too many calls in flight at once | Make calls one at a time |
78
155
  | `DAILY_LIMIT_REACHED` (HTTP 429) | The free daily allowance is used up | Resets at midnight UTC (`Retry-After` says when) |
79
156
  | `TOOL_DENIED`, `INSUFFICIENT_SCOPE` | The app was not given that permission | Remove its access and add it again with the permission ticked |
157
+ | `not_for_remote`, `not_allowed` (pictures) or a refused mesh call | The app has the box but the Web access switch (or the key's `mesh`/`media` opt-in) is off, or the key is not a write key | Turn the switch on in **Connected apps**, or `slm remote keys allow web-<connection id> mesh\|media` |
158
+ | `MESH_SEND_LIMIT` | The app sent its 200 bot messages for today | Stop sending until the daily count resets |
80
159
  | `CORRECTION_DENIED`, `SHARING_DENIED`, `PROFILE_DENIED` | The app tried something only this computer may do | Do it locally |
81
160
  | `REVOKED` | The owner removed the app | Add it again if wanted |
82
161
  | `ENTITLEMENT_REQUIRED` | Web access has ended | Turn it on again in **Connected apps** |
@@ -89,3 +168,12 @@ To check from this computer, call `get_status` and run `slm status`; the
89
168
  **Connected apps** → the app's row → **Remove access**. The gateway refuses its
90
169
  next call.
91
170
  Memory and local configuration are kept.
171
+
172
+ ---
173
+
174
+ ## Related skills
175
+
176
+ - `slm-media` — pictures, PDFs and upload links in detail
177
+ - `slm-mesh` — bot messages, `mesh_wait` and `ack`
178
+ - `slm-bot-memory` and `slm-getting-started-bot` — bots that share one computer
179
+ - `slm-governance` — roles and company mode
@@ -0,0 +1,112 @@
1
+ /**
2
+ * The "Upgrade memory engine" offer at install time.
3
+ *
4
+ * For someone who already has memories, the installer can offer to move them to the
5
+ * newer memory engine. Like the images-and-documents request, it only records a request
6
+ * in <data root>/features.json; the SLM daemon acts on it at its next start, once the
7
+ * images-and-documents environment is ready. Nothing is downloaded here.
8
+ *
9
+ * Off until the memory check on the Mac passes (UPGRADE_PROMPT_ENABLED): the explicit
10
+ * command (slm embedder upgrade) and the dashboard button work before that, an
11
+ * unsolicited prompt does not. Never asks off a terminal or in CI; the default is No.
12
+ *
13
+ * Copyright (c) 2026 Varun Pratap Bhardwaj / Qualixar
14
+ * Licensed under AGPL-3.0-or-later.
15
+ */
16
+
17
+ 'use strict';
18
+
19
+ const fs = require('fs');
20
+ const path = require('path');
21
+ const readline = require('readline');
22
+
23
+ const { FEATURES_FILE, resolveDataRoot, recordMediaRequest } = require('./media-request.js');
24
+
25
+ const UPGRADE_PROMPT_ENABLED = false;
26
+ const MANAGED_PROVIDER = 'slm-media';
27
+
28
+ function printUpgradeOffer(log = console.log) {
29
+ log('');
30
+ log('SLM: you can move your memories to the newer memory engine (it also reads pictures and documents).');
31
+ log(' Your memories are re-read in the background. Recall keeps working meanwhile, nothing is deleted,');
32
+ log(' and you can roll back. It needs images and documents turned on (about 1.5 GB of models).');
33
+ log(' Any time: slm embedder upgrade');
34
+ }
35
+
36
+ /** True for an existing store (memory.db present) that is not already on the managed model. */
37
+ function shouldOffer(slmDir) {
38
+ if (!fs.existsSync(path.join(slmDir, 'memory.db'))) return false;
39
+ try {
40
+ const config = JSON.parse(fs.readFileSync(path.join(slmDir, 'config.json'), 'utf8'));
41
+ return !(config && config.embedding && config.embedding.provider === MANAGED_PROVIDER);
42
+ } catch (_e) {
43
+ return true;
44
+ }
45
+ }
46
+
47
+ /** Merge {"engine_upgrade": {"requested": true, ...}} into features.json (mode 0600). Never throws. */
48
+ function recordUpgradeRequest(slmDir, now = new Date()) {
49
+ const file = path.join(slmDir, FEATURES_FILE);
50
+ try {
51
+ let data = { schema: 1 };
52
+ if (fs.existsSync(file)) {
53
+ data = JSON.parse(fs.readFileSync(file, 'utf8'));
54
+ if (!data || typeof data !== 'object' || Array.isArray(data)) return false;
55
+ }
56
+ data.engine_upgrade = { requested: true, requested_at: now.toISOString(), choice_source: 'npm' };
57
+ const tmp = file + '.tmp';
58
+ const fd = fs.openSync(tmp, 'w', 0o600);
59
+ try {
60
+ fs.writeSync(fd, JSON.stringify(data), 0, 'utf8');
61
+ } finally {
62
+ fs.closeSync(fd);
63
+ }
64
+ fs.renameSync(tmp, file);
65
+ if (process.platform !== 'win32') {
66
+ try { fs.chmodSync(file, 0o600); } catch (_e) { /* best-effort */ }
67
+ }
68
+ return true;
69
+ } catch (_e) {
70
+ return false;
71
+ }
72
+ }
73
+
74
+ function askYesNo(question) {
75
+ return new Promise((resolve) => {
76
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
77
+ rl.question(question, (answer) => {
78
+ rl.close();
79
+ resolve(/^\s*y(es)?\s*$/i.test(answer || ''));
80
+ });
81
+ });
82
+ }
83
+
84
+ /**
85
+ * Offer (when enabled, on a terminal, outside CI, for an existing store) and record on a yes.
86
+ * Returns true when a request was recorded. Never downloads, never throws.
87
+ */
88
+ async function runUpgradeStep({ enabled = UPGRADE_PROMPT_ENABLED, env = process.env, tty, ask,
89
+ log = console.log, slmDir } = {}) {
90
+ try {
91
+ if (!enabled) return false;
92
+ const isTty = tty !== undefined ? tty : Boolean(process.stdout.isTTY && process.stdin.isTTY);
93
+ const ci = env.CI === 'true' || env.CI === '1';
94
+ const dir = slmDir || resolveDataRoot(env);
95
+ if (!isTty || ci || !shouldOffer(dir)) return false;
96
+ printUpgradeOffer(log);
97
+ const yes = await (ask || askYesNo)('Upgrade the memory engine after install? [y/N] ');
98
+ if (!yes) return false;
99
+ const media = recordMediaRequest(dir);
100
+ if (!media.ok || !recordUpgradeRequest(dir)) {
101
+ log('SLM: could not record the request. Run later: slm embedder upgrade');
102
+ return false;
103
+ }
104
+ log('SLM: the upgrade will start the next time SLM starts, once images and documents are ready.');
105
+ return true;
106
+ } catch (e) {
107
+ log('SLM: could not record the upgrade choice (' + e.message + '). Run later: slm embedder upgrade');
108
+ return false;
109
+ }
110
+ }
111
+
112
+ module.exports = { UPGRADE_PROMPT_ENABLED, printUpgradeOffer, recordUpgradeRequest, runUpgradeStep, shouldOffer };