superlocalmemory 3.8.14 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/ATTRIBUTION.md +4 -4
  2. package/CHANGELOG.md +113 -137
  3. package/README.md +65 -63
  4. package/docs/pi-dev-integration.md +1 -1
  5. package/package.json +6 -1
  6. package/plugin/.claude-plugin/plugin.json +1 -1
  7. package/plugin/CLAUDE.md +3 -3
  8. package/plugin/agents/slm-governance-advisor.md +1 -1
  9. package/plugin/agents/slm-loop-runner.md +1 -1
  10. package/plugin/agents/slm-memory-advisor.md +1 -1
  11. package/plugin/agents/slm-optimize-advisor.md +1 -1
  12. package/plugin/requirements.txt +1 -1
  13. package/plugin/skills/slm-cache/SKILL.md +1 -1
  14. package/plugin/skills/slm-compress/SKILL.md +1 -1
  15. package/plugin/skills/slm-governance/SKILL.md +1 -1
  16. package/plugin/skills/slm-graph/SKILL.md +1 -1
  17. package/plugin/skills/slm-loop/SKILL.md +1 -1
  18. package/plugin/skills/slm-mesh/SKILL.md +1 -1
  19. package/plugin/skills/slm-profile/SKILL.md +1 -1
  20. package/plugin/skills/slm-recall/SKILL.md +1 -1
  21. package/plugin/skills/slm-remember/SKILL.md +1 -1
  22. package/plugin/skills/slm-scope/SKILL.md +1 -1
  23. package/plugin/skills/slm-session/SKILL.md +1 -1
  24. package/plugin/skills/slm-status/SKILL.md +1 -1
  25. package/plugin-src/rules/AGENTS.md +1 -1
  26. package/plugin-src/skills/slm-cache/SKILL.md +1 -1
  27. package/plugin-src/skills/slm-compress/SKILL.md +1 -1
  28. package/plugin-src/skills/slm-governance/SKILL.md +248 -0
  29. package/plugin-src/skills/slm-graph/SKILL.md +1 -1
  30. package/plugin-src/skills/slm-loop/SKILL.md +99 -0
  31. package/plugin-src/skills/slm-mesh/SKILL.md +282 -0
  32. package/plugin-src/skills/slm-profile/SKILL.md +148 -0
  33. package/plugin-src/skills/slm-recall/SKILL.md +1 -1
  34. package/plugin-src/skills/slm-remember/SKILL.md +1 -1
  35. package/plugin-src/skills/slm-scope/SKILL.md +176 -0
  36. package/plugin-src/skills/slm-session/SKILL.md +1 -1
  37. package/plugin-src/skills/slm-status/SKILL.md +1 -1
  38. package/pyproject.toml +11 -4
  39. package/src/superlocalmemory/__init__.py +1 -1
  40. package/src/superlocalmemory/cli/commands.py +125 -11
  41. package/src/superlocalmemory/cli/daemon.py +5 -1
  42. package/src/superlocalmemory/cli/main.py +35 -2
  43. package/src/superlocalmemory/cli/ops_cmd.py +281 -0
  44. package/src/superlocalmemory/cli/setup_wizard.py +1 -1
  45. package/src/superlocalmemory/compliance/audit.py +65 -0
  46. package/src/superlocalmemory/compliance/eu_ai_act.py +27 -57
  47. package/src/superlocalmemory/compliance/gdpr.py +416 -20
  48. package/src/superlocalmemory/compliance/retention.py +74 -22
  49. package/src/superlocalmemory/compliance/scheduler.py +78 -9
  50. package/src/superlocalmemory/core/actor_context.py +166 -0
  51. package/src/superlocalmemory/core/admission.py +549 -0
  52. package/src/superlocalmemory/core/backend_orchestrator.py +23 -10
  53. package/src/superlocalmemory/core/config.py +202 -24
  54. package/src/superlocalmemory/core/consolidation_engine.py +13 -13
  55. package/src/superlocalmemory/core/context_cache.py +28 -0
  56. package/src/superlocalmemory/core/embeddings.py +64 -2
  57. package/src/superlocalmemory/core/engine.py +7 -2
  58. package/src/superlocalmemory/core/engine_ingestion.py +65 -3
  59. package/src/superlocalmemory/core/engine_wiring.py +32 -5
  60. package/src/superlocalmemory/core/ingest_policy.py +38 -0
  61. package/src/superlocalmemory/core/maintenance.py +255 -0
  62. package/src/superlocalmemory/core/modes.py +40 -13
  63. package/src/superlocalmemory/core/mutations.py +437 -44
  64. package/src/superlocalmemory/core/operation_policy.py +92 -0
  65. package/src/superlocalmemory/core/operation_policy_registry.py +542 -0
  66. package/src/superlocalmemory/core/operation_request.py +127 -0
  67. package/src/superlocalmemory/core/ops_remediation.py +542 -0
  68. package/src/superlocalmemory/core/recall_pipeline.py +7 -0
  69. package/src/superlocalmemory/core/remember_runtime.py +202 -4
  70. package/src/superlocalmemory/core/remote_mode.py +20 -5
  71. package/src/superlocalmemory/core/store_pipeline.py +150 -0
  72. package/src/superlocalmemory/core/topic_signature.py +19 -4
  73. package/src/superlocalmemory/core/transactions/__init__.py +78 -0
  74. package/src/superlocalmemory/core/transactions/concrete_owners.py +597 -0
  75. package/src/superlocalmemory/core/transactions/erasure.py +825 -0
  76. package/src/superlocalmemory/core/transactions/manifest.py +255 -0
  77. package/src/superlocalmemory/core/transactions/manifest_key.py +155 -0
  78. package/src/superlocalmemory/core/transactions/obligations.py +272 -0
  79. package/src/superlocalmemory/core/transactions/owners.py +114 -0
  80. package/src/superlocalmemory/core/transactions/reconciler.py +285 -0
  81. package/src/superlocalmemory/core/transactions/service.py +330 -0
  82. package/src/superlocalmemory/core/worker_pool.py +33 -5
  83. package/src/superlocalmemory/encoding/cognitive_consolidator.py +70 -28
  84. package/src/superlocalmemory/encoding/emotional.py +75 -14
  85. package/src/superlocalmemory/encoding/temporal_parser.py +4 -0
  86. package/src/superlocalmemory/evolution/blind_verifier.py +11 -4
  87. package/src/superlocalmemory/evolution/evolution_store.py +244 -4
  88. package/src/superlocalmemory/evolution/llm_dispatch.py +40 -0
  89. package/src/superlocalmemory/evolution/model_selection.py +18 -3
  90. package/src/superlocalmemory/evolution/mutation_generator.py +3 -0
  91. package/src/superlocalmemory/evolution/skill_activator.py +270 -0
  92. package/src/superlocalmemory/evolution/skill_evolver.py +281 -59
  93. package/src/superlocalmemory/evolution/types.py +30 -8
  94. package/src/superlocalmemory/graph/cozo_backend.py +17 -9
  95. package/src/superlocalmemory/hooks/auto_invoker.py +2 -1
  96. package/src/superlocalmemory/hooks/auto_recall.py +64 -30
  97. package/src/superlocalmemory/hooks/codex_assets.py +14 -1
  98. package/src/superlocalmemory/infra/backup.py +434 -7
  99. package/src/superlocalmemory/infra/process_reaper.py +18 -0
  100. package/src/superlocalmemory/infra/self_heal.py +401 -0
  101. package/src/superlocalmemory/learning/feedback.py +52 -9
  102. package/src/superlocalmemory/loops/engine.py +10 -0
  103. package/src/superlocalmemory/mcp/_daemon_proxy.py +3 -0
  104. package/src/superlocalmemory/mcp/http_transport.py +30 -331
  105. package/src/superlocalmemory/mcp/profiles.py +5 -0
  106. package/src/superlocalmemory/mcp/resources.py +8 -0
  107. package/src/superlocalmemory/mcp/server.py +51 -4
  108. package/src/superlocalmemory/mcp/shared.py +19 -0
  109. package/src/superlocalmemory/mcp/tools_active.py +25 -4
  110. package/src/superlocalmemory/mcp/tools_code_graph.py +26 -18
  111. package/src/superlocalmemory/mcp/tools_context.py +50 -8
  112. package/src/superlocalmemory/mcp/tools_core.py +69 -21
  113. package/src/superlocalmemory/mcp/tools_evolution.py +9 -2
  114. package/src/superlocalmemory/mcp/tools_learning.py +21 -10
  115. package/src/superlocalmemory/mcp/tools_loops.py +29 -18
  116. package/src/superlocalmemory/mcp/tools_mesh.py +8 -0
  117. package/src/superlocalmemory/mcp/tools_ops.py +115 -0
  118. package/src/superlocalmemory/mcp/tools_optimize.py +4 -0
  119. package/src/superlocalmemory/mcp/tools_v28.py +10 -3
  120. package/src/superlocalmemory/mcp/tools_v3.py +34 -14
  121. package/src/superlocalmemory/mcp/tools_v33.py +18 -33
  122. package/src/superlocalmemory/mesh/broker.py +124 -46
  123. package/src/superlocalmemory/mesh/broker_security.py +470 -0
  124. package/src/superlocalmemory/mesh/discovery.py +365 -0
  125. package/src/superlocalmemory/mesh/lock_protocol.py +313 -0
  126. package/src/superlocalmemory/mesh/node_identity.py +97 -0
  127. package/src/superlocalmemory/mesh/outbox_remote.py +429 -0
  128. package/src/superlocalmemory/mesh/remote_sync.py +511 -28
  129. package/src/superlocalmemory/mesh/state_sync.py +286 -0
  130. package/src/superlocalmemory/optimize/config/store.py +45 -0
  131. package/src/superlocalmemory/parameterization/cross_project.py +12 -0
  132. package/src/superlocalmemory/parameterization/prompt_injector.py +13 -11
  133. package/src/superlocalmemory/parameterization/prompt_lifecycle.py +8 -2
  134. package/src/superlocalmemory/parameterization/workflow_miner.py +17 -0
  135. package/src/superlocalmemory/retrieval/ann_index.py +5 -0
  136. package/src/superlocalmemory/retrieval/bm25_channel.py +49 -2
  137. package/src/superlocalmemory/retrieval/engine.py +19 -4
  138. package/src/superlocalmemory/retrieval/fusion.py +4 -1
  139. package/src/superlocalmemory/retrieval/hopfield_channel.py +9 -3
  140. package/src/superlocalmemory/retrieval/remote_reranker.py +47 -22
  141. package/src/superlocalmemory/retrieval/reranker.py +32 -1
  142. package/src/superlocalmemory/retrieval/temporal_channel.py +16 -3
  143. package/src/superlocalmemory/retrieval/temporal_utils.py +107 -0
  144. package/src/superlocalmemory/retrieval/temporal_validity_filter.py +155 -42
  145. package/src/superlocalmemory/retrieval/vector_store.py +214 -8
  146. package/src/superlocalmemory/server/api.py +5 -5
  147. package/src/superlocalmemory/server/egress_policy.py +258 -0
  148. package/src/superlocalmemory/server/rbac_enforce.py +32 -0
  149. package/src/superlocalmemory/server/route_mutations.py +20 -0
  150. package/src/superlocalmemory/server/routes/compliance.py +153 -7
  151. package/src/superlocalmemory/server/routes/data_io.py +43 -2
  152. package/src/superlocalmemory/server/routes/events.py +15 -0
  153. package/src/superlocalmemory/server/routes/memories.py +56 -3
  154. package/src/superlocalmemory/server/routes/mesh.py +82 -1
  155. package/src/superlocalmemory/server/routes/mesh_lock.py +54 -0
  156. package/src/superlocalmemory/server/routes/mesh_state.py +63 -0
  157. package/src/superlocalmemory/server/routes/v3_api.py +50 -27
  158. package/src/superlocalmemory/server/routes/ws.py +86 -0
  159. package/src/superlocalmemory/server/ui.py +6 -6
  160. package/src/superlocalmemory/server/unified_daemon.py +942 -119
  161. package/src/superlocalmemory/storage/_migration_internals.py +568 -0
  162. package/src/superlocalmemory/storage/_schema_version.py +110 -0
  163. package/src/superlocalmemory/storage/database.py +329 -24
  164. package/src/superlocalmemory/storage/embedding_migrator.py +246 -51
  165. package/src/superlocalmemory/storage/erasure_fence.py +45 -0
  166. package/src/superlocalmemory/storage/generation_fence.py +63 -0
  167. package/src/superlocalmemory/storage/migration_runner.py +140 -424
  168. package/src/superlocalmemory/storage/migrations/M009_model_lineage.py +40 -0
  169. package/src/superlocalmemory/storage/migrations/M033_projection_transactions.py +148 -0
  170. package/src/superlocalmemory/storage/migrations/M034_obligation_integrity.py +58 -0
  171. package/src/superlocalmemory/storage/migrations/M035_erasure_receipts.py +113 -0
  172. package/src/superlocalmemory/storage/migrations/M036_vector_row_map.py +107 -0
  173. package/src/superlocalmemory/storage/migrations/M037_manifest_hmac_version.py +162 -0
  174. package/src/superlocalmemory/storage/migrations/{M033_learning_feedback_channel.py → M038_learning_feedback_channel.py} +3 -3
  175. package/src/superlocalmemory/storage/migrations/{M034_scene_fact_members.py → M039_scene_fact_members.py} +15 -5
  176. package/src/superlocalmemory/storage/migrations/__init__.py +4 -4
  177. package/src/superlocalmemory/storage/schema.py +10 -2
  178. package/src/superlocalmemory/storage/write_coordinator.py +125 -0
  179. package/src/superlocalmemory/trust/scorer.py +28 -4
  180. package/src/superlocalmemory/ui/index.html +14 -3
  181. package/src/superlocalmemory/ui/js/auto-settings.js +12 -1
  182. package/src/superlocalmemory/ui/js/brain.js +6 -4
  183. package/src/superlocalmemory/ui/js/compliance.js +66 -12
  184. package/src/superlocalmemory/ui/js/dashboard.js +13 -3
  185. package/src/superlocalmemory/ui/js/feedback.js +8 -2
  186. package/src/superlocalmemory/ui/js/lifecycle.js +7 -1
  187. package/src/superlocalmemory/ui/js/modal.js +272 -5
  188. package/src/superlocalmemory/ui/js/od-backup.js +9 -2
  189. package/src/superlocalmemory/ui/js/od-compliance-ext.js +301 -0
  190. package/src/superlocalmemory/ui/js/od-operations.js +154 -23
  191. package/src/superlocalmemory/ui/js/od-ops-health.js +417 -0
  192. package/src/superlocalmemory/ui/js/od-optimize.js +35 -21
  193. package/src/superlocalmemory/ui/js/od-team.js +9 -2
  194. package/src/superlocalmemory/ui/js/optimize.js +13 -16
  195. package/src/superlocalmemory/ui/js/profiles.js +7 -3
  196. package/src/superlocalmemory/ui/js/settings.js +7 -1
  197. package/src/superlocalmemory/vector/lancedb_backend.py +19 -9
  198. package/src/superlocalmemory/attribution/mathematical_dna.py +0 -235
  199. package/src/superlocalmemory/cli/post_install.py +0 -114
  200. package/src/superlocalmemory/core/clock_monitor.py +0 -45
  201. package/src/superlocalmemory/core/db_pool.py +0 -80
  202. package/src/superlocalmemory/core/error_catalog.py +0 -113
  203. package/src/superlocalmemory/core/loop_watchdog.py +0 -56
  204. package/src/superlocalmemory/core/priority_queue.py +0 -61
  205. package/src/superlocalmemory/core/pruning_engine.py +0 -216
  206. package/src/superlocalmemory/core/queue_dispatcher.py +0 -73
  207. package/src/superlocalmemory/core/slmignore.py +0 -125
  208. package/src/superlocalmemory/infra/heartbeat_monitor.py +0 -140
  209. package/src/superlocalmemory/infra/webhook_dispatcher.py +0 -247
  210. package/src/superlocalmemory/learning/quantization_scheduler.py +0 -320
  211. package/src/superlocalmemory/storage/access_control.py +0 -182
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: slm-profile
3
+ description: Workspace isolation and runtime profile switching for SuperLocalMemory. Each profile is a fully independent memory namespace — separate facts, code graphs, and tool sets. Use switch_profile (MCP, requires code/full/power profile) to change the active workspace without restarting. Check the active profile with slm status. Required when working across multiple projects, clients, or tenants.
4
+ when_to_use: |
5
+ - "Switch to my work profile"
6
+ - "Use the code profile for this session"
7
+ - "What profile am I currently in?"
8
+ - "I need mesh tools — switch to full profile"
9
+ - "Load the devops workspace"
10
+ - Multi-project workflows needing memory isolation
11
+ - Switching between personal and team workspaces
12
+ - Enabling additional MCP tools by activating a richer profile
13
+ allowed-tools: switch_profile, Bash
14
+ ---
15
+
16
+ # slm-profile — Workspace Isolation and Profile Switching
17
+
18
+ A profile is a fully isolated memory workspace. Each profile has its own:
19
+ - Memory facts (nothing bleeds across profiles by default)
20
+ - Code graph index (separate per repo/project)
21
+ - Active MCP tool set (determined by profile tier)
22
+ - Retention policy and decay settings
23
+
24
+ Profiles are the right tool when you have genuinely separate contexts: a personal
25
+ project, a client engagement, a production vs staging environment.
26
+
27
+ ---
28
+
29
+ ## Available profiles and their tool sets
30
+
31
+ | Profile | Tools | When to use |
32
+ |---------|-------|-------------|
33
+ | `core` | 14 tools — remember, recall, search, session, optimize | Minimal footprint, no code tools |
34
+ | `code` | 24 tools — core + 6 code-graph tools + switch_profile + 3 bounded-loop tools | Default for IDE/coding agents |
35
+ | `full` | 42 tools — code + all memory ops + mesh + bounded loops | Multi-session, team workflows |
36
+ | `power` | 54 tools — full + governance + behavioral tools | Enterprise, admin, audit use cases |
37
+ | `mesh` | 8 tools — mesh coordination only | Lightweight cross-session signalling |
38
+
39
+ The profile is set at MCP server startup via `SLM_MCP_PROFILE` in the MCP config.
40
+ `switch_profile` lets you change it at runtime without a restart.
41
+
42
+ ---
43
+
44
+ ## Checking the active profile
45
+
46
+ ```bash
47
+ slm status --json
48
+ ```
49
+
50
+ The `profile` field in the output is the currently active profile name.
51
+
52
+ Or via MCP (works in any profile):
53
+
54
+ ```bash
55
+ slm status
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Switching profiles at runtime (v3.8.0+)
61
+
62
+ `switch_profile` is available in `code`, `full`, and `power` profiles.
63
+
64
+ ```
65
+ switch_profile(
66
+ profile: str, # one of: "core", "code", "full", "power", "mesh"
67
+ )
68
+ ```
69
+
70
+ ### Example: activate full profile to access mesh tools
71
+
72
+ ```
73
+ # You started in code profile but need mesh coordination
74
+ switch_profile(profile="full")
75
+
76
+ # Now mesh_peers, mesh_send, mesh_inbox, etc. are available
77
+ mesh_peers()
78
+ ```
79
+
80
+ ### Example: switch workspaces
81
+
82
+ ```
83
+ # Switch from personal to work workspace
84
+ switch_profile(profile="work-project")
85
+ ```
86
+
87
+ Wait — profile names and workspace names are distinct concepts:
88
+ - **Profile tier** (`core`, `code`, `full`, `power`, `mesh`) controls which MCP
89
+ tools are registered.
90
+ - **Workspace / data directory** (`SLM_DATA_DIR`) controls which memory database
91
+ is used.
92
+
93
+ `switch_profile` changes the **tool tier** within the current workspace. To
94
+ switch to a completely different memory database (workspace), you need to change
95
+ `SLM_DATA_DIR` — this requires restarting the MCP server or using a separately
96
+ configured MCP server instance.
97
+
98
+ ---
99
+
100
+ ## Configuring the initial profile
101
+
102
+ In your `.mcp.json` (Claude Code) or `.codex/config.toml` (Codex):
103
+
104
+ ```json
105
+ "env": {
106
+ "SLM_MCP_PROFILE": "code",
107
+ "SLM_DATA_DIR": "~/.superlocalmemory"
108
+ }
109
+ ```
110
+
111
+ Profile aliases from older versions still resolve: `code20` → `code`,
112
+ `full38` → `full`, `power50` → `power`. Stale configs get a startup warning
113
+ but continue to work.
114
+
115
+ ---
116
+
117
+ ## Profile isolation guarantees
118
+
119
+ - `recall` returns only memories in the active profile (plus opt-in shared/global
120
+ facts — see `slm-scope`).
121
+ - `remember` writes to the active profile only unless `scope="shared"/"global"`.
122
+ - Code graph tools (`build_code_graph`, `get_blast_radius`, etc.) index into the
123
+ active profile's graph store.
124
+ - KV cache entries are namespaced per profile — switching profiles gives you a
125
+ clean cache.
126
+
127
+ ---
128
+
129
+ ## Multiple concurrent profiles
130
+
131
+ You can run multiple SLM MCP server instances simultaneously, each pointed at a
132
+ different `SLM_DATA_DIR`, to serve different workspaces in the same IDE session.
133
+ Name them differently in your MCP config (e.g. `superlocalmemory-personal` and
134
+ `superlocalmemory-work`) and route tool calls to the appropriate server.
135
+
136
+ ---
137
+
138
+ ## Related skills
139
+
140
+ - `slm-scope` — opt-in fact sharing across profiles (personal/shared/global)
141
+ - `slm-graph` — code-graph tools available in code/full/power profiles
142
+ - `slm-mesh` — mesh tools available in full/power/mesh profiles
143
+ - `slm-status` — check active profile name and tool inventory
144
+ - `slm-governance` — enterprise role-based access to profiles
145
+
146
+ ---
147
+
148
+ *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
@@ -236,4 +236,4 @@ before recalling, then switch back. See `slm-profile` for workspace switching.
236
236
 
237
237
  ---
238
238
 
239
- *SuperLocalMemory v3.8.14 · Qualixar · AGPL-3.0-or-later*
239
+ *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
@@ -238,4 +238,4 @@ different workspace, use `switch_profile` first. See `slm-profile`.
238
238
 
239
239
  ---
240
240
 
241
- *SuperLocalMemory v3.8.14 · Qualixar · AGPL-3.0-or-later*
241
+ *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: slm-scope
3
+ description: Controls memory visibility across profiles — personal (private, default), shared (selected profiles), or global (all profiles on this machine). Default is always personal. Only change scope when the user explicitly asks to share a memory across workspaces. Works with both remember (write scope) and recall (read scope flags).
4
+ when_to_use: |
5
+ - "Share this memory with the team profile"
6
+ - "Store this globally so all my agents can see it"
7
+ - "Recall anything shared from the work profile"
8
+ - "Can other agents on this machine see my memories?"
9
+ - User explicitly asks to cross-profile share a fact or see shared facts
10
+ - Enterprise setup where multiple profiles collaborate
11
+ allowed-tools: remember, recall, search, list_recent, Bash
12
+ ---
13
+
14
+ # slm-scope — Memory Scope and Sharing Model
15
+
16
+ SuperLocalMemory is profile-isolated by default. Every profile is a fully
17
+ independent memory namespace. The scope model adds controlled, opt-in sharing
18
+ between profiles on the same machine — it is never active unless you explicitly
19
+ set it.
20
+
21
+ ---
22
+
23
+ ## The Three Scopes
24
+
25
+ | Scope | Visibility | When to use |
26
+ |-------|-----------|-------------|
27
+ | `personal` | Active profile only | Default — all facts. Never set explicitly. |
28
+ | `shared` | Active profile + `shared_with` profiles | Team handoffs, shared project context |
29
+ | `global` | Every profile on this machine | Machine-wide conventions, org-wide rules |
30
+
31
+ **The default is always `personal`.** A fact stored without a `scope` argument
32
+ is private to the profile that stored it. Recall without scope flags returns only
33
+ personal facts. This is identical to single-profile SLM.
34
+
35
+ ---
36
+
37
+ ## Opt-in is mandatory
38
+
39
+ Never set `scope="shared"` or `scope="global"` (or the recall equivalents
40
+ `include_shared`, `include_global`) unless the user explicitly asks you to share
41
+ or read across profiles. This is a hard rule — scope expansion is an action with
42
+ team-wide or machine-wide impact, and it must always be user-initiated.
43
+
44
+ ---
45
+
46
+ ## Writing a shared or global fact
47
+
48
+ ### share with specific profiles
49
+
50
+ ```
51
+ remember(
52
+ content="API gateway rate limit is 1000 req/min per client",
53
+ tags="api,limits,ops",
54
+ project="platform",
55
+ importance=8,
56
+ session_id="<sid>",
57
+ scope="shared",
58
+ shared_with="devops-profile,backend-profile",
59
+ )
60
+ ```
61
+
62
+ `shared_with` is a comma-separated list of profile IDs that should be able to
63
+ recall this fact. Use `slm status` to see the current profile name — that is the
64
+ `profile_id` to supply.
65
+
66
+ ### share with all profiles on the machine
67
+
68
+ ```
69
+ remember(
70
+ content="All services must enforce TLS 1.3 minimum",
71
+ tags="security,tls,global",
72
+ project="infra",
73
+ importance=9,
74
+ session_id="<sid>",
75
+ scope="global",
76
+ )
77
+ ```
78
+
79
+ `scope="global"` makes the fact visible to every profile on this machine. Use
80
+ this only for machine-wide conventions (security rules, org-wide constraints).
81
+
82
+ ---
83
+
84
+ ## Reading shared or global facts
85
+
86
+ By default, `recall` returns only the active profile's personal facts. To surface
87
+ shared and global facts, pass the opt-in flags:
88
+
89
+ ```
90
+ recall(
91
+ query="rate limiting rules",
92
+ limit=20,
93
+ include_global=True, # include global-scope facts
94
+ include_shared=True, # include facts shared with this profile
95
+ session_id="<sid>",
96
+ )
97
+ ```
98
+
99
+ You can opt in to either or both flags independently. Only the active profile's
100
+ permitted shared facts are returned — you cannot read another profile's personal
101
+ facts.
102
+
103
+ ### CLI equivalents
104
+
105
+ ```bash
106
+ # Recall with global facts included
107
+ slm recall "rate limiting rules" --include-global
108
+
109
+ # Recall with shared facts included
110
+ slm recall "rate limiting rules" --include-shared
111
+
112
+ # Both
113
+ slm recall "rate limiting rules" --include-global --include-shared
114
+
115
+ # Store a global fact
116
+ slm remember "TLS 1.3 minimum" --scope global
117
+
118
+ # Store a shared fact (shared-with is a comma-separated list of profile IDs)
119
+ slm remember "API rate limit 1000/min" --scope shared --shared-with devops,backend
120
+ ```
121
+
122
+ CLI flags verified in source: `--include-global` / `--no-global`, `--include-shared` / `--no-shared`,
123
+ `--scope personal|shared|global`, `--shared-with <profile-ids>`.
124
+
125
+ ---
126
+
127
+ ## Configuring scope defaults
128
+
129
+ Per-profile defaults live in `mode_a/b/c.json` configuration. To make a profile
130
+ always include global facts without passing flags each time:
131
+
132
+ ```json
133
+ {
134
+ "recall": {
135
+ "include_global": true,
136
+ "include_shared": false
137
+ }
138
+ }
139
+ ```
140
+
141
+ Changing the default requires editing the profile config directly — this is an
142
+ admin-level operation.
143
+
144
+ ---
145
+
146
+ ## Enterprise governance
147
+
148
+ In a governed workspace (admin/member/viewer roles), scope expansion may be
149
+ restricted:
150
+ - **Viewers** cannot write `scope="global"` facts — their writes are always `personal`.
151
+ - **Members** can write `scope="shared"` with profiles in their access list.
152
+ - **Admins** can write `scope="global"` unrestricted.
153
+
154
+ See `slm-governance` for the full enterprise behavior model.
155
+
156
+ ---
157
+
158
+ ## Scope deletion and retention
159
+
160
+ A `scope="global"` fact deleted by one profile is deleted for all profiles. A
161
+ `scope="shared"` fact is deleted from all profiles that had access to it.
162
+ Use `slm forget "<query>" --dry-run` before any deletion involving shared facts
163
+ to review the impact. See `slm-remember` for the full deletion discipline.
164
+
165
+ ---
166
+
167
+ ## Related skills
168
+
169
+ - `slm-remember` — full fact storage reference including scope parameters
170
+ - `slm-recall` — full retrieval reference including include_global/include_shared
171
+ - `slm-profile` — what a profile is and how to switch between them
172
+ - `slm-governance` — enterprise role restrictions on scope
173
+
174
+ ---
175
+
176
+ *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
@@ -227,4 +227,4 @@ explicitly and call `recall` with `include_global`/`include_shared` after
227
227
 
228
228
  ---
229
229
 
230
- *SuperLocalMemory v3.8.14 · Qualixar · AGPL-3.0-or-later*
230
+ *SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later*
@@ -163,4 +163,4 @@ multi-profile setup. To switch the active profile, see `slm-profile`.
163
163
 
164
164
  ---
165
165
 
166
- SuperLocalMemory v3.8.14 · Qualixar · AGPL-3.0-or-later
166
+ SuperLocalMemory v4.0.0 · Qualixar · AGPL-3.0-or-later
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "superlocalmemory"
3
- version = "3.8.14"
3
+ version = "4.0.0"
4
4
  description = "Local-first agent memory with auditable hybrid retrieval"
5
5
  readme = "README.md"
6
6
  license = "AGPL-3.0-or-later"
@@ -16,7 +16,6 @@ keywords = [
16
16
  classifiers = [
17
17
  "Development Status :: 4 - Beta",
18
18
  "Intended Audience :: Developers",
19
- "Operating System :: OS Independent",
20
19
  "Operating System :: MacOS",
21
20
  "Operating System :: Microsoft :: Windows",
22
21
  "Operating System :: POSIX :: Linux",
@@ -37,7 +36,7 @@ dependencies = [
37
36
  "numpy==2.4.4",
38
37
  "scipy==1.17.1",
39
38
  "networkx==3.6.1",
40
- "mcp==1.28.1",
39
+ "mcp==2.0.0",
41
40
  "python-dateutil==2.9.0.post0",
42
41
  "rank-bm25==0.2.2",
43
42
  "vadersentiment==3.3.2",
@@ -63,7 +62,7 @@ dependencies = [
63
62
  # Keep this direct: portalocker also needs pywin32 today, but capture must
64
63
  # not depend on that transitive implementation detail.
65
64
  "pywin32==311; sys_platform == 'win32'",
66
- "cryptography==48.0.1",
65
+ "cryptography==50.0.0",
67
66
  # Semantic search + cross-encoder reranker. Do NOT use
68
67
  # sentence-transformers[onnx] — its extras pull optimum which
69
68
  # overrides the sentence-transformers pin via transitive deps.
@@ -91,6 +90,9 @@ dependencies = [
91
90
  # the ~560MB model downloads on first setup/warmup (fail-open). Verified the
92
91
  # pin does NOT disturb the transformers/torch/numpy pins above.
93
92
  "llmlingua==0.2.2",
93
+ # LLMLingua pulls NLTK transitively. Pin the patched release so clean
94
+ # installs cannot resolve to the vulnerable 3.9.x line.
95
+ "nltk==3.10.0",
94
96
  ]
95
97
 
96
98
  [project.optional-dependencies]
@@ -173,9 +175,14 @@ superlocalmemory = ["ui/**/*", "optimize/NOTICE"]
173
175
  [tool.setuptools.data-files]
174
176
  "share/superlocalmemory/codex/skills/slm-cache" = ["plugin-src/skills/slm-cache/SKILL.md"]
175
177
  "share/superlocalmemory/codex/skills/slm-compress" = ["plugin-src/skills/slm-compress/SKILL.md"]
178
+ "share/superlocalmemory/codex/skills/slm-governance" = ["plugin-src/skills/slm-governance/SKILL.md"]
176
179
  "share/superlocalmemory/codex/skills/slm-graph" = ["plugin-src/skills/slm-graph/SKILL.md"]
180
+ "share/superlocalmemory/codex/skills/slm-loop" = ["plugin-src/skills/slm-loop/SKILL.md"]
181
+ "share/superlocalmemory/codex/skills/slm-mesh" = ["plugin-src/skills/slm-mesh/SKILL.md"]
182
+ "share/superlocalmemory/codex/skills/slm-profile" = ["plugin-src/skills/slm-profile/SKILL.md"]
177
183
  "share/superlocalmemory/codex/skills/slm-recall" = ["plugin-src/skills/slm-recall/SKILL.md"]
178
184
  "share/superlocalmemory/codex/skills/slm-remember" = ["plugin-src/skills/slm-remember/SKILL.md"]
185
+ "share/superlocalmemory/codex/skills/slm-scope" = ["plugin-src/skills/slm-scope/SKILL.md"]
179
186
  "share/superlocalmemory/codex/skills/slm-session" = ["plugin-src/skills/slm-session/SKILL.md"]
180
187
  "share/superlocalmemory/codex/skills/slm-status" = ["plugin-src/skills/slm-status/SKILL.md"]
181
188
  "share/superlocalmemory/portable-kit/rules" = ["plugin-src/rules/AGENTS.md"]
@@ -32,7 +32,7 @@ if "OMP_NUM_THREADS" not in os.environ:
32
32
  os.environ["OMP_NUM_THREADS"] = "2"
33
33
  # ---------------------------------------------------------------------------
34
34
 
35
- __version__ = "3.8.14"
35
+ __version__ = "4.0.0"
36
36
 
37
37
  _REQUIRED_VERSIONS = {
38
38
  "sentence_transformers": "5.3.0",