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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-mesh
|
|
3
|
+
description: Cross-session peer coordination via the SLM mesh network. Lets multiple AI agent sessions on the same machine discover each other, send messages, share lightweight state, and lock files to avoid conflicts. Available in the default tool set and in the full, power and mesh MCP profiles. Only `slm mesh status` and `slm mesh peers` exist on the command line; the other tools are MCP-only.
|
|
4
|
+
when_to_use: |
|
|
5
|
+
- Multiple agent sessions running simultaneously on the same machine
|
|
6
|
+
- "Announce what I'm working on to other sessions"
|
|
7
|
+
- "Check if another agent has locked a file before I edit it"
|
|
8
|
+
- "Send a message to the other Claude session"
|
|
9
|
+
- "Is anyone else working on this project?"
|
|
10
|
+
- Parallel agent workflows needing coordination
|
|
11
|
+
- Cross-session state sharing without persisting to the memory store
|
|
12
|
+
allowed-tools: mesh_summary, mesh_peers, mesh_send, mesh_inbox, mesh_state, mesh_lock, mesh_events, mesh_status, Bash
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# slm-mesh — Cross-Session Peer Coordination
|
|
16
|
+
|
|
17
|
+
The mesh network lets multiple AI agent sessions on the same machine discover
|
|
18
|
+
each other and coordinate in real time — without writing to the persistent
|
|
19
|
+
memory store. Mesh messages are transient (48-hour TTL); they complement memory
|
|
20
|
+
(which is durable) rather than replacing it.
|
|
21
|
+
|
|
22
|
+
By default the mesh is local: the SLM daemon on this machine is the broker and
|
|
23
|
+
nothing leaves it. Two machines can be joined only if the user sets
|
|
24
|
+
`SLM_MESH_PEER_URL` and `SLM_MESH_SHARED_SECRET` for their daemons; then peers and
|
|
25
|
+
messages cross to the other machine. Do not configure that yourself.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Profile requirement
|
|
30
|
+
|
|
31
|
+
Mesh tools are registered in the `full`, `power` and `mesh` MCP tool sets and in
|
|
32
|
+
the default set that applies when the host configures none. They are not in
|
|
33
|
+
`core` or `code`. The tool set is fixed when the MCP server starts, and
|
|
34
|
+
`switch_profile` cannot change it (it changes the active memory profile). If the
|
|
35
|
+
tools are missing, check `SLM_MCP_PROFILE` in the host's MCP config and ask the
|
|
36
|
+
user before changing it. See `slm-profile`.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Tool reference
|
|
41
|
+
|
|
42
|
+
### 1. `mesh_summary` — announce what this session is doing
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
mesh_summary(summary: str = "") -> dict
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Call at session start to register on the mesh and announce your purpose. Other
|
|
49
|
+
sessions can see your summary via `mesh_peers`. The session stays alive via
|
|
50
|
+
automatic heartbeat.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
mesh_summary(summary="Refactoring auth module in api/src/auth/")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Response: `{peer_id, summary, project_path, registered, heartbeat_active, broker_response}`
|
|
57
|
+
|
|
58
|
+
Call this once at the start of any session that will participate in the mesh.
|
|
59
|
+
The peer registration happens automatically at MCP startup, but calling
|
|
60
|
+
`mesh_summary` sets the human-readable description that other agents see.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### 2. `mesh_peers` — list active sessions
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
mesh_peers() -> dict
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Returns all active peer sessions on this machine.
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
mesh_peers()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Response: `{peers: [{peer_id, summary, project_path, last_seen}], count, my_peer_id}`
|
|
77
|
+
|
|
78
|
+
Use this to discover other sessions before sending a message or checking for
|
|
79
|
+
conflicts.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### 3. `mesh_send` — send a message to another session
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
mesh_send(
|
|
87
|
+
to: str, # peer_id | "broadcast" | "project:/path/to/dir"
|
|
88
|
+
message: str, # max 4 KB — use file paths for large data
|
|
89
|
+
) -> dict
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Send a targeted, broadcast, or project-wide message.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
# Direct message to a specific peer
|
|
96
|
+
peers = await mesh_peers()
|
|
97
|
+
target_id = peers["peers"][0]["peer_id"]
|
|
98
|
+
mesh_send(to=target_id, message="I'm starting work on auth/handler.py — please hold off")
|
|
99
|
+
|
|
100
|
+
# Broadcast to all sessions
|
|
101
|
+
mesh_send(to="broadcast", message="Deploying to staging in 5 minutes")
|
|
102
|
+
|
|
103
|
+
# Message all sessions working in the same project
|
|
104
|
+
mesh_send(to="project:~/myproject", message="Tests are green on main")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**4 KB message cap.** For large payloads (diffs, file contents), write to a file
|
|
108
|
+
and send the path instead. The circuit breaker opens automatically if the daemon
|
|
109
|
+
is repeatedly unreachable — `mesh_send` returns `ok: false` in that case.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### 4. `mesh_inbox` — read messages sent to this session
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
mesh_inbox() -> dict
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Returns unread messages (direct, broadcast, and project-targeted). Messages are
|
|
120
|
+
automatically marked as read after retrieval.
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
inbox = await mesh_inbox()
|
|
124
|
+
for msg in inbox["messages"]:
|
|
125
|
+
print(msg["from"], msg["content"])
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Response: `{messages: [{id, from, content, sent_at, read}], count, unread}`
|
|
129
|
+
|
|
130
|
+
Messages auto-expire after 48 hours.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 5. `mesh_state` — get or set shared coordination state
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
mesh_state(
|
|
138
|
+
key: str = "",
|
|
139
|
+
value: str = "",
|
|
140
|
+
action: str = "get", # "get" | "set"
|
|
141
|
+
) -> dict
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Shared state is visible to all authenticated peers. Use it for non-secret
|
|
145
|
+
coordination metadata: feature flags, task assignments, progress markers.
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
# Set state
|
|
149
|
+
mesh_state(key="deploy_in_progress", value="true", action="set")
|
|
150
|
+
mesh_state(key="current_reviewer", value=my_peer_id, action="set")
|
|
151
|
+
|
|
152
|
+
# Read one key
|
|
153
|
+
mesh_state(key="deploy_in_progress", action="get")
|
|
154
|
+
|
|
155
|
+
# Read all state
|
|
156
|
+
mesh_state(action="get")
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Security constraint:** Credentials, tokens, passwords, and API keys are
|
|
160
|
+
rejected by the broker. Never store secrets in shared state.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### 6. `mesh_lock` — file lock coordination
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
mesh_lock(
|
|
168
|
+
file_path: str, # must be an absolute path
|
|
169
|
+
action: str = "query", # "query" | "acquire" | "release"
|
|
170
|
+
) -> dict
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Check, acquire, or release a file lock before editing a shared file.
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
# Step 1: check if the file is already locked
|
|
177
|
+
lock = await mesh_lock(file_path="/abs/path/to/auth/handler.py", action="query")
|
|
178
|
+
|
|
179
|
+
if lock.get("locked"):
|
|
180
|
+
print(f"File is locked by {lock['locked_by']} — wait")
|
|
181
|
+
else:
|
|
182
|
+
# Step 2: acquire the lock
|
|
183
|
+
mesh_lock(file_path="/abs/path/to/auth/handler.py", action="acquire")
|
|
184
|
+
|
|
185
|
+
# ... edit the file ...
|
|
186
|
+
|
|
187
|
+
# Step 3: release the lock when done
|
|
188
|
+
mesh_lock(file_path="/abs/path/to/auth/handler.py", action="release")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
`file_path` must be an absolute path (starts with `/` on Unix, drive letter on
|
|
192
|
+
Windows). Relative paths are rejected.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### 7. `mesh_events` — recent mesh activity log
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
mesh_events() -> dict
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Returns the activity log for the mesh network: peer joins, leaves, messages sent,
|
|
203
|
+
and state changes. Use to understand what other sessions have been doing.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### 8. `mesh_status` — mesh broker health
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
mesh_status() -> dict
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Returns broker uptime, peer count, and connection health. Use at session start
|
|
214
|
+
to confirm the mesh is available before relying on coordination.
|
|
215
|
+
|
|
216
|
+
Response includes: `broker_up`, `peer_count` (active peers, with
|
|
217
|
+
`remote_peer_count`, `local_session_count` and stale counts alongside),
|
|
218
|
+
`uptime_s`, `my_peer_id`, `heartbeat_active`.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Common workflow: parallel agents coordinating on a shared repo
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
# Both agents call at session start:
|
|
226
|
+
await mesh_summary(summary="Working on feature/auth-refactor")
|
|
227
|
+
|
|
228
|
+
# Agent A: check who else is active
|
|
229
|
+
peers = await mesh_peers()
|
|
230
|
+
# → sees Agent B working on the same project
|
|
231
|
+
|
|
232
|
+
# Agent A: before editing a shared file
|
|
233
|
+
lock = await mesh_lock("/repo/src/auth/handler.py", action="query")
|
|
234
|
+
if not lock.get("locked"):
|
|
235
|
+
await mesh_lock("/repo/src/auth/handler.py", action="acquire")
|
|
236
|
+
# ... edit handler.py ...
|
|
237
|
+
await mesh_lock("/repo/src/auth/handler.py", action="release")
|
|
238
|
+
|
|
239
|
+
# Agent A: after finishing a phase
|
|
240
|
+
await mesh_send(to="project:/repo", message="Auth refactor complete — handler.py ready for review")
|
|
241
|
+
|
|
242
|
+
# Agent B: check inbox
|
|
243
|
+
inbox = await mesh_inbox()
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Mesh vs memory: when to use which
|
|
249
|
+
|
|
250
|
+
| Need | Use |
|
|
251
|
+
|------|-----|
|
|
252
|
+
| Ephemeral coordination signal (< 48h) | `mesh_send` / `mesh_state` |
|
|
253
|
+
| Durable fact across sessions/days | `remember` |
|
|
254
|
+
| File conflict prevention | `mesh_lock` |
|
|
255
|
+
| Cross-profile fact sharing | `scope="shared"/"global"` on `remember` |
|
|
256
|
+
| Session announcement | `mesh_summary` |
|
|
257
|
+
| Finding parallel agents | `mesh_peers` |
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Error handling
|
|
262
|
+
|
|
263
|
+
All 8 mesh tools return structured errors — they never raise exceptions.
|
|
264
|
+
|
|
265
|
+
| Error | Cause | Action |
|
|
266
|
+
|-------|-------|--------|
|
|
267
|
+
| `broker_up: false` from `mesh_status` | Daemon not running or mesh not configured | Run `slm mesh status` (prints the broker's answer) or `slm status` to check daemon health |
|
|
268
|
+
| `ok: false` from `mesh_send` with circuit-breaker message | Repeated daemon unreachability | Daemon unreachable; stop sending until broker is up |
|
|
269
|
+
| `ok: false` from `mesh_lock` | Lock operation failed | Check `file_path` is absolute; retry once |
|
|
270
|
+
| Empty `peers` from `mesh_peers` | No other sessions registered | You're the only active session |
|
|
271
|
+
|
|
272
|
+
Mesh failures are non-fatal for the primary task. If `mesh_status` shows
|
|
273
|
+
`broker_up: false`, proceed without mesh coordination — do not block work on
|
|
274
|
+
mesh availability.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Related skills
|
|
279
|
+
|
|
280
|
+
- `slm-profile` — which tool sets include the mesh tools
|
|
281
|
+
- `slm-scope` — for durable cross-profile sharing (complement to transient mesh state)
|
|
282
|
+
- `slm-remember` — persist coordination decisions that should survive session end
|
|
283
|
+
- `slm-governance` — enterprise governance of mesh (who can send/receive)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-profile
|
|
3
|
+
description: Memory profiles (separate namespaces inside one SuperLocalMemory store) and MCP tool sets (which tools your host sees). Use switch_profile or slm profile switch to change the active memory profile, the profile_id argument to read or write another profile for one call, and SLM_MCP_PROFILE to choose a tool set. Required when working across multiple projects, clients, or tenants.
|
|
4
|
+
when_to_use: |
|
|
5
|
+
- "Switch to my work profile"
|
|
6
|
+
- "What profile am I currently in?"
|
|
7
|
+
- "Create a profile for this client"
|
|
8
|
+
- "Read the work profile once without leaving this one"
|
|
9
|
+
- "I need mesh or code-graph tools" (a tool-set question, not a profile switch)
|
|
10
|
+
- "Why can't I see tool X?"
|
|
11
|
+
- Multi-project workflows needing memory isolation
|
|
12
|
+
- Switching between personal and team workspaces
|
|
13
|
+
allowed-tools: switch_profile, get_status, Bash
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# slm-profile — Memory Profiles and Tool Sets
|
|
17
|
+
|
|
18
|
+
Two different things are called "profile" in SuperLocalMemory. Keep them apart.
|
|
19
|
+
|
|
20
|
+
- A **memory profile** is a namespace inside one store. It has its own memories,
|
|
21
|
+
knowledge graph, learned patterns, retention settings and audit trail. A fresh
|
|
22
|
+
install has one, called `default`. This is what `switch_profile`,
|
|
23
|
+
`slm profile` and the `profile_id` argument are about.
|
|
24
|
+
- An **MCP tool set** (`SLM_MCP_PROFILE`: `core`, `code`, `full`, `power`,
|
|
25
|
+
`mesh`) decides which tools the server shows your host. `switch_profile` does
|
|
26
|
+
not change it.
|
|
27
|
+
|
|
28
|
+
A memory profile organises memory. It is not a security boundary: any local
|
|
29
|
+
caller that can name a profile can read it, unless the user has turned on company
|
|
30
|
+
mode with roles. For memories that must be unreachable from another bot or user,
|
|
31
|
+
use a separate data directory (`SLM_DATA_DIR`) or company mode (`slm-governance`).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Memory profiles
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
slm profile list [--json]
|
|
39
|
+
slm profile create <name> [--json]
|
|
40
|
+
slm profile switch <name> [--json]
|
|
41
|
+
slm status --json # data.profile is the active profile
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Creating a profile is a CLI action; there is no MCP tool for it. Over MCP:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
switch_profile(
|
|
48
|
+
profile_id: str, # the name of an existing profile
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`switch_profile` changes the **active profile**. The change is not private to
|
|
53
|
+
your session: it is written as the machine's active profile, so every later call
|
|
54
|
+
from every session on this machine, and the dashboard, now work in it until
|
|
55
|
+
someone switches again. An unknown name is refused (`Profile '<name>' does not
|
|
56
|
+
exist`); nothing is created. In company mode it also needs a role on the target
|
|
57
|
+
profile. Only switch when the user asks to move; do not switch to peek at
|
|
58
|
+
something.
|
|
59
|
+
|
|
60
|
+
### Reaching another profile for one call
|
|
61
|
+
|
|
62
|
+
Most tools take an optional `profile_id`: `remember`, `recall`, `search`,
|
|
63
|
+
`fetch`, `list_recent`, `update_memory`, `delete_memory`, `session_init`,
|
|
64
|
+
`close_session`, `report_outcome`, `report_feedback`, `get_status`,
|
|
65
|
+
`get_memory_summary`, the correction and memory-kind tools, and others. A
|
|
66
|
+
non-empty value serves that one call from that profile (which must already
|
|
67
|
+
exist) and **never moves the active profile**. An empty value means the active
|
|
68
|
+
profile. Prefer this to switching and switching back.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
recall(query="rollout plan", profile_id="work", session_id="<sid>")
|
|
72
|
+
remember(content="...", tags="ops", profile_id="client-acme")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`forget` and the mesh tools take no `profile_id`; they act on the active profile.
|
|
76
|
+
|
|
77
|
+
### What a profile isolates
|
|
78
|
+
|
|
79
|
+
- `recall` returns only the profile's own memories, plus shared or global ones
|
|
80
|
+
only when you opt in (see `slm-scope`).
|
|
81
|
+
- `remember` writes to the profile you name or the active one.
|
|
82
|
+
- The code graph is not partitioned by profile: it lives in `code_graph.db` in the data directory.
|
|
83
|
+
- The `slm_cache_*` key-value cache and `slm_compress` recovery store are keyed
|
|
84
|
+
by the calling agent, not by profile, so switching profiles does not give you
|
|
85
|
+
a clean cache (see `slm-cache`).
|
|
86
|
+
|
|
87
|
+
### Separate stores
|
|
88
|
+
|
|
89
|
+
To keep two bots or two clients completely apart, give each its own
|
|
90
|
+
`SLM_DATA_DIR` in its MCP config. You can run several SLM MCP servers at once,
|
|
91
|
+
named differently (for example `superlocalmemory-personal` and
|
|
92
|
+
`superlocalmemory-work`), each pointed at its own directory.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## MCP tool sets
|
|
97
|
+
|
|
98
|
+
| Profile | Tools | What it is |
|
|
99
|
+
|---------|-------|------------|
|
|
100
|
+
| `core` | 18 tools — remember, recall, search, fetch, list_recent, update_memory, forget, session, optimize, corrections, summaries, switch_profile | Smallest set; the Grok Bot / Cursor plugin uses it |
|
|
101
|
+
| `code` | 38 tools — core + portable Brain evidence, report_outcome/report_feedback, 6 code-graph tools, memory kinds, bounded loops | For coding agents that need the graph; no mesh, no `get_status` |
|
|
102
|
+
| `full` | 56 tools — everyday memory, delete_memory, get_status, observe, saved views, learning tools, skills, optimize, kinds, loops, mesh | Same set as the no-profile default |
|
|
103
|
+
| `power` | 68 tools — full + audit_trail, retention, compaction, consistency_check, behavioral and diagnostic tools | Governance and admin work |
|
|
104
|
+
| `mesh` | 8 tools — mesh coordination only | Lightweight cross-session signalling |
|
|
105
|
+
|
|
106
|
+
A host that sets no profile gets the 56-tool `full` set (this is what the Claude
|
|
107
|
+
Code and Codex plugins do; the Antigravity plugin sets `power`). Two more
|
|
108
|
+
environment variables widen or narrow it: `SLM_MCP_ALL_TOOLS=1` registers every
|
|
109
|
+
tool (103), and `SLM_MCP_TOOLS=remember,recall,...` registers exactly the names
|
|
110
|
+
listed. `SLM_MCP_PROFILE=whole` is also every tool. The code-graph tools beyond
|
|
111
|
+
the six in `code` (such as `update_code_graph`, `list_graph_stats`) and tools
|
|
112
|
+
such as `core_memory` and `settle_session_outcomes` exist only with
|
|
113
|
+
`SLM_MCP_ALL_TOOLS=1`, `whole` or an explicit `SLM_MCP_TOOLS` list. Tools whose
|
|
114
|
+
function is to manage the SLM computer are never available to a remote caller.
|
|
115
|
+
|
|
116
|
+
The tool set is read when the MCP server starts. To change it, set it in the
|
|
117
|
+
host's MCP config and restart the host; asking the server at runtime does not
|
|
118
|
+
work:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
"env": {
|
|
122
|
+
"SLM_MCP_PROFILE": "code",
|
|
123
|
+
"SLM_AGENT_ID": "codex"
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`slm connect <ide> --profile <name>` writes that variable into a supported
|
|
128
|
+
host's config. Setting `SLM_MCP_PROFILE` to a name that does not exist stops
|
|
129
|
+
`slm mcp` with a message listing the valid names. Older count-suffixed names
|
|
130
|
+
such as `code20`, `full38` and `power50` still resolve, with a startup warning.
|
|
131
|
+
On an install that already has memories, do not set `SLM_DATA_DIR` in the MCP
|
|
132
|
+
config: it points the host at a different, empty store.
|
|
133
|
+
|
|
134
|
+
`switch_profile` is in `core`, `code`, `full` and `power`, and in the default
|
|
135
|
+
set. It is not in `mesh`.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## If a tool is missing
|
|
140
|
+
|
|
141
|
+
Check the tool set first (`slm status` does not show it; look at the host's MCP
|
|
142
|
+
config for `SLM_MCP_PROFILE`). Mesh tools need `full`, `power`, `mesh` or the
|
|
143
|
+
default. Code-graph tools need `code` or `SLM_MCP_ALL_TOOLS=1`. Audit and
|
|
144
|
+
retention tools need `power`. `report_outcome` and `report_feedback` need
|
|
145
|
+
anything but `core` or `mesh`.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Related skills
|
|
150
|
+
|
|
151
|
+
- `slm-scope` — opt-in fact sharing across profiles (personal/shared/global)
|
|
152
|
+
- `slm-graph` — code-graph tools and the tool set they need
|
|
153
|
+
- `slm-mesh` — mesh tools and the tool set they need
|
|
154
|
+
- `slm-status` — check the active profile name
|
|
155
|
+
- `slm-governance` — roles and company mode
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
*SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*
|