superlocalmemory 4.1.22 → 4.1.23
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 +2 -2
- package/CHANGELOG.md +99 -0
- package/README.md +50 -27
- package/antigravity-plugin/_GENERATED.md +33 -0
- package/antigravity-plugin/agents/slm-governance-advisor.md +78 -0
- package/antigravity-plugin/agents/slm-loop-runner.md +82 -0
- package/antigravity-plugin/agents/slm-memory-advisor.md +50 -0
- package/antigravity-plugin/agents/slm-optimize-advisor.md +44 -0
- package/antigravity-plugin/commands/slm-loop.md +33 -0
- package/antigravity-plugin/hooks/hooks.json +59 -0
- package/antigravity-plugin/hooks.json +42 -0
- package/antigravity-plugin/mcp_config.json +14 -0
- package/antigravity-plugin/plugin.json +25 -0
- package/antigravity-plugin/scripts/antigravity_hook_adapter.py +85 -0
- package/antigravity-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/antigravity-plugin/skills/slm-cache/SKILL.md +147 -0
- package/antigravity-plugin/skills/slm-compress/SKILL.md +150 -0
- package/antigravity-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/antigravity-plugin/skills/slm-governance/SKILL.md +221 -0
- package/antigravity-plugin/skills/slm-graph/SKILL.md +327 -0
- package/antigravity-plugin/skills/slm-loop/SKILL.md +153 -0
- package/antigravity-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/antigravity-plugin/skills/slm-profile/SKILL.md +159 -0
- package/antigravity-plugin/skills/slm-recall/SKILL.md +430 -0
- package/antigravity-plugin/skills/slm-remember/SKILL.md +370 -0
- package/antigravity-plugin/skills/slm-scope/SKILL.md +183 -0
- package/antigravity-plugin/skills/slm-session/SKILL.md +291 -0
- package/antigravity-plugin/skills/slm-status/SKILL.md +185 -0
- package/antigravity-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/codex-plugin/.claude-plugin/plugin.json +19 -0
- package/codex-plugin/.codex/config.toml +40 -0
- package/codex-plugin/.codex-plugin/plugin.json +43 -0
- package/codex-plugin/.mcp.json +16 -0
- package/codex-plugin/AGENTS.md +161 -0
- package/codex-plugin/README.md +205 -0
- package/codex-plugin/_GENERATED.md +52 -0
- package/codex-plugin/agents/slm-governance-advisor.md +78 -0
- package/codex-plugin/agents/slm-loop-runner.md +82 -0
- package/codex-plugin/agents/slm-memory-advisor.md +50 -0
- package/codex-plugin/agents/slm-optimize-advisor.md +44 -0
- package/codex-plugin/commands/slm-loop.md +33 -0
- package/codex-plugin/hooks/hooks.json +59 -0
- package/codex-plugin/scripts/ensure-venv.bat +108 -0
- package/codex-plugin/scripts/ensure-venv.sh +100 -0
- package/codex-plugin/scripts/slm-launch +55 -0
- package/codex-plugin/scripts/slm-launch.bat +30 -0
- package/codex-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/codex-plugin/skills/slm-cache/SKILL.md +147 -0
- package/codex-plugin/skills/slm-compress/SKILL.md +150 -0
- package/codex-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/codex-plugin/skills/slm-governance/SKILL.md +221 -0
- package/codex-plugin/skills/slm-graph/SKILL.md +327 -0
- package/codex-plugin/skills/slm-loop/SKILL.md +153 -0
- package/codex-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/codex-plugin/skills/slm-profile/SKILL.md +159 -0
- package/codex-plugin/skills/slm-recall/SKILL.md +430 -0
- package/codex-plugin/skills/slm-remember/SKILL.md +370 -0
- package/codex-plugin/skills/slm-scope/SKILL.md +183 -0
- package/codex-plugin/skills/slm-session/SKILL.md +291 -0
- package/codex-plugin/skills/slm-status/SKILL.md +185 -0
- package/codex-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/copilot-plugin/.github/agents/slm-governance-advisor.agent.md +80 -0
- package/copilot-plugin/.github/agents/slm-loop-runner.agent.md +84 -0
- package/copilot-plugin/.github/agents/slm-memory-advisor.agent.md +52 -0
- package/copilot-plugin/.github/agents/slm-optimize-advisor.agent.md +46 -0
- package/copilot-plugin/.github/copilot-instructions.md +52 -0
- package/copilot-plugin/.github/hooks/slm-hooks.json +44 -0
- package/copilot-plugin/.github/prompts/slm-bot-memory.prompt.md +147 -0
- package/copilot-plugin/.github/prompts/slm-cache.prompt.md +151 -0
- package/copilot-plugin/.github/prompts/slm-compress.prompt.md +154 -0
- package/copilot-plugin/.github/prompts/slm-getting-started-bot.prompt.md +147 -0
- package/copilot-plugin/.github/prompts/slm-governance.prompt.md +224 -0
- package/copilot-plugin/.github/prompts/slm-graph.prompt.md +322 -0
- package/copilot-plugin/.github/prompts/slm-loop.prompt.md +159 -0
- package/copilot-plugin/.github/prompts/slm-mesh.prompt.md +290 -0
- package/copilot-plugin/.github/prompts/slm-profile.prompt.md +155 -0
- package/copilot-plugin/.github/prompts/slm-recall.prompt.md +434 -0
- package/copilot-plugin/.github/prompts/slm-remember.prompt.md +375 -0
- package/copilot-plugin/.github/prompts/slm-scope.prompt.md +183 -0
- package/copilot-plugin/.github/prompts/slm-session.prompt.md +291 -0
- package/copilot-plugin/.github/prompts/slm-status.prompt.md +190 -0
- package/copilot-plugin/.github/prompts/slm-web-access.prompt.md +95 -0
- package/copilot-plugin/.vscode/mcp.json +11 -0
- package/copilot-plugin/README.md +26 -0
- package/copilot-plugin/_GENERATED.md +49 -0
- package/copilot-plugin/scripts/ensure-venv.bat +122 -0
- package/copilot-plugin/scripts/ensure-venv.sh +169 -0
- package/copilot-plugin/scripts/slm-launch +207 -0
- package/copilot-plugin/scripts/slm-launch.bat +32 -0
- package/copilot-plugin/scripts/slm-resolve.sh +128 -0
- package/copilot-plugin/scripts/slm-run +76 -0
- package/copilot-plugin/scripts/torch-cpu-resolve.sh +86 -0
- package/docs/pi-dev-integration.md +0 -2
- package/hermes-plugin/README.md +30 -0
- package/hermes-plugin/_GENERATED.md +3 -0
- package/hermes-plugin/__init__.py +417 -0
- package/hermes-plugin/agents/slm-governance-advisor.md +78 -0
- package/hermes-plugin/agents/slm-loop-runner.md +82 -0
- package/hermes-plugin/agents/slm-memory-advisor.md +50 -0
- package/hermes-plugin/agents/slm-optimize-advisor.md +44 -0
- package/hermes-plugin/command-inventory.json +7 -0
- package/hermes-plugin/plugin.yaml +24 -0
- package/hermes-plugin/remote.py +390 -0
- package/hermes-plugin/skills/slm-bot-memory/SKILL.md +146 -0
- package/hermes-plugin/skills/slm-cache/SKILL.md +147 -0
- package/hermes-plugin/skills/slm-compress/SKILL.md +150 -0
- package/hermes-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
- package/hermes-plugin/skills/slm-governance/SKILL.md +221 -0
- package/hermes-plugin/skills/slm-graph/SKILL.md +327 -0
- package/hermes-plugin/skills/slm-loop/SKILL.md +153 -0
- package/hermes-plugin/skills/slm-mesh/SKILL.md +287 -0
- package/hermes-plugin/skills/slm-profile/SKILL.md +159 -0
- package/hermes-plugin/skills/slm-recall/SKILL.md +430 -0
- package/hermes-plugin/skills/slm-remember/SKILL.md +370 -0
- package/hermes-plugin/skills/slm-scope/SKILL.md +183 -0
- package/hermes-plugin/skills/slm-session/SKILL.md +291 -0
- package/hermes-plugin/skills/slm-status/SKILL.md +185 -0
- package/hermes-plugin/skills/slm-web-access/SKILL.md +91 -0
- package/package.json +9 -18
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/CLAUDE.md +14 -12
- package/plugin/agents/slm-governance-advisor.md +14 -16
- package/plugin/agents/slm-loop-runner.md +22 -11
- package/plugin/agents/slm-memory-advisor.md +14 -14
- package/plugin/agents/slm-optimize-advisor.md +5 -5
- package/plugin/commands/slm-loop.md +5 -3
- package/plugin/cursor-skills/slm-bot-memory/SKILL.md +19 -12
- package/plugin/cursor-skills/slm-getting-started-bot/SKILL.md +17 -9
- package/plugin/cursor-skills/slm-recall/SKILL.md +151 -54
- package/plugin/cursor-skills/slm-remember/SKILL.md +132 -35
- package/plugin/cursor-skills/slm-scope/SKILL.md +24 -17
- package/plugin/cursor-skills/slm-session/SKILL.md +77 -57
- package/plugin/mcp.cursor.json +1 -1
- package/plugin/requirements.txt +1 -1
- package/plugin/skills/slm-bot-memory/SKILL.md +19 -12
- package/plugin/skills/slm-cache/SKILL.md +6 -7
- package/plugin/skills/slm-compress/SKILL.md +3 -3
- package/plugin/skills/slm-getting-started-bot/SKILL.md +17 -9
- package/plugin/skills/slm-governance/SKILL.md +126 -153
- package/plugin/skills/slm-graph/SKILL.md +27 -15
- package/plugin/skills/slm-loop/SKILL.md +74 -20
- package/plugin/skills/slm-mesh/SKILL.md +17 -12
- package/plugin/skills/slm-profile/SKILL.md +101 -92
- package/plugin/skills/slm-recall/SKILL.md +151 -54
- package/plugin/skills/slm-remember/SKILL.md +132 -35
- package/plugin/skills/slm-scope/SKILL.md +24 -17
- package/plugin/skills/slm-session/SKILL.md +77 -57
- package/plugin/skills/slm-status/SKILL.md +54 -35
- package/plugin/skills/slm-web-access/SKILL.md +91 -0
- package/plugin-src/agents/slm-governance-advisor.md +78 -0
- package/plugin-src/agents/slm-loop-runner.md +82 -0
- package/plugin-src/agents/slm-memory-advisor.md +14 -14
- package/plugin-src/agents/slm-optimize-advisor.md +5 -5
- package/plugin-src/commands/slm-loop.md +33 -0
- package/plugin-src/rules/AGENTS.md +45 -36
- package/plugin-src/rules/CLAUDE.md.fragment +47 -0
- package/plugin-src/skills/slm-bot-memory/SKILL.md +19 -12
- package/plugin-src/skills/slm-cache/SKILL.md +6 -7
- package/plugin-src/skills/slm-compress/SKILL.md +3 -3
- package/plugin-src/skills/slm-getting-started-bot/SKILL.md +17 -9
- package/plugin-src/skills/slm-governance/SKILL.md +126 -153
- package/plugin-src/skills/slm-graph/SKILL.md +27 -15
- package/plugin-src/skills/slm-loop/SKILL.md +74 -20
- package/plugin-src/skills/slm-mesh/SKILL.md +17 -12
- package/plugin-src/skills/slm-profile/SKILL.md +101 -92
- package/plugin-src/skills/slm-recall/SKILL.md +151 -54
- package/plugin-src/skills/slm-remember/SKILL.md +132 -35
- package/plugin-src/skills/slm-scope/SKILL.md +24 -17
- package/plugin-src/skills/slm-session/SKILL.md +77 -57
- package/plugin-src/skills/slm-status/SKILL.md +54 -35
- package/plugin-src/skills/slm-web-access/SKILL.md +91 -0
|
@@ -31,7 +31,7 @@ slm_cache_set(
|
|
|
31
31
|
| `stored` | bool | `True` when the value was written to the cache |
|
|
32
32
|
| `note` | str \| None | Error detail or `None` on success |
|
|
33
33
|
|
|
34
|
-
Keys are SHA-256-hashed internally per agent so they do not collide across agents. The raw key string you supply is the only handle you need.
|
|
34
|
+
Keys are SHA-256-hashed internally per agent so they do not collide across agents. The raw key string you supply is the only handle you need. The namespace is the calling agent (`SLM_AGENT_ID`, or the `/mcp/<agent>` path), not the memory profile, so switching profiles does not give you a fresh cache. A caller on another computer gets its own namespace, keyed by its access key, and can never see a local agent's entries.
|
|
35
35
|
|
|
36
36
|
## Tool: slm_cache_get
|
|
37
37
|
|
|
@@ -50,7 +50,7 @@ slm_cache_get(
|
|
|
50
50
|
| `value` | str \| None | The stored value on a hit; `None` on miss |
|
|
51
51
|
| `note` | str \| None | Error detail or `None` |
|
|
52
52
|
|
|
53
|
-
A miss returns `{"ok": true, "hit": false, "value": null, "note": null}`. `ok: false` means something went wrong internally but the miss behaviour is the same — treat both as a cache miss and proceed with the real fetch.
|
|
53
|
+
`value` is the string you stored. A miss returns `{"ok": true, "hit": false, "value": null, "note": null}`. `ok: false` means something went wrong internally but the miss behaviour is the same — treat both as a cache miss and proceed with the real fetch.
|
|
54
54
|
|
|
55
55
|
## Standard Pattern: Cache-Aside
|
|
56
56
|
|
|
@@ -123,7 +123,7 @@ Set `ttl_seconds` to match how long the data remains valid. After expiry `slm_ca
|
|
|
123
123
|
|
|
124
124
|
## Secondary CLI (fallback when MCP is unavailable)
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Prefer the MCP tools above. If you must use the command line:
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
slm cache status [--json] [--tenant default]
|
|
@@ -133,16 +133,15 @@ slm cache ttl --set <seconds> [--semantic <seconds>] [--json] [--tenant default]
|
|
|
133
133
|
slm cache semantic on|off [--json] [--tenant default]
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
These subcommands control daemon-level cache settings. They do not read or write individual
|
|
136
|
+
These subcommands control daemon-level cache settings and bulk removal. They do not read or write individual entries — use the MCP tools for that. Entries written by `slm_cache_set` carry the tag `mcp-kv`, so `slm cache invalidate --tag mcp-kv` removes them, and `slm cache clear` deletes every entry for the tenant.
|
|
137
137
|
|
|
138
138
|
---
|
|
139
139
|
|
|
140
140
|
## Related skills
|
|
141
141
|
|
|
142
142
|
- `slm-compress` — for large content reduction; cache and compress work together
|
|
143
|
-
- `slm-status` — view `cache_kv_hits`/`cache_kv_misses` counters from `slm_optimize_stats`
|
|
144
|
-
- `slm-profile` — cache entries are namespaced per profile; switching profiles gives a fresh cache namespace
|
|
143
|
+
- `slm-status` — view `cache_kv_hits`/`cache_kv_misses` counters (daemon-persisted totals) from `slm_optimize_stats`
|
|
145
144
|
|
|
146
145
|
---
|
|
147
146
|
|
|
148
|
-
SuperLocalMemory v4.1.
|
|
147
|
+
SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
|
|
@@ -61,7 +61,7 @@ slm_retrieve(ccr_id: str) -> dict
|
|
|
61
61
|
|
|
62
62
|
### CCR security rule
|
|
63
63
|
|
|
64
|
-
`ccr_id` values are **unguessable session tokens
|
|
64
|
+
`ccr_id` values are **unguessable session tokens**, and the stored original can be read back only by the same agent (or, for a remote caller, the same access key) that compressed it. Treat them like short-lived credentials:
|
|
65
65
|
- Never log them.
|
|
66
66
|
- Never share them across agents.
|
|
67
67
|
- Never pass them as tool arguments to any tool other than `slm_retrieve`.
|
|
@@ -121,7 +121,7 @@ if ccr_id:
|
|
|
121
121
|
|
|
122
122
|
## Secondary CLI (fallback when MCP is unavailable)
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Prefer the MCP tools above. If you must use the command line:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
slm compress status [--json]
|
|
@@ -147,4 +147,4 @@ Content over 1 MB (1 000 000 bytes UTF-8) is processed but `reversible` is force
|
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
|
150
|
-
SuperLocalMemory v4.1.
|
|
150
|
+
SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
|
|
@@ -55,10 +55,17 @@ tiers it will not use. The 18 tools:
|
|
|
55
55
|
`list_corrections`, `get_memory_summary`, `switch_profile`.
|
|
56
56
|
|
|
57
57
|
If you are looking at another skill that mentions a tool NOT in this list
|
|
58
|
-
(`build_code_graph`, `mesh_send`,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
has deliberately
|
|
58
|
+
(`build_code_graph`, `mesh_send`, `report_outcome`, `delete_memory`,
|
|
59
|
+
`set_memory_kind`, anything governance/compliance-shaped), that skill describes
|
|
60
|
+
a different, larger profile (`code`, `full`, `power`) — it is accurate for Claude
|
|
61
|
+
Code or Codex installs, not for this one, unless someone has deliberately
|
|
62
|
+
reconfigured `SLM_MCP_PROFILE`. Skip those steps rather than reporting an error.
|
|
63
|
+
|
|
64
|
+
Two things the core set does cover that other skills explain: `remember` takes
|
|
65
|
+
`kind` and `replaces` (a newer version of a memory should be saved with
|
|
66
|
+
`replaces=<fact_id>`; see `slm-remember`), and `list_corrections` /
|
|
67
|
+
`review_correction` handle the review of an `update_memory` edit. A bot with
|
|
68
|
+
no one to review should prefer `replaces` over `update_memory`.
|
|
62
69
|
|
|
63
70
|
---
|
|
64
71
|
|
|
@@ -91,10 +98,11 @@ has deliberately reconfigured `SLM_MCP_PROFILE`.
|
|
|
91
98
|
The first `remember`/`recall` on a fresh `SLM_DATA_DIR` has to: resolve
|
|
92
99
|
`uvx`'s pinned `superlocalmemory` package, start the daemon, and warm an
|
|
93
100
|
embedding model (and, unless this is the lite profile, a reranker model) —
|
|
94
|
-
tens of seconds, not milliseconds. A `recall`
|
|
95
|
-
`
|
|
96
|
-
|
|
97
|
-
rather than assuming something is
|
|
101
|
+
tens of seconds, not milliseconds. A `recall` whose `channel_status` shows
|
|
102
|
+
`warming` (or `no_embedding`) for some channels in that window is not a bug; it
|
|
103
|
+
means the embedding model had not finished loading yet, and the answer is
|
|
104
|
+
incomplete rather than empty. Retry once rather than assuming something is
|
|
105
|
+
broken.
|
|
98
106
|
|
|
99
107
|
---
|
|
100
108
|
|
|
@@ -135,4 +143,4 @@ quality on a shared box.
|
|
|
135
143
|
|
|
136
144
|
---
|
|
137
145
|
|
|
138
|
-
*SuperLocalMemory v4.1.
|
|
146
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -1,236 +1,208 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slm-governance
|
|
3
|
-
description:
|
|
3
|
+
description: Governed-workspace behavior for SuperLocalMemory. Covers roles (admin/member/viewer) and company mode, retention and lifecycle settings, the audit trail, GDPR export and erasure, and how agents must behave when operating under workspace governance. The audit and retention tools need the power MCP profile. Agents must never bypass governance controls.
|
|
4
4
|
when_to_use: |
|
|
5
5
|
- "What can I do in this workspace?" (role check)
|
|
6
|
-
- "
|
|
6
|
+
- "Move cold memories to archive after 60 days"
|
|
7
7
|
- "Show the audit trail for recent memory operations"
|
|
8
8
|
- "Export my data for GDPR compliance"
|
|
9
|
-
- "Delete all memories
|
|
10
|
-
- "
|
|
9
|
+
- "Delete all memories about user X (right to erasure)"
|
|
10
|
+
- "Turn on require-login for this workspace"
|
|
11
11
|
- Enterprise deployment with multi-team shared SLM
|
|
12
12
|
- Compliance, audit, or data governance task
|
|
13
|
-
allowed-tools: audit_trail, set_retention_policy, get_retention_stats, get_lifecycle_status, recall, search, remember, Bash
|
|
13
|
+
allowed-tools: audit_trail, set_retention_policy, get_retention_stats, get_lifecycle_status, compact_memories, consistency_check, recall, search, remember, Bash
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
# slm-governance —
|
|
16
|
+
# slm-governance — Governed Workspace Behavior
|
|
17
17
|
|
|
18
|
-
SuperLocalMemory
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
SuperLocalMemory can run with named users and roles per workspace (company
|
|
19
|
+
mode), keeps a compliance audit trail, applies a retention lifecycle, and ships
|
|
20
|
+
GDPR export and erasure commands. This skill documents how an agent must behave
|
|
21
|
+
in a governed workspace and what the governance tools really do. The MCP audit
|
|
22
|
+
and retention tools are in the `power` tool set (see `slm-profile`).
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
25
26
|
## Role model
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
By default SLM is single-user: whoever runs it is the owner and nothing asks for
|
|
29
|
+
a login. Company mode adds named users, each with one role per workspace
|
|
30
|
+
(profile). A role in one workspace grants nothing in another.
|
|
28
31
|
|
|
29
|
-
| Role | Read | Write
|
|
30
|
-
|
|
31
|
-
| `viewer` | Yes | No | No | No |
|
|
32
|
-
| `member` | Yes | Yes | Yes
|
|
33
|
-
| `admin` | Yes | Yes | Yes
|
|
32
|
+
| Role | Read | Write | Share (`shared`/`global` writes) | Delete | Manage users and settings |
|
|
33
|
+
|------|------|-------|-------|--------|-----------------|
|
|
34
|
+
| `viewer` | Yes | No | No | No | No |
|
|
35
|
+
| `member` | Yes | Yes | Yes | No | No |
|
|
36
|
+
| `admin` | Yes | Yes | Yes | Yes | Yes |
|
|
34
37
|
|
|
35
38
|
**Agent behavior by role:**
|
|
36
39
|
|
|
37
|
-
- **Viewer**: Only call `recall`, `search`, `fetch`, `list_recent
|
|
38
|
-
`remember`, `update_memory`, `
|
|
39
|
-
|
|
40
|
-
- **Member**: May write
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **Admin**:
|
|
40
|
+
- **Viewer**: Only call `recall`, `search`, `fetch`, `list_recent` and other
|
|
41
|
+
reads. Never call `remember`, `update_memory`, `delete_memory` or any write
|
|
42
|
+
tool. If a write is refused, say so: "This workspace is read-only for my role."
|
|
43
|
+
- **Member**: May write memories, including `scope="shared"` and `scope="global"`
|
|
44
|
+
when the user explicitly asks for them. May not delete memories or change
|
|
45
|
+
users, roles or settings.
|
|
46
|
+
- **Admin**: Everything above plus deletion and user administration.
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
No MCP tool or `slm` command reports your role (only a signed-in dashboard session can ask the daemon, at `GET /api/rbac/whoami`). Do not guess it: attempt
|
|
49
|
+
what the user asked and treat a permission refusal as final. Setting up users,
|
|
50
|
+
roles and "Require login" is done in the dashboard under **Settings → Access**;
|
|
51
|
+
there is no `slm user` or `slm role` command. The machine operator keeps user
|
|
52
|
+
administration in every mode so a mistake cannot lock everyone out.
|
|
48
53
|
|
|
49
54
|
---
|
|
50
55
|
|
|
51
|
-
##
|
|
56
|
+
## require-login
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
When login is required, every operation on memories needs a signed-in user,
|
|
59
|
+
including the connection your assistant uses. SLM handles this at the daemon
|
|
60
|
+
level; agents do not pass credentials in tool calls. If a tool call returns an
|
|
61
|
+
authentication or permission error, you must:
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
1. Stop the current operation immediately.
|
|
64
|
+
2. Report the requirement to the user.
|
|
65
|
+
3. Never cache, retry, or work around the block.
|
|
57
66
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
zone: str = "default", # retention zone name
|
|
63
|
-
)
|
|
64
|
-
```
|
|
67
|
+
In this mode, `include_global=True` and `include_shared=True` on `recall` are
|
|
68
|
+
quietly turned off while the recall policy forbids cross-profile reads (the
|
|
69
|
+
default), so an opt-in recall can come back with only personal facts. Do not try
|
|
70
|
+
to work around it. See `slm-scope`.
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
---
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
# Standard facts: 90-day retention
|
|
70
|
-
set_retention_policy(profile_id="", days=90, zone="default")
|
|
74
|
+
## Retention and lifecycle
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
Every memory moves through lifecycle states as it goes unused: active, warm, cold,
|
|
77
|
+
archived. Two tools set and inspect that, and a third runs the forgetting cycle.
|
|
78
|
+
They need the `power` tool set.
|
|
79
|
+
|
|
80
|
+
### Set the thresholds
|
|
75
81
|
|
|
76
|
-
Tag your facts with the zone name to route them to the right policy:
|
|
77
82
|
```
|
|
78
|
-
|
|
83
|
+
set_retention_policy(
|
|
84
|
+
cold_after_days: int = 30, # days of inactivity before a memory goes cold
|
|
85
|
+
archive_after_days: int = 90, # days before it is archived
|
|
86
|
+
)
|
|
79
87
|
```
|
|
80
88
|
|
|
81
|
-
|
|
89
|
+
It sets two thresholds and returns them. There is no `profile_id` argument and
|
|
90
|
+
there are no named retention zones or per-tag policies; tagging a memory does not
|
|
91
|
+
route it to a different policy.
|
|
92
|
+
|
|
93
|
+
### Look at the state
|
|
82
94
|
|
|
83
95
|
```
|
|
84
|
-
get_retention_stats()
|
|
96
|
+
get_retention_stats(profile_id="")
|
|
97
|
+
get_lifecycle_status(limit=50, profile_id="")
|
|
85
98
|
```
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
`get_retention_stats` reports, from the retention table, the count and average
|
|
101
|
+
retention score per Ebbinghaus zone (`active`, `warm`, `cold`, `archive`,
|
|
102
|
+
`forgotten`) and the totals. `get_lifecycle_status` counts the active, warm, cold
|
|
103
|
+
and archived state of up to `limit` memories and returns up to ten short
|
|
104
|
+
samples of each. Neither says when the next cycle runs.
|
|
89
105
|
|
|
90
|
-
###
|
|
106
|
+
### Apply it
|
|
91
107
|
|
|
92
108
|
```
|
|
93
|
-
|
|
109
|
+
forget(dry_run=True) # preview the decay cycle for the active profile
|
|
110
|
+
compact_memories(dry_run=True) # preview lifecycle-state transitions
|
|
94
111
|
```
|
|
95
112
|
|
|
96
|
-
|
|
97
|
-
|
|
113
|
+
The MCP `forget` tool is not a delete: it recomputes retention scores and moves
|
|
114
|
+
memories between zones. `compact_memories` moves memories whose lifecycle state
|
|
115
|
+
has become due (for example cold to archived); it does not merge duplicates. Both
|
|
116
|
+
default to a dry run. Run the preview first, show it to the user, and only then
|
|
117
|
+
pass `dry_run=False`. Do not run either without the user's say-so.
|
|
98
118
|
|
|
99
119
|
---
|
|
100
120
|
|
|
101
121
|
## Audit trail
|
|
102
122
|
|
|
103
|
-
`audit_trail` is available in the `power` profile. It returns a structured log of
|
|
104
|
-
recent memory operations (writes, reads, profile switches, policy changes).
|
|
105
|
-
|
|
106
123
|
```
|
|
107
|
-
audit_trail(
|
|
108
|
-
limit: int = 50, # number of entries to return
|
|
109
|
-
operation: str = "", # filter by operation type (e.g. "remember", "forget")
|
|
110
|
-
profile_id: str = "", # filter by profile; "" = active profile
|
|
111
|
-
)
|
|
124
|
+
audit_trail(limit: int = 50)
|
|
112
125
|
```
|
|
113
126
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
127
|
+
Returns the newest `limit` rows of the compliance audit for the active profile,
|
|
128
|
+
as `{"success", "entries", "count"}`. Each entry has `audit_id`, `profile_id`,
|
|
129
|
+
`action`, `target_type`, `target_id`, `details` and `timestamp`. There are no
|
|
130
|
+
filter arguments. Entries are compliance actions (store, retrieve, delete, export
|
|
131
|
+
and the like).
|
|
118
132
|
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
Use it for compliance reviews, for investigating an unexpected change, and for
|
|
134
|
+
audit reports to a data controller.
|
|
121
135
|
|
|
122
136
|
---
|
|
123
137
|
|
|
124
|
-
## GDPR
|
|
125
|
-
|
|
126
|
-
### Data export
|
|
127
|
-
|
|
128
|
-
SLM does not have a dedicated MCP export tool. For GDPR data subject access
|
|
129
|
-
requests, use the CLI:
|
|
138
|
+
## GDPR
|
|
130
139
|
|
|
131
140
|
```bash
|
|
132
|
-
#
|
|
133
|
-
slm
|
|
134
|
-
slm
|
|
141
|
+
slm gdpr status [--profile P] [--json] # posture: receipts, audit counts, known gaps; read-only
|
|
142
|
+
slm gdpr export --profile P [--output FILE] [--json] # Art. 15/20 access and portability
|
|
143
|
+
slm gdpr erase --profile P --dry-run [--json] # preview an erasure
|
|
144
|
+
slm gdpr erase --profile P --yes [--json] # Art. 17 erasure, IRREVERSIBLE
|
|
145
|
+
slm gdpr verify --receipt-id ID [--profile P] # check an erasure receipt (exit 0 ok, 1 tampered, 2 not found)
|
|
135
146
|
```
|
|
136
147
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Contact your workspace admin to arrange a full database-level export if the CLI
|
|
143
|
-
output is insufficient for compliance purposes.
|
|
144
|
-
|
|
145
|
-
### Right to erasure
|
|
148
|
+
`slm gdpr erase` erases a **profile**. It refuses to run without both `--profile`
|
|
149
|
+
and `--yes`, and without them it only previews. It is the only irreversible
|
|
150
|
+
operation here, so confirm the subject, the profile and the authority to erase
|
|
151
|
+
with the user before running it. `slm gdpr status` lists the known gaps (for
|
|
152
|
+
example backups and the code graph) rather than claiming completeness.
|
|
146
153
|
|
|
147
|
-
To
|
|
154
|
+
To remove individual memories rather than a whole profile, use the deletion
|
|
155
|
+
commands from `slm-remember`:
|
|
148
156
|
|
|
149
157
|
```bash
|
|
150
|
-
|
|
151
|
-
slm forget "<subject or project name>" --dry-run --json
|
|
152
|
-
|
|
153
|
-
# Step 2: review the preview, then execute
|
|
158
|
+
slm forget "<subject or project name>" --dry-run --json # ALWAYS first
|
|
154
159
|
slm forget "<subject or project name>" --yes --json
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
For targeted deletion by fact ID:
|
|
158
|
-
```bash
|
|
159
160
|
slm delete <fact_id> --yes --json
|
|
160
161
|
```
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## require-login
|
|
169
|
-
|
|
170
|
-
When `require_login` is enabled in workspace configuration, agents must
|
|
171
|
-
authenticate before any memory operation. SLM handles authentication at the
|
|
172
|
-
daemon level — agents do not need to pass credentials in tool calls. If an
|
|
173
|
-
agent receives an authentication error from any MCP tool, it must:
|
|
174
|
-
|
|
175
|
-
1. Stop the current operation immediately.
|
|
176
|
-
2. Report the authentication requirement to the user.
|
|
177
|
-
3. Never cache, retry, or work around the authentication block.
|
|
163
|
+
Memories that belong to a reviewed correction cannot be deleted this way; the
|
|
164
|
+
refusal names the case. After an erasure, confirm with `slm recall "<content>"`
|
|
165
|
+
that nothing comes back, and never try to re-derive erased content from other
|
|
166
|
+
stored facts.
|
|
178
167
|
|
|
179
168
|
---
|
|
180
169
|
|
|
181
170
|
## Scope enforcement in governed workspaces
|
|
182
171
|
|
|
183
|
-
|
|
184
|
-
- **
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Agents must not attempt to work around scope restrictions by splitting a global
|
|
190
|
-
fact into multiple shared facts to accumulate equivalent visibility.
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## Compact memories (admin-only)
|
|
195
|
-
|
|
196
|
-
`compact_memories` deduplicates and consolidates stored memories. This is an
|
|
197
|
-
admin operation — it can change fact IDs and remove content.
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
compact_memories(
|
|
201
|
-
profile_id: str = "", # "" = active profile
|
|
202
|
-
dry_run: bool = True, # ALWAYS true first — inspect before running
|
|
203
|
-
)
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Always run with `dry_run=True` first and review the impact report. Never run
|
|
207
|
-
compaction without admin authorization.
|
|
172
|
+
- **Viewers** cannot write anything, whatever the `scope` argument.
|
|
173
|
+
- **Members and admins** can write `shared` and `global` facts; writing either
|
|
174
|
+
scope needs the share permission, which both roles hold.
|
|
175
|
+
- Agents must not split a `global` fact into several `shared` facts, or otherwise
|
|
176
|
+
accumulate visibility the user did not ask for.
|
|
208
177
|
|
|
209
178
|
---
|
|
210
179
|
|
|
211
|
-
##
|
|
180
|
+
## Integrity checks
|
|
212
181
|
|
|
213
182
|
```
|
|
214
|
-
consistency_check(
|
|
183
|
+
consistency_check(limit: int = 100)
|
|
215
184
|
```
|
|
216
185
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
186
|
+
Runs a sheaf-consistency check over up to `limit` memories and returns pairs of
|
|
187
|
+
facts that contradict each other, with a severity (`fact_a`, `fact_b`,
|
|
188
|
+
`severity`, `content_a`), plus `facts_checked`, `facts_errored` and
|
|
189
|
+
`total_contradictions`. If the checker is disabled it says so in `note`. For the
|
|
190
|
+
health of the store itself (orphan rows, erased words left behind, unfinished
|
|
191
|
+
deletes) use `slm db integrity` and `slm db repair`; see `slm-status`.
|
|
220
192
|
|
|
221
193
|
---
|
|
222
194
|
|
|
223
195
|
## Agent checklist for governed workspaces
|
|
224
196
|
|
|
225
197
|
Before each write operation:
|
|
226
|
-
- [ ]
|
|
227
|
-
- [ ]
|
|
228
|
-
- [ ]
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
- [ ]
|
|
233
|
-
- [ ] Ran
|
|
198
|
+
- [ ] The user asked for it, and a refusal from the workspace is respected
|
|
199
|
+
- [ ] Scope is `personal` unless the user explicitly asked to share
|
|
200
|
+
- [ ] Pass `session_id` so the write is attributed
|
|
201
|
+
|
|
202
|
+
Before running any destructive or state-changing operation (`forget`,
|
|
203
|
+
`compact_memories`, `slm forget --yes`, `slm gdpr erase --yes`):
|
|
204
|
+
- [ ] The user authorized it in this conversation
|
|
205
|
+
- [ ] Ran the dry run or preview and showed it to the user
|
|
234
206
|
- [ ] GDPR: confirmed the subject or controller authorized the erasure
|
|
235
207
|
|
|
236
208
|
---
|
|
@@ -238,11 +210,12 @@ Before running any destructive operation (`forget`, `compact_memories`):
|
|
|
238
210
|
## Related skills
|
|
239
211
|
|
|
240
212
|
- `slm-scope` — scope model details (personal/shared/global)
|
|
241
|
-
- `slm-profile` —
|
|
242
|
-
- `slm-remember` — fact storage
|
|
213
|
+
- `slm-profile` — memory profiles and tool sets
|
|
214
|
+
- `slm-remember` — fact storage, corrections and deletion
|
|
243
215
|
- `slm-recall` — retrieval reference (includes scope read flags)
|
|
244
|
-
- `slm-mesh` — mesh tools
|
|
216
|
+
- `slm-mesh` — mesh tools
|
|
217
|
+
- To use this memory from a web assistant or another computer, see the slm-web-access skill.
|
|
245
218
|
|
|
246
219
|
---
|
|
247
220
|
|
|
248
|
-
*SuperLocalMemory v4.1.
|
|
221
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -20,7 +20,7 @@ allowed-tools: build_code_graph, query_graph, get_blast_radius, semantic_search_
|
|
|
20
20
|
|
|
21
21
|
# slm-graph — Code Intelligence Skill
|
|
22
22
|
|
|
23
|
-
Index any repo as a code knowledge graph and answer structural questions about it: callers, callees, impact radius, semantic search, and review context.
|
|
23
|
+
Index any repo as a code knowledge graph and answer structural questions about it: callers, callees, impact radius, semantic search, and review context. These tools are only registered in the `code` MCP tool set (or with `SLM_MCP_ALL_TOOLS=1`); see "Tool set requirement" below.
|
|
24
24
|
|
|
25
25
|
**Prerequisite rule:** every tool except `build_code_graph` self-guards — if the graph is not built it returns `{"success": false, "error": "Code graph not built. Run build_code_graph first."}`. Always index first.
|
|
26
26
|
|
|
@@ -40,7 +40,7 @@ build_code_graph(
|
|
|
40
40
|
|
|
41
41
|
Parses all supported source files, extracts functions/classes/imports, builds the call graph, detects execution flows, and identifies code communities. Replaces any previous index for the same repo.
|
|
42
42
|
|
|
43
|
-
- `repo_path` — absolute path to the repository root. Must exist
|
|
43
|
+
- `repo_path` — absolute path to the repository root. Must exist and sit under your home directory; a path outside it is refused with `Invalid repo_path`.
|
|
44
44
|
- `languages` — comma-separated language filter, e.g. `"python,typescript"`. Empty string = index all supported languages.
|
|
45
45
|
- `exclude_patterns` — comma-separated glob patterns to exclude, e.g. `"**/node_modules/**,**/.venv/**"`. Empty = no exclusions.
|
|
46
46
|
|
|
@@ -204,14 +204,14 @@ detect_changes(
|
|
|
204
204
|
|
|
205
205
|
Runs `git diff` against `base`, maps the changed hunks to graph nodes, and returns a risk-scored list of changed functions, test gaps, and review priorities. Requires the repo to be a git repository.
|
|
206
206
|
|
|
207
|
-
- `base` — git ref to diff against. Default `"HEAD~1"` (one commit back). Any valid git ref works: `"main"`, `"
|
|
207
|
+
- `base` — git ref to diff against. Default `"HEAD~1"` (one commit back). Any valid git ref works: `"main"`, `"v1.4.0"`, a commit SHA, etc.
|
|
208
208
|
|
|
209
209
|
```
|
|
210
210
|
# What changed in the last commit?
|
|
211
211
|
detect_changes()
|
|
212
212
|
|
|
213
213
|
# What changed since the release branch?
|
|
214
|
-
detect_changes(base="release/
|
|
214
|
+
detect_changes(base="release/1.4")
|
|
215
215
|
|
|
216
216
|
# What changed relative to main?
|
|
217
217
|
detect_changes(base="main")
|
|
@@ -277,16 +277,22 @@ All tools return `{"success": false, "error": "<message>"}` on failure — they
|
|
|
277
277
|
| `Repository path does not exist: <path>` | Bad `repo_path` in build | Pass an absolute path that exists |
|
|
278
278
|
| `Git not available or not a git repository: ...` | `detect_changes` needs git | Only works in git repos with git installed |
|
|
279
279
|
| `Invalid pattern '...'` | Wrong `pattern` in `query_graph` | Use one of the 8 valid pattern strings |
|
|
280
|
-
| `No node found matching '<target>'` | Target not in index | Rebuild or check the qualified name via `semantic_search_code` |
|
|
280
|
+
| `No node found matching '<target>'` | Target not in index. Returned as `success: true` with an empty `results` and this `message`, not as an error | Rebuild or check the qualified name via `semantic_search_code` |
|
|
281
|
+
| `Invalid repo_path: ...` | `repo_path` is outside your home directory | Index a repository under your home directory |
|
|
281
282
|
|
|
282
283
|
If `build_code_graph` returns `files_parsed: 0`, no supported source files were found — check `repo_path` and `exclude_patterns`.
|
|
283
284
|
|
|
284
285
|
---
|
|
285
286
|
|
|
286
|
-
##
|
|
287
|
+
## Tool set requirement
|
|
287
288
|
|
|
288
|
-
|
|
289
|
-
|
|
289
|
+
The six tools above are registered only when the MCP server runs the `code` tool
|
|
290
|
+
set, or with `SLM_MCP_ALL_TOOLS=1` / `SLM_MCP_PROFILE=whole`, or when
|
|
291
|
+
`SLM_MCP_TOOLS` names them. They are **not** in `core`, `full`, `power` or the
|
|
292
|
+
no-profile default that the Claude Code and Codex plugins use, so with those
|
|
293
|
+
settings the tools simply do not exist and a call fails as an unknown tool. The
|
|
294
|
+
tool set is read when the server starts: set it in the host's MCP config and
|
|
295
|
+
restart the host.
|
|
290
296
|
|
|
291
297
|
```json
|
|
292
298
|
"env": {
|
|
@@ -295,21 +301,27 @@ This skill uses graph tools that are only active under the `code` MCP profile
|
|
|
295
301
|
}
|
|
296
302
|
```
|
|
297
303
|
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
`switch_profile` does not change the tool set; it changes the active memory
|
|
305
|
+
profile. See `slm-profile`. The `code` set leaves out the mesh and several
|
|
306
|
+
administration tools, so ask the user before changing their tool set.
|
|
300
307
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
With `SLM_MCP_ALL_TOOLS=1` more graph tools appear: `update_code_graph` (refresh
|
|
309
|
+
for `changed_files` without a full rebuild), `list_graph_stats`,
|
|
310
|
+
`get_architecture_overview`, `list_communities`, `get_community`, `list_flows`,
|
|
311
|
+
`get_flow`, `get_affected_flows`, `find_large_functions`, `enrich_blast_radius`,
|
|
312
|
+
`refactor_preview`, and the code-to-memory tools `link_memory_to_code`,
|
|
313
|
+
`code_memory_search`, `code_entity_history` and `code_stale_check`. The memory
|
|
314
|
+
links need `"bridge_enabled": true` in `code_graph_config.json` and a rebuild.
|
|
315
|
+
All are host-only: a remote caller cannot use them.
|
|
304
316
|
|
|
305
317
|
---
|
|
306
318
|
|
|
307
319
|
## Related skills
|
|
308
320
|
|
|
309
|
-
- `slm-profile` —
|
|
321
|
+
- `slm-profile` — memory profiles and the tool sets that decide which tools exist
|
|
310
322
|
- `slm-recall` — retrieve architectural decisions before graph queries
|
|
311
323
|
- `slm-status` — confirm the active profile and graph index health
|
|
312
324
|
|
|
313
325
|
---
|
|
314
326
|
|
|
315
|
-
SuperLocalMemory v4.1.
|
|
327
|
+
SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later
|