superlocalmemory 4.2.5 → 4.2.6
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 +3 -3
- package/.cursor-plugin/marketplace.json +29 -0
- package/CHANGELOG.md +112 -0
- package/README.md +48 -7
- package/antigravity-plugin/_GENERATED.md +1 -1
- package/antigravity-plugin/agents/slm-governance-advisor.md +1 -1
- package/antigravity-plugin/agents/slm-loop-runner.md +1 -1
- package/antigravity-plugin/agents/slm-memory-advisor.md +1 -1
- package/antigravity-plugin/agents/slm-optimize-advisor.md +1 -1
- package/antigravity-plugin/mcp_config.json +1 -2
- package/antigravity-plugin/plugin.json +1 -1
- package/antigravity-plugin/skills/slm-bot-memory/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-cache/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-compress/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-getting-started-bot/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-governance/SKILL.md +4 -2
- package/antigravity-plugin/skills/slm-graph/SKILL.md +7 -13
- package/antigravity-plugin/skills/slm-loop/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-media/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-mesh/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-profile/SKILL.md +21 -18
- package/antigravity-plugin/skills/slm-recall/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-remember/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-scope/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-session/SKILL.md +1 -1
- package/antigravity-plugin/skills/slm-status/SKILL.md +1 -1
- package/codex-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +7 -3
- package/codex-plugin/AGENTS.md +1 -1
- package/codex-plugin/README.md +2 -2
- package/codex-plugin/_GENERATED.md +2 -1
- package/codex-plugin/agents/slm-governance-advisor.md +1 -1
- package/codex-plugin/agents/slm-loop-runner.md +1 -1
- package/codex-plugin/agents/slm-memory-advisor.md +1 -1
- package/codex-plugin/agents/slm-optimize-advisor.md +1 -1
- package/codex-plugin/skills/slm-bot-memory/SKILL.md +1 -1
- package/codex-plugin/skills/slm-cache/SKILL.md +1 -1
- package/codex-plugin/skills/slm-compress/SKILL.md +1 -1
- package/codex-plugin/skills/slm-getting-started-bot/SKILL.md +1 -1
- package/codex-plugin/skills/slm-governance/SKILL.md +4 -2
- package/codex-plugin/skills/slm-graph/SKILL.md +7 -13
- package/codex-plugin/skills/slm-loop/SKILL.md +1 -1
- package/codex-plugin/skills/slm-media/SKILL.md +1 -1
- package/codex-plugin/skills/slm-mesh/SKILL.md +1 -1
- package/codex-plugin/skills/slm-profile/SKILL.md +21 -18
- package/codex-plugin/skills/slm-recall/SKILL.md +1 -1
- package/codex-plugin/skills/slm-remember/SKILL.md +1 -1
- package/codex-plugin/skills/slm-scope/SKILL.md +1 -1
- package/codex-plugin/skills/slm-session/SKILL.md +1 -1
- package/codex-plugin/skills/slm-status/SKILL.md +1 -1
- package/copilot-plugin/.github/agents/slm-governance-advisor.agent.md +2 -2
- package/copilot-plugin/.github/agents/slm-loop-runner.agent.md +2 -2
- package/copilot-plugin/.github/agents/slm-memory-advisor.agent.md +2 -2
- package/copilot-plugin/.github/agents/slm-optimize-advisor.agent.md +2 -2
- package/copilot-plugin/.github/copilot-instructions.md +4 -4
- package/copilot-plugin/.github/prompts/slm-bot-memory.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-cache.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-compress.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-getting-started-bot.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-governance.prompt.md +5 -3
- package/copilot-plugin/.github/prompts/slm-graph.prompt.md +8 -14
- package/copilot-plugin/.github/prompts/slm-loop.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-media.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-mesh.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-profile.prompt.md +22 -19
- package/copilot-plugin/.github/prompts/slm-recall.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-remember.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-scope.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-session.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-status.prompt.md +2 -2
- package/copilot-plugin/.github/prompts/slm-web-access.prompt.md +1 -1
- package/copilot-plugin/README.md +2 -2
- package/copilot-plugin/_GENERATED.md +3 -3
- package/{plugin → cursor-plugin}/.cursor-plugin/plugin.json +3 -3
- package/cursor-plugin/LICENSE +24 -0
- package/cursor-plugin/assets/logo.svg +36 -0
- package/{plugin → cursor-plugin}/cursor-skills/slm-bot-memory/SKILL.md +1 -1
- package/cursor-plugin/cursor-skills/slm-cache/SKILL.md +147 -0
- package/cursor-plugin/cursor-skills/slm-compress/SKILL.md +150 -0
- package/{plugin → cursor-plugin}/cursor-skills/slm-getting-started-bot/SKILL.md +1 -1
- package/cursor-plugin/cursor-skills/slm-governance/SKILL.md +279 -0
- package/cursor-plugin/cursor-skills/slm-graph/SKILL.md +321 -0
- package/cursor-plugin/cursor-skills/slm-loop/SKILL.md +174 -0
- package/cursor-plugin/cursor-skills/slm-media/SKILL.md +340 -0
- package/cursor-plugin/cursor-skills/slm-mesh/SKILL.md +389 -0
- package/cursor-plugin/cursor-skills/slm-profile/SKILL.md +167 -0
- package/{plugin → cursor-plugin}/cursor-skills/slm-recall/SKILL.md +1 -1
- package/{plugin → cursor-plugin}/cursor-skills/slm-remember/SKILL.md +1 -1
- package/{plugin → cursor-plugin}/cursor-skills/slm-scope/SKILL.md +1 -1
- package/{plugin → cursor-plugin}/cursor-skills/slm-session/SKILL.md +1 -1
- package/cursor-plugin/cursor-skills/slm-status/SKILL.md +231 -0
- package/cursor-plugin/cursor-skills/slm-web-access/SKILL.md +179 -0
- package/{plugin → cursor-plugin}/mcp.cursor.json +1 -2
- package/hermes-plugin/__init__.py +39 -7
- package/hermes-plugin/agents/slm-governance-advisor.md +1 -1
- package/hermes-plugin/agents/slm-loop-runner.md +1 -1
- package/hermes-plugin/agents/slm-memory-advisor.md +1 -1
- package/hermes-plugin/agents/slm-optimize-advisor.md +1 -1
- package/hermes-plugin/command-inventory.json +2 -2
- package/hermes-plugin/plugin.yaml +2 -2
- package/hermes-plugin/skills/slm-bot-memory/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-cache/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-compress/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-getting-started-bot/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-governance/SKILL.md +4 -2
- package/hermes-plugin/skills/slm-graph/SKILL.md +7 -13
- package/hermes-plugin/skills/slm-loop/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-media/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-mesh/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-profile/SKILL.md +21 -18
- package/hermes-plugin/skills/slm-recall/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-remember/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-scope/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-session/SKILL.md +1 -1
- package/hermes-plugin/skills/slm-status/SKILL.md +1 -1
- package/ide/configs/copilot-cli-mcp.json +17 -0
- package/ide/configs/grok-cli-mcp.toml +11 -0
- package/ide/configs/muse-mcp.json +16 -0
- package/ide/configs/openclaw-mcp.json +15 -0
- package/muse-plugin/.claude-plugin/plugin.json +20 -0
- package/muse-plugin/LICENSE +663 -0
- package/muse-plugin/README.md +44 -0
- package/muse-plugin/_GENERATED.md +3 -0
- package/muse-plugin/agents/slm-governance-advisor.md +84 -0
- package/muse-plugin/agents/slm-loop-runner.md +82 -0
- package/muse-plugin/agents/slm-memory-advisor.md +54 -0
- package/muse-plugin/agents/slm-optimize-advisor.md +44 -0
- package/muse-plugin/commands/slm-loop.md +33 -0
- package/muse-plugin/hooks/hooks.json +102 -0
- package/muse-plugin/requirements-cpu-torch.txt +13 -0
- package/muse-plugin/requirements.txt +1 -0
- package/muse-plugin/scripts/ensure-venv.bat +122 -0
- package/muse-plugin/scripts/ensure-venv.sh +169 -0
- package/muse-plugin/scripts/slm-launch +207 -0
- package/muse-plugin/scripts/slm-launch.bat +32 -0
- package/muse-plugin/scripts/slm-resolve.sh +128 -0
- package/muse-plugin/scripts/slm-run +76 -0
- package/muse-plugin/scripts/torch-cpu-resolve.sh +86 -0
- package/muse-plugin/skills/slm-bot-memory/SKILL.md +180 -0
- package/muse-plugin/skills/slm-cache/SKILL.md +146 -0
- package/muse-plugin/skills/slm-compress/SKILL.md +149 -0
- package/muse-plugin/skills/slm-getting-started-bot/SKILL.md +196 -0
- package/muse-plugin/skills/slm-governance/SKILL.md +278 -0
- package/muse-plugin/skills/slm-graph/SKILL.md +320 -0
- package/muse-plugin/skills/slm-loop/SKILL.md +173 -0
- package/muse-plugin/skills/slm-media/SKILL.md +339 -0
- package/muse-plugin/skills/slm-mesh/SKILL.md +388 -0
- package/muse-plugin/skills/slm-profile/SKILL.md +166 -0
- package/muse-plugin/skills/slm-recall/SKILL.md +517 -0
- package/muse-plugin/skills/slm-remember/SKILL.md +374 -0
- package/muse-plugin/skills/slm-scope/SKILL.md +182 -0
- package/muse-plugin/skills/slm-session/SKILL.md +290 -0
- package/muse-plugin/skills/slm-status/SKILL.md +230 -0
- package/muse-plugin/skills/slm-web-access/SKILL.md +178 -0
- package/package.json +6 -2
- package/plugin/.claude-plugin/plugin.json +4 -2
- package/plugin/LICENSE +663 -0
- package/plugin/README.md +44 -0
- package/plugin/agents/slm-governance-advisor.md +1 -1
- package/plugin/agents/slm-loop-runner.md +1 -1
- package/plugin/agents/slm-memory-advisor.md +1 -1
- package/plugin/agents/slm-optimize-advisor.md +1 -1
- package/plugin/hooks/hooks.json +1 -1
- package/plugin/requirements.txt +1 -1
- package/plugin/skills/slm-bot-memory/SKILL.md +1 -1
- package/plugin/skills/slm-cache/SKILL.md +1 -1
- package/plugin/skills/slm-compress/SKILL.md +1 -1
- package/plugin/skills/slm-getting-started-bot/SKILL.md +1 -1
- package/plugin/skills/slm-governance/SKILL.md +4 -2
- package/plugin/skills/slm-graph/SKILL.md +7 -13
- package/plugin/skills/slm-loop/SKILL.md +1 -1
- package/plugin/skills/slm-media/SKILL.md +1 -1
- package/plugin/skills/slm-mesh/SKILL.md +1 -1
- package/plugin/skills/slm-profile/SKILL.md +21 -18
- package/plugin/skills/slm-recall/SKILL.md +1 -1
- package/plugin/skills/slm-remember/SKILL.md +1 -1
- package/plugin/skills/slm-scope/SKILL.md +1 -1
- package/plugin/skills/slm-session/SKILL.md +1 -1
- package/plugin/skills/slm-status/SKILL.md +1 -1
- package/plugin-src/agents/slm-governance-advisor.md +1 -1
- package/plugin-src/agents/slm-loop-runner.md +1 -1
- package/plugin-src/agents/slm-memory-advisor.md +1 -1
- package/plugin-src/agents/slm-optimize-advisor.md +1 -1
- package/plugin-src/rules/AGENTS.md +1 -1
- package/plugin-src/rules/CLAUDE.md.fragment +3 -3
- package/plugin-src/skills/slm-bot-memory/SKILL.md +1 -1
- package/plugin-src/skills/slm-cache/SKILL.md +1 -1
- package/plugin-src/skills/slm-compress/SKILL.md +1 -1
- package/plugin-src/skills/slm-getting-started-bot/SKILL.md +1 -1
- package/plugin-src/skills/slm-governance/SKILL.md +4 -2
- package/plugin-src/skills/slm-graph/SKILL.md +7 -13
- package/plugin-src/skills/slm-loop/SKILL.md +1 -1
- package/plugin-src/skills/slm-media/SKILL.md +1 -1
- package/plugin-src/skills/slm-mesh/SKILL.md +1 -1
- package/plugin-src/skills/slm-profile/SKILL.md +21 -18
- package/plugin-src/skills/slm-recall/SKILL.md +1 -1
- package/plugin-src/skills/slm-remember/SKILL.md +1 -1
- package/plugin-src/skills/slm-scope/SKILL.md +1 -1
- package/plugin-src/skills/slm-session/SKILL.md +1 -1
- package/plugin-src/skills/slm-status/SKILL.md +1 -1
- package/plugin/CLAUDE.md +0 -56
- /package/{plugin/assets/logo.svg → codex-plugin/assets/icon.svg} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-status
|
|
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, 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
|
+
allowed-tools: slm_optimize_stats, get_status, get_brain_evidence_status, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# slm-status — Health and Optimize Stats
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Use this skill to answer: "Is SLM healthy?", "Is compression/caching actually saving tokens?", and "What does the system look like right now?" It covers the MCP stats and status tools, the `slm status` CLI, the `slm doctor` preflight, and the store-health commands.
|
|
13
|
+
|
|
14
|
+
## Primary MCP Tool: slm_optimize_stats
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
slm_optimize_stats() -> dict
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
No arguments. Returns the counters the daemon has persisted.
|
|
21
|
+
|
|
22
|
+
### Return dict (all keys always present)
|
|
23
|
+
|
|
24
|
+
| Key | Type | Meaning |
|
|
25
|
+
|-----|------|---------|
|
|
26
|
+
| `ok` | bool | `True` on success; `False` on internal error |
|
|
27
|
+
| `compress_runs` | int | Total compress calls recorded by the daemon (persisted across restarts) |
|
|
28
|
+
| `tokens_saved_compress` | int | Cumulative tokens saved by compression (daemon-persisted) |
|
|
29
|
+
| `cache_proxy_hits` | int | Proxy-layer cache hits (daemon-persisted) |
|
|
30
|
+
| `cache_proxy_misses` | int | Proxy-layer cache misses (daemon-persisted) |
|
|
31
|
+
| `cache_kv_hits` | int | Hits on the `slm_cache_get` key-value cache (daemon-persisted) |
|
|
32
|
+
| `cache_kv_misses` | int | Misses on the `slm_cache_get` key-value cache (daemon-persisted) |
|
|
33
|
+
| `ccr_note` | str \| None | Note about CCR entry count (not tracked per-session; see daemon `/api/v1/metrics`) |
|
|
34
|
+
| `note` | str \| None | Scope clarification or error detail |
|
|
35
|
+
|
|
36
|
+
### Important scope distinction
|
|
37
|
+
|
|
38
|
+
All six counters are **daemon-persisted**: they survive MCP restarts and accumulate over the install's lifetime, so they are totals, not per-session figures. Only if the persisted KV counters cannot be read does the tool fall back to this process's own tally (the `note` field says so). To judge one stretch of work, call `slm_optimize_stats` before and after and subtract.
|
|
39
|
+
|
|
40
|
+
### Reading whether optimization is saving tokens
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
stats = await slm_optimize_stats()
|
|
44
|
+
if stats["ok"]:
|
|
45
|
+
savings = stats["tokens_saved_compress"]
|
|
46
|
+
kv_hit_rate = (
|
|
47
|
+
stats["cache_kv_hits"] / max(stats["cache_kv_hits"] + stats["cache_kv_misses"], 1)
|
|
48
|
+
)
|
|
49
|
+
# savings > 0 and kv_hit_rate > 0.5 means Surface B is actively reducing costs
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If `compress_runs` is 0 after several sessions, compression is not being triggered — check daemon config and whether `slm_compress` is being called.
|
|
53
|
+
|
|
54
|
+
If `cache_kv_hits` does not grow after repeated work, verify key naming consistency (the same key string must be used for set and get, by the same agent).
|
|
55
|
+
|
|
56
|
+
## Secondary CLI: slm status
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
slm status [--json] [--verbose]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Reports system-level state — not optimization counters. Canonical fields:
|
|
63
|
+
|
|
64
|
+
- **mode** — active operation mode (`a`, `b` or `c`)
|
|
65
|
+
- **provider** — the LLM provider for modes B and C, or `none`
|
|
66
|
+
- **profile** — current memory profile name
|
|
67
|
+
- **db_size_mb**, **db_path**, **base_dir** — where the store is and how big
|
|
68
|
+
- **fact_count**, **entity_count**, **edge_count** — counts for the active profile
|
|
69
|
+
- **version**, **profile_generation**, **projection_queue_depth**, and (daemon running) **saves_waiting** and **unreadable_saves**
|
|
70
|
+
|
|
71
|
+
`--verbose` / `-v` adds: the disabled marker, last booted version, and daemon port.
|
|
72
|
+
|
|
73
|
+
`--json` prints the standard envelope `{"success", "command", "version", "data": {...}}`; read the fields above from `data`. Prefer it for agent consumption:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
slm status --json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{"success":true,"command":"status","version":"...","data":{"mode":"a","provider":"none","profile":"default","db_size_mb":12.4,"fact_count":384,"entity_count":201,"edge_count":519,"profile_generation":0,"projection_queue_depth":0,"saves_waiting":0,"unreadable_saves":0}}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The MCP equivalent is `get_status(profile_id="")`, which returns the same fields at the top level (it is not part of the smallest `core` tool set). `saves_waiting` above zero means saved memories are durable but still being indexed (searchable within seconds). `unreadable_saves` above zero means that many saves could not be read back with this computer's key and were kept unchanged in the admission journal (the daemon log has their ids); a negative value means the journal did not answer. Status does not report a user role.
|
|
84
|
+
|
|
85
|
+
Do not rely on the human-readable format for parsing — always use `--json` when the output feeds another tool.
|
|
86
|
+
|
|
87
|
+
## Secondary CLI: slm doctor
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
slm doctor [--json] [--quick] [--deep] [--fix]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Preflight check covering dependencies, embedding worker, daemon connectivity, and Surface B health. The **"Optimize (Surface B)"** line confirms whether the compression and cache subsystem initialised correctly.
|
|
94
|
+
|
|
95
|
+
`--quick` skips the daemon and embedding probes — runs only dependency and config checks; faster but incomplete.
|
|
96
|
+
|
|
97
|
+
`--deep` reads every database page (`PRAGMA integrity_check`) instead of the structural check; slow on a large store. `--fix` repairs what it can (re-downloads missing models, installs sqlite-vec) before checking, then reports.
|
|
98
|
+
|
|
99
|
+
`--json` outputs structured results per check — use this in automated health pipelines.
|
|
100
|
+
|
|
101
|
+
A passing doctor output confirms:
|
|
102
|
+
- Python deps present
|
|
103
|
+
- Embedding worker reachable
|
|
104
|
+
- Daemon responding
|
|
105
|
+
- Surface B (Optimize) initialised
|
|
106
|
+
|
|
107
|
+
A failing "Optimize (Surface B)" line means `slm_compress`, `slm_cache_set`, and `slm_cache_get` may not function correctly — investigate daemon config before relying on those tools.
|
|
108
|
+
|
|
109
|
+
## Secondary CLI: slm optimize status
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
slm optimize status [--json]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Shows whether the Optimize module (cache + compress) is currently enabled or disabled at the daemon level. Available subcommands also include `optimize on`, `optimize off`, and `optimize savings`.
|
|
116
|
+
|
|
117
|
+
The `optimize savings` subcommand accepts:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
slm optimize savings [--since <days>] [--provider anthropic|openai|gemini] [--json]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`--since` defaults to 7 days. `--provider` filters by the target AI provider.
|
|
124
|
+
|
|
125
|
+
`slm_optimize_stats()` via MCP is the same data as `slm optimize savings`; use whichever surface you have.
|
|
126
|
+
|
|
127
|
+
## Store health and recovery
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
slm db integrity [--pages] [--json] # read-only, safe while SLM runs
|
|
131
|
+
slm db repair [--json] # preview of what a repair would do (read-only)
|
|
132
|
+
slm db repair --apply --root <data folder> [--batch-size N] [--pause-ms MS] [--max-seconds S]
|
|
133
|
+
slm db repair --undo <run_id> --root <data folder>
|
|
134
|
+
slm ops list | status | resolve <operation_id> --action retry|force_reconcile|cancel
|
|
135
|
+
slm brain status [--json] # observation-only Living Brain evidence totals
|
|
136
|
+
slm embedder status # progress of an embedding-model switch
|
|
137
|
+
slm models # recommended and installed local models
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`slm db integrity` answers five separate questions so one cannot hide another:
|
|
141
|
+
page integrity (only with `--pages`), relational integrity (orphan rows, erased
|
|
142
|
+
words still stored), source fidelity (facts withheld from answers or no longer
|
|
143
|
+
saying what their memory said), projection readiness (keyword, vector and date
|
|
144
|
+
search work still owed), and any repair running or last run. It prints counts
|
|
145
|
+
only, never memory text.
|
|
146
|
+
|
|
147
|
+
`slm db repair` fixes leftover rows, erased-word leftovers, unfinished deletes
|
|
148
|
+
and memories that lost their searchable fact, with receipts and an undo. It
|
|
149
|
+
previews by default; `--apply` and `--undo` insist on `--root` naming the data
|
|
150
|
+
folder you mean, and refuse any other. A repair never brings back anything that
|
|
151
|
+
was erased, deleted or withheld. `slm ops` lists failed, stuck or degraded
|
|
152
|
+
operations and, for an owner or admin, resolves them. The MCP counterpart for
|
|
153
|
+
Living Brain totals is `get_brain_evidence_status(profile_id="")`; it only
|
|
154
|
+
observes and does not change recall, ranking or review.
|
|
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
|
+
|
|
199
|
+
## Recommended Health Workflow
|
|
200
|
+
|
|
201
|
+
1. Run `slm doctor --json` at session start to confirm all subsystems are up.
|
|
202
|
+
2. Call `slm_optimize_stats()` after a batch of work to check token savings.
|
|
203
|
+
3. Run `slm status --json` when you need DB size or memory counts.
|
|
204
|
+
4. If `ok: false` on any MCP tool — check `note` field, then run `slm doctor` to isolate the failure.
|
|
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`.
|
|
207
|
+
|
|
208
|
+
## Fail-Open
|
|
209
|
+
|
|
210
|
+
`slm_optimize_stats()` never raises. On internal error it returns `ok: false` with all counters at 0. Continue the session — stats unavailability does not affect compression or caching operations.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Profile-aware status
|
|
215
|
+
|
|
216
|
+
`slm status --json` reports the active profile in `data.profile`. Use it to confirm which workspace is active before starting work on a multi-profile setup. `get_status(profile_id="<name>")` counts another profile without moving the active one. To change the active profile, see `slm-profile`.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Related skills
|
|
221
|
+
|
|
222
|
+
- `slm-session` — session lifecycle (session_init/close_session)
|
|
223
|
+
- `slm-profile` — workspace isolation and profile switching
|
|
224
|
+
- `slm-cache` — KV cache performance metrics
|
|
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
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
SuperLocalMemory v4.2.6 · Qualixar · AGPL-3.0-or-later
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
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, 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
|
+
allowed-tools: get_status, Read, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# slm-web-access — Web apps and bots
|
|
9
|
+
|
|
10
|
+
## What it is
|
|
11
|
+
|
|
12
|
+
Web access is optional. Without it, SuperLocalMemory works fully on this
|
|
13
|
+
computer. With it, web apps reach the same memory through SuperLocalMemory's
|
|
14
|
+
connection gateway: the app signs in with OAuth, the gateway relays each tool
|
|
15
|
+
call to this computer over an outbound link, and the memory database never
|
|
16
|
+
leaves the computer. Nobody configures Cloudflare, DNS or a tunnel.
|
|
17
|
+
|
|
18
|
+
Web access is not `slm remote`. `slm remote` is direct access over TLS with
|
|
19
|
+
named keys, for tools on another computer in your own network.
|
|
20
|
+
|
|
21
|
+
## Turning it on (the owner does this, in the dashboard)
|
|
22
|
+
|
|
23
|
+
1. Open the dashboard (`slm dashboard`, default `http://localhost:8765`) and go
|
|
24
|
+
to **Connected apps**.
|
|
25
|
+
2. Under **Add an app**, choose the app: ChatGPT, Claude (web), Claude Code
|
|
26
|
+
(web), Composio, Muse, or **Other app (MCP)** for any client that supports
|
|
27
|
+
remote MCP with OAuth.
|
|
28
|
+
3. Under **What this app can do**, tick **Turn on internet access for this
|
|
29
|
+
app** (reading is always included). **Allow saving memories** adds the
|
|
30
|
+
`remember` tool and **Allow session tools** adds `session_init`,
|
|
31
|
+
`close_session`, `report_feedback` and `report_outcome`; both are separate
|
|
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.
|
|
34
|
+
4. Select **Link this computer with GitHub** and finish sign-in in the page
|
|
35
|
+
that opens. Wait until the row reads "On. Apps you approve can reach your
|
|
36
|
+
memory while this computer is online."
|
|
37
|
+
5. In the app, add a remote MCP connector with the **MCP server URL**
|
|
38
|
+
`https://mcp.superlocalmemory.com/mcp` and OAuth. Some apps (Composio, Muse)
|
|
39
|
+
also want the **OAuth metadata URL**
|
|
40
|
+
`https://auth.superlocalmemory.com/.well-known/oauth-authorization-server`.
|
|
41
|
+
Both are under **Technical details** with copy buttons.
|
|
42
|
+
6. Approve the same GitHub account and profile in the app, then test one
|
|
43
|
+
recall from the app.
|
|
44
|
+
|
|
45
|
+
An agent cannot do steps 3–6 for the owner: they need the owner's consent and
|
|
46
|
+
sign-in. Point the owner to the dashboard; never ask for tokens or codes.
|
|
47
|
+
|
|
48
|
+
## What a web app can call
|
|
49
|
+
|
|
50
|
+
`recall`, `search`, `fetch`, `get_status`; `remember` only with Save; the four
|
|
51
|
+
session tools only with session tools. It reaches only the profile chosen at
|
|
52
|
+
setup. `scope` must be personal, `shared_with` is refused, and `replaces` is
|
|
53
|
+
refused (`CORRECTION_DENIED`): corrections, deletes and sharing stay on this
|
|
54
|
+
computer.
|
|
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
|
+
|
|
127
|
+
## Instructions for the web agent
|
|
128
|
+
|
|
129
|
+
The app also needs to know when to use the tools. Give the owner
|
|
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`.
|
|
138
|
+
|
|
139
|
+
## Renewal
|
|
140
|
+
|
|
141
|
+
The link renews its own credential while the computer is online; the row says
|
|
142
|
+
**Renews automatically**. If the computer stays offline for weeks, the row
|
|
143
|
+
warns before access ends ("Web access ends on <date> unless this computer
|
|
144
|
+
reconnects"). After it ends, or if sign-in is needed again, the row says so and
|
|
145
|
+
the owner turns Web access on again or signs in again. Local memory is never
|
|
146
|
+
affected.
|
|
147
|
+
|
|
148
|
+
## When a web app reports an error
|
|
149
|
+
|
|
150
|
+
| What the app sees | Meaning | What to do |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `connector_asleep` | This computer was silent for 45 seconds (usually asleep) | Wake the computer; the link reconnects by itself |
|
|
153
|
+
| `connector_offline`, `connector_unavailable`, `relay_timeout` | The link is down or the call took too long | Check the computer is online and SLM is running (`slm status`) |
|
|
154
|
+
| `relay_busy` | Too many calls in flight at once | Make calls one at a time |
|
|
155
|
+
| `DAILY_LIMIT_REACHED` (HTTP 429) | The free daily allowance is used up | Resets at midnight UTC (`Retry-After` says when) |
|
|
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 |
|
|
159
|
+
| `CORRECTION_DENIED`, `SHARING_DENIED`, `PROFILE_DENIED` | The app tried something only this computer may do | Do it locally |
|
|
160
|
+
| `REVOKED` | The owner removed the app | Add it again if wanted |
|
|
161
|
+
| `ENTITLEMENT_REQUIRED` | Web access has ended | Turn it on again in **Connected apps** |
|
|
162
|
+
|
|
163
|
+
To check from this computer, call `get_status` and run `slm status`; the
|
|
164
|
+
**Connected apps** page shows each connection's state and access date.
|
|
165
|
+
|
|
166
|
+
## Removing an app
|
|
167
|
+
|
|
168
|
+
**Connected apps** → the app's row → **Remove access**. The gateway refuses its
|
|
169
|
+
next call.
|
|
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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"superlocalmemory": {
|
|
4
4
|
"args": [
|
|
5
5
|
"--from",
|
|
6
|
-
"superlocalmemory==4.2.
|
|
6
|
+
"superlocalmemory==4.2.6",
|
|
7
7
|
"slm",
|
|
8
8
|
"mcp"
|
|
9
9
|
],
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"env": {
|
|
12
12
|
"SLM_AGENT_ID": "cursor_plugin",
|
|
13
13
|
"SLM_MAX_EMBEDDING_WORKERS": "1",
|
|
14
|
-
"SLM_MCP_PROFILE": "core",
|
|
15
14
|
"SLM_NON_INTERACTIVE": "1",
|
|
16
15
|
"SLM_RERANKER_ENABLED": "false",
|
|
17
16
|
"SLM_RERANKER_IDLE_TIMEOUT": "120",
|
|
@@ -64,7 +64,7 @@ ROLES = {
|
|
|
64
64
|
}
|
|
65
65
|
_MAX_TEXT = 8_000
|
|
66
66
|
# Stamped by scripts/build-hermes-plugin.mjs from pyproject.toml at build time.
|
|
67
|
-
_RELEASE_SLM_VERSION = (4, 2,
|
|
67
|
+
_RELEASE_SLM_VERSION = (4, 2, 6)
|
|
68
68
|
_SECRET_PATTERNS = (
|
|
69
69
|
re.compile(r"\bsk-[A-Za-z0-9_-]{12,}\b"),
|
|
70
70
|
re.compile(r"\b(?:AKIA|ASIA)[A-Z0-9]{16}\b"),
|
|
@@ -120,6 +120,16 @@ def _supported_slm(binary: str) -> bool:
|
|
|
120
120
|
return _REMOTE.compatible(raw, _RELEASE_SLM_VERSION)
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
#: Hermes refuses every plugin MCP call unless config.yaml grants the server,
|
|
124
|
+
#: and has no prompt for it; the refusal used to be swallowed like any failure.
|
|
125
|
+
GRANT_FIX = ("Hermes has not granted the superlocalmemory MCP server to this plugin, so SLM "
|
|
126
|
+
"recall, session tracking and turn capture are off. Fix: run "
|
|
127
|
+
"`slm upgrade-hosts --host hermes --apply`, or set "
|
|
128
|
+
"plugins.entries.superlocalmemory.mcp_allowlist: [superlocalmemory] in "
|
|
129
|
+
"~/.hermes/config.yaml, then restart Hermes.")
|
|
130
|
+
_grant_warned = threading.Event()
|
|
131
|
+
|
|
132
|
+
|
|
123
133
|
def _safe_mcp(ctx: Any, tool: str, arguments: dict[str, Any], timeout: float = 3,
|
|
124
134
|
health: Any = None) -> dict[str, Any]:
|
|
125
135
|
"""Use Hermes's capability-gated MCP path; observers must always fail open.
|
|
@@ -132,6 +142,11 @@ def _safe_mcp(ctx: Any, tool: str, arguments: dict[str, Any], timeout: float = 3
|
|
|
132
142
|
return {"ok": False, "skipped": True}
|
|
133
143
|
try:
|
|
134
144
|
result = ctx.call_mcp("superlocalmemory", tool, arguments, timeout=timeout)
|
|
145
|
+
except PermissionError:
|
|
146
|
+
if not _grant_warned.is_set():
|
|
147
|
+
_grant_warned.set()
|
|
148
|
+
logger.warning("SLM plugin: %s", GRANT_FIX)
|
|
149
|
+
return {"ok": False, "error": GRANT_FIX, "grant_missing": True}
|
|
135
150
|
except Exception as exc:
|
|
136
151
|
result = {"ok": False, "error": str(exc)[:300]}
|
|
137
152
|
if health is not None:
|
|
@@ -195,7 +210,7 @@ class SlmHermesPlugin:
|
|
|
195
210
|
if not session_id or not query:
|
|
196
211
|
return None
|
|
197
212
|
timeout = 5 if self._mode() == "remote" else 3 # the 3 s recall ceiling plus network
|
|
198
|
-
# 4.2.3
|
|
213
|
+
# Since 4.2.3 a prefetch blocks the turn, so it names its budget and gets
|
|
199
214
|
# keyword matches in time instead of a long full recall it abandons.
|
|
200
215
|
result = self._mcp("recall", {"query": query, "session_id": session_id, "agent_id": "hermes", "limit": 5,
|
|
201
216
|
"budget_s": timeout - 0.5}, timeout=timeout)
|
|
@@ -218,12 +233,24 @@ class SlmHermesPlugin:
|
|
|
218
233
|
self._mcp("log_tool_event", args)
|
|
219
234
|
|
|
220
235
|
def post_llm_call(self, **kwargs: Any) -> None:
|
|
236
|
+
# Issue #263: turns went to ``observe``, which keeps only English
|
|
237
|
+
# decision/bug/preference sentences, so ordinary and non-English turns
|
|
238
|
+
# were dropped. ``remember`` is the ordinary save path, any language.
|
|
221
239
|
if self.ctx.get_config("capture_turns", False) is not True:
|
|
222
240
|
return
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
241
|
+
user = _redact(kwargs.get("user_message"), 4_000).strip()
|
|
242
|
+
assistant = _redact(kwargs.get("assistant_response"), 6_000).strip()
|
|
243
|
+
if not user and not assistant:
|
|
244
|
+
return
|
|
245
|
+
session_id = str(kwargs.get("session_id") or "")
|
|
246
|
+
content = f"User: {user}\nAssistant: {assistant}"
|
|
247
|
+
# A retried hook saves the same turn once.
|
|
248
|
+
key = hashlib.sha256(f"{session_id}\n{content}".encode("utf-8")).hexdigest()[:32]
|
|
249
|
+
timeout = 8 if self._mode() == "remote" else 5
|
|
250
|
+
self._mcp("remember", {
|
|
251
|
+
"content": content, "session_id": session_id, "agent_id": "hermes",
|
|
252
|
+
"tags": "hermes,conversation-turn", "idempotency_key": "hermes-turn:" + key,
|
|
253
|
+
}, timeout=timeout)
|
|
227
254
|
|
|
228
255
|
def on_session_end(self, **kwargs: Any) -> None:
|
|
229
256
|
# Hermes emits this after every turn. Per-turn settlement selects only
|
|
@@ -375,13 +402,18 @@ class SlmHermesPlugin:
|
|
|
375
402
|
"from the owning runtime; this one is older, a different major version, or "
|
|
376
403
|
f"unverifiable. Upgrade SLM, or move the plugin to its release: {_REMOTE.REINSTALL_HINT}")
|
|
377
404
|
argv[0] = command
|
|
405
|
+
# /slm runs the CLI and works without the grant; the hooks do not. Probed
|
|
406
|
+
# only once the local CLI is confirmed, so a bad setting sends nothing.
|
|
407
|
+
notice = ""
|
|
408
|
+
if command == "status" and self._mcp("get_version", {}).get("grant_missing"):
|
|
409
|
+
notice = "WARNING: " + GRANT_FIX + "\n\n"
|
|
378
410
|
if "--json" not in argv and command not in {"mcp", "dashboard", "serve", "proxy", "warmup", "setup"}:
|
|
379
411
|
argv.append("--json")
|
|
380
412
|
try:
|
|
381
413
|
completed = subprocess.run([binary, *argv], text=True, capture_output=True, timeout=30, check=False)
|
|
382
414
|
except (OSError, subprocess.TimeoutExpired) as exc:
|
|
383
415
|
return f"SLM command unavailable: {_bounded(exc, 500)}"
|
|
384
|
-
return _bounded(completed.stdout or completed.stderr or f"slm exited {completed.returncode}")
|
|
416
|
+
return notice + _bounded(completed.stdout or completed.stderr or f"slm exited {completed.returncode}")
|
|
385
417
|
|
|
386
418
|
|
|
387
419
|
def register(ctx: Any) -> None:
|
|
@@ -81,4 +81,4 @@ slm-scope · slm-governance · slm-profile · slm-remember · slm-recall · slm-
|
|
|
81
81
|
# What NOT to do
|
|
82
82
|
Never session_init twice; never forget without dry-run preview; never run `slm gdpr erase --yes` unasked; never store secrets; never bypass role checks; never claim an erasure succeeded without verifying via recall.
|
|
83
83
|
|
|
84
|
-
SuperLocalMemory v4.2.
|
|
84
|
+
SuperLocalMemory v4.2.6 · Qualixar · AGPL-3.0-or-later
|
|
@@ -51,4 +51,4 @@ slm-recall · slm-remember · slm-session · slm-scope · slm-profile · slm-gov
|
|
|
51
51
|
# What NOT to do
|
|
52
52
|
Never session_init twice; never forget dry_run=False without reporting preview; never switch the active profile unasked; 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.
|
|
53
53
|
|
|
54
|
-
SuperLocalMemory v4.2.
|
|
54
|
+
SuperLocalMemory v4.2.6 · 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 hand a ccr_id to another agent.
|
|
43
43
|
|
|
44
|
-
SuperLocalMemory v4.2.
|
|
44
|
+
SuperLocalMemory v4.2.6 · Qualixar · AGPL-3.0-or-later
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"skills": ["slm-bot-memory", "slm-cache", "slm-compress", "slm-getting-started-bot", "slm-governance", "slm-graph", "slm-loop", "slm-media", "slm-mesh", "slm-profile", "slm-recall", "slm-remember", "slm-scope", "slm-session", "slm-status", "slm-web-access"],
|
|
3
|
-
"primary_commands": ["init", "setup", "mode", "provider", "connect", "upgrade-hosts", "migrate", "db", "mesh", "remember", "recall", "forget", "delete", "update", "review-correction", "list", "status", "health", "trace", "doctor", "help", "wrap", "mcp", "warmup", "dashboard", "serve", "restart", "profile", "hooks", "codex", "session-context", "session", "observe", "brain", "decay", "quantize", "consolidate", "soft-prompts", "reap", "adapters", "ingest", "config", "evolve", "disable", "enable", "clear-cache", "reconfigure", "benchmark", "evidence", "diagnostics", "rotate-token", "optimize", "cache", "compress", "proxy", "help-optimize", "loop", "summary", "view", "kinds", "gdpr", "ops", "enrich", "backup", "remote", "models", "corrections", "embedder", "features", "media", "sources", "team", "token", "outcome"],
|
|
3
|
+
"primary_commands": ["init", "setup", "mode", "provider", "connect", "upgrade-hosts", "migrate", "db", "mesh", "remember", "recall", "forget", "delete", "update", "review-correction", "list", "status", "health", "trace", "doctor", "help", "wrap", "mcp", "tools", "warmup", "dashboard", "serve", "restart", "profile", "hooks", "codex", "session-context", "session", "observe", "brain", "decay", "quantize", "consolidate", "soft-prompts", "reap", "adapters", "ingest", "config", "evolve", "disable", "enable", "clear-cache", "reconfigure", "benchmark", "evidence", "diagnostics", "rotate-token", "optimize", "cache", "compress", "proxy", "help-optimize", "loop", "summary", "view", "kinds", "gdpr", "ops", "enrich", "backup", "remote", "models", "corrections", "embedder", "features", "media", "sources", "team", "token", "outcome"],
|
|
4
4
|
"aliases": {"search": "recall"},
|
|
5
|
-
"high_impact": ["forget", "delete", "review-correction", "migrate", "db", "profile", "hooks", "restart", "disable", "clear-cache", "reconfigure", "evidence", "rotate-token", "config", "kinds", "gdpr", "ops", "enrich", "backup", "remote", "corrections", "embedder", "features", "media", "sources", "team", "token"],
|
|
5
|
+
"high_impact": ["forget", "delete", "review-correction", "migrate", "db", "profile", "tools", "hooks", "restart", "disable", "clear-cache", "reconfigure", "evidence", "rotate-token", "config", "kinds", "gdpr", "ops", "enrich", "backup", "remote", "corrections", "embedder", "features", "media", "sources", "team", "token"],
|
|
6
6
|
"high_impact_flags": {"remember": ["--replaces"]}
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: superlocalmemory
|
|
2
|
-
version: 4.2.
|
|
2
|
+
version: 4.2.6
|
|
3
3
|
description: "Native, additive SuperLocalMemory lifecycle, skills, commands, and advisors for Hermes."
|
|
4
4
|
author: Qualixar
|
|
5
5
|
manifest_version: 1
|
|
@@ -17,7 +17,7 @@ config_schema:
|
|
|
17
17
|
capture_turns:
|
|
18
18
|
type: bool
|
|
19
19
|
default: false
|
|
20
|
-
description: "Explicit opt-in:
|
|
20
|
+
description: "Explicit opt-in: save every completed turn (any language, secrets redacted) as a memory through the configured SLM MCP server."
|
|
21
21
|
connection:
|
|
22
22
|
type: string
|
|
23
23
|
default: local
|
|
@@ -20,7 +20,9 @@ SuperLocalMemory can run with named users and roles per workspace (company
|
|
|
20
20
|
mode), keeps a compliance audit trail, applies a retention lifecycle, and ships
|
|
21
21
|
GDPR export and erasure commands. This skill documents how an agent must behave
|
|
22
22
|
in a governed workspace and what the governance tools really do. The MCP audit
|
|
23
|
-
and retention tools are in the `power` tool set
|
|
23
|
+
and retention tools are in the `power` tool set, not the default: if they are
|
|
24
|
+
missing, tell the user to run `slm tools set power` and restart this app (see
|
|
25
|
+
`slm-profile`). The `slm gdpr` and `slm team` commands work either way.
|
|
24
26
|
|
|
25
27
|
---
|
|
26
28
|
|
|
@@ -274,4 +276,4 @@ Before running any destructive or state-changing operation (`forget`,
|
|
|
274
276
|
|
|
275
277
|
---
|
|
276
278
|
|
|
277
|
-
*SuperLocalMemory v4.2.
|
|
279
|
+
*SuperLocalMemory v4.2.6 · Qualixar · AGPL-3.0-or-later*
|