superlocalmemory 3.4.16 → 3.4.18

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 (83) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -3
  3. package/pyproject.toml +10 -1
  4. package/src/superlocalmemory/cli/setup_wizard.py +30 -0
  5. package/src/superlocalmemory/server/routes/entity.py +5 -9
  6. package/src/superlocalmemory/server/routes/helpers.py +120 -15
  7. package/src/superlocalmemory/server/routes/ingest.py +2 -3
  8. package/src/superlocalmemory/server/routes/v3_api.py +42 -2
  9. package/src/superlocalmemory/server/unified_daemon.py +21 -11
  10. package/src/superlocalmemory.egg-info/PKG-INFO +5 -2
  11. package/src/superlocalmemory.egg-info/requires.txt +3 -0
  12. package/docs/ARCHITECTURE.md +0 -149
  13. package/docs/api-reference.md +0 -284
  14. package/docs/auto-memory.md +0 -150
  15. package/docs/cli-reference.md +0 -327
  16. package/docs/cloud-backup.md +0 -174
  17. package/docs/compliance.md +0 -191
  18. package/docs/configuration.md +0 -182
  19. package/docs/getting-started.md +0 -102
  20. package/docs/ide-setup.md +0 -261
  21. package/docs/mcp-tools.md +0 -220
  22. package/docs/migration-from-v2.md +0 -170
  23. package/docs/profiles.md +0 -173
  24. package/docs/screenshots/01-dashboard-main.png +0 -0
  25. package/docs/screenshots/02-knowledge-graph.png +0 -0
  26. package/docs/screenshots/03-math-health.png +0 -0
  27. package/docs/screenshots/03-patterns-learning.png +0 -0
  28. package/docs/screenshots/04-learning-dashboard.png +0 -0
  29. package/docs/screenshots/04-recall-lab.png +0 -0
  30. package/docs/screenshots/05-behavioral-analysis.png +0 -0
  31. package/docs/screenshots/05-trust-dashboard.png +0 -0
  32. package/docs/screenshots/06-graph-communities.png +0 -0
  33. package/docs/screenshots/06-settings.png +0 -0
  34. package/docs/screenshots/07-memories-blurred.png +0 -0
  35. package/docs/skill-evolution.md +0 -256
  36. package/docs/troubleshooting.md +0 -310
  37. package/docs/v2-archive/ACCESSIBILITY.md +0 -291
  38. package/docs/v2-archive/ARCHITECTURE.md +0 -886
  39. package/docs/v2-archive/CLI-COMMANDS-REFERENCE.md +0 -425
  40. package/docs/v2-archive/COMPRESSION-README.md +0 -390
  41. package/docs/v2-archive/FRAMEWORK-INTEGRATIONS.md +0 -300
  42. package/docs/v2-archive/MCP-MANUAL-SETUP.md +0 -775
  43. package/docs/v2-archive/MCP-TROUBLESHOOTING.md +0 -787
  44. package/docs/v2-archive/PATTERN-LEARNING.md +0 -228
  45. package/docs/v2-archive/PROFILES-GUIDE.md +0 -453
  46. package/docs/v2-archive/RESET-GUIDE.md +0 -353
  47. package/docs/v2-archive/SEARCH-ENGINE-V2.2.0.md +0 -749
  48. package/docs/v2-archive/SEARCH-INTEGRATION-GUIDE.md +0 -502
  49. package/docs/v2-archive/UI-SERVER.md +0 -262
  50. package/docs/v2-archive/UNIVERSAL-INTEGRATION.md +0 -488
  51. package/docs/v2-archive/V2.2.0-OPTIONAL-SEARCH.md +0 -666
  52. package/docs/v2-archive/WINDOWS-INSTALL-README.txt +0 -34
  53. package/docs/v2-archive/WINDOWS-POST-INSTALL.txt +0 -45
  54. package/docs/v2-archive/example_graph_usage.py +0 -146
  55. package/ui/index.html +0 -1879
  56. package/ui/js/agents.js +0 -192
  57. package/ui/js/auto-settings.js +0 -399
  58. package/ui/js/behavioral.js +0 -276
  59. package/ui/js/clusters.js +0 -206
  60. package/ui/js/compliance.js +0 -252
  61. package/ui/js/core.js +0 -246
  62. package/ui/js/dashboard.js +0 -110
  63. package/ui/js/events.js +0 -178
  64. package/ui/js/fact-detail.js +0 -92
  65. package/ui/js/feedback.js +0 -333
  66. package/ui/js/graph-core.js +0 -447
  67. package/ui/js/graph-filters.js +0 -220
  68. package/ui/js/graph-interactions.js +0 -351
  69. package/ui/js/graph-ui.js +0 -214
  70. package/ui/js/ide-status.js +0 -102
  71. package/ui/js/init.js +0 -45
  72. package/ui/js/learning.js +0 -435
  73. package/ui/js/lifecycle.js +0 -298
  74. package/ui/js/math-health.js +0 -98
  75. package/ui/js/memories.js +0 -264
  76. package/ui/js/modal.js +0 -357
  77. package/ui/js/patterns.js +0 -93
  78. package/ui/js/profiles.js +0 -236
  79. package/ui/js/recall-lab.js +0 -292
  80. package/ui/js/search.js +0 -59
  81. package/ui/js/settings.js +0 -224
  82. package/ui/js/timeline.js +0 -32
  83. package/ui/js/trust-dashboard.js +0 -73
package/docs/mcp-tools.md DELETED
@@ -1,220 +0,0 @@
1
- # MCP Tools Reference
2
- > SuperLocalMemory V3 Documentation
3
- > https://superlocalmemory.com | Part of Qualixar
4
-
5
- SuperLocalMemory exposes 24 tools and 6 resources via the Model Context Protocol (MCP). Any MCP-compatible AI assistant can use these automatically.
6
-
7
- ---
8
-
9
- ## Core Tools
10
-
11
- ### `remember`
12
-
13
- Store a new memory.
14
-
15
- | Parameter | Type | Required | Description |
16
- |-----------|------|:--------:|-------------|
17
- | `content` | string | Yes | The text to remember |
18
- | `tags` | string | No | Comma-separated tags |
19
- | `metadata` | object | No | Additional key-value metadata |
20
-
21
- ### `recall`
22
-
23
- Search memories by natural language query.
24
-
25
- | Parameter | Type | Required | Description |
26
- |-----------|------|:--------:|-------------|
27
- | `query` | string | Yes | Natural language search query |
28
- | `limit` | number | No | Max results (default: 10) |
29
-
30
- ### `search`
31
-
32
- Search memories with filters. More control than `recall`.
33
-
34
- | Parameter | Type | Required | Description |
35
- |-----------|------|:--------:|-------------|
36
- | `query` | string | Yes | Search query |
37
- | `limit` | number | No | Max results (default: 10) |
38
- | `tags` | string | No | Filter by tags |
39
- | `before` | string | No | Filter by date (ISO format) |
40
- | `after` | string | No | Filter by date (ISO format) |
41
-
42
- ### `fetch`
43
-
44
- Retrieve a specific memory by ID.
45
-
46
- | Parameter | Type | Required | Description |
47
- |-----------|------|:--------:|-------------|
48
- | `id` | number | Yes | Memory ID |
49
-
50
- ### `list_recent`
51
-
52
- List the most recently stored memories.
53
-
54
- | Parameter | Type | Required | Description |
55
- |-----------|------|:--------:|-------------|
56
- | `limit` | number | No | Max results (default: 20) |
57
-
58
- ### `get_status`
59
-
60
- Returns system status: mode, profile, memory count, health, database path.
61
-
62
- *No parameters.*
63
-
64
- ### `build_graph`
65
-
66
- Rebuild the entity relationship graph from stored memories. Useful after bulk imports.
67
-
68
- *No parameters.*
69
-
70
- ### `switch_profile`
71
-
72
- Switch to a different memory profile.
73
-
74
- | Parameter | Type | Required | Description |
75
- |-----------|------|:--------:|-------------|
76
- | `profile` | string | Yes | Profile name to switch to |
77
-
78
- ### `backup_status`
79
-
80
- Check the status of automatic backups.
81
-
82
- *No parameters.*
83
-
84
- ### `memory_used`
85
-
86
- Return memory usage statistics: total memories, database size, per-profile counts.
87
-
88
- *No parameters.*
89
-
90
- ### `get_learned_patterns`
91
-
92
- Return patterns the system has learned from your usage (e.g., preferred technologies, coding conventions).
93
-
94
- | Parameter | Type | Required | Description |
95
- |-----------|------|:--------:|-------------|
96
- | `limit` | number | No | Max patterns to return (default: 10) |
97
-
98
- ### `correct_pattern`
99
-
100
- Correct a learned pattern that is wrong or outdated.
101
-
102
- | Parameter | Type | Required | Description |
103
- |-----------|------|:--------:|-------------|
104
- | `pattern_id` | number | Yes | ID of the pattern to correct |
105
- | `correction` | string | Yes | The corrected pattern text |
106
-
107
- ### `get_attribution`
108
-
109
- Return attribution and provenance information for a specific memory.
110
-
111
- | Parameter | Type | Required | Description |
112
- |-----------|------|:--------:|-------------|
113
- | `id` | number | Yes | Memory ID |
114
-
115
- ## V2.8 Tools
116
-
117
- ### `report_outcome`
118
-
119
- Report the outcome of using a memory (was it helpful?). Feeds the learning system.
120
-
121
- | Parameter | Type | Required | Description |
122
- |-----------|------|:--------:|-------------|
123
- | `memory_id` | number | Yes | ID of the memory used |
124
- | `outcome` | string | Yes | `"helpful"`, `"wrong"`, or `"outdated"` |
125
- | `context` | string | No | Additional context about the outcome |
126
-
127
- ### `get_lifecycle_status`
128
-
129
- Return lifecycle status for memories (Active, Warm, Cold, Archived).
130
-
131
- | Parameter | Type | Required | Description |
132
- |-----------|------|:--------:|-------------|
133
- | `limit` | number | No | Max results (default: 20) |
134
- | `status` | string | No | Filter by lifecycle stage |
135
-
136
- ### `set_retention_policy`
137
-
138
- Apply a retention policy to the current profile.
139
-
140
- | Parameter | Type | Required | Description |
141
- |-----------|------|:--------:|-------------|
142
- | `policy` | string | Yes | Policy name: `"indefinite"`, `"gdpr-30d"`, `"hipaa-7y"`, or `"custom"` |
143
- | `days` | number | No | Days for custom policy |
144
-
145
- ### `compact_memories`
146
-
147
- Merge redundant memories and optimize storage.
148
-
149
- *No parameters.*
150
-
151
- ### `get_behavioral_patterns`
152
-
153
- Return behavioral patterns observed across your usage (e.g., you always check docs before coding).
154
-
155
- | Parameter | Type | Required | Description |
156
- |-----------|------|:--------:|-------------|
157
- | `limit` | number | No | Max patterns to return (default: 10) |
158
-
159
- ### `audit_trail`
160
-
161
- Return audit log entries. Each entry is hash-chained for tamper detection.
162
-
163
- | Parameter | Type | Required | Description |
164
- |-----------|------|:--------:|-------------|
165
- | `limit` | number | No | Max entries (default: 50) |
166
- | `action` | string | No | Filter by action type: `"store"`, `"recall"`, `"delete"` |
167
-
168
- ## V3 Tools
169
-
170
- ### `set_mode`
171
-
172
- Switch the operating mode.
173
-
174
- | Parameter | Type | Required | Description |
175
- |-----------|------|:--------:|-------------|
176
- | `mode` | string | Yes | `"a"`, `"b"`, or `"c"` |
177
-
178
- ### `get_mode`
179
-
180
- Return the current operating mode and its configuration.
181
-
182
- *No parameters.*
183
-
184
- ### `health`
185
-
186
- Return health diagnostics for mathematical layers (Fisher-Rao, Sheaf, Langevin), embedding model, and database.
187
-
188
- *No parameters.*
189
-
190
- ### `consistency_check`
191
-
192
- Run contradiction detection across stored memories. Returns pairs of memories that may conflict.
193
-
194
- *No parameters.*
195
-
196
- ### `recall_trace`
197
-
198
- Recall with a full breakdown of how each retrieval channel scored each result.
199
-
200
- | Parameter | Type | Required | Description |
201
- |-----------|------|:--------:|-------------|
202
- | `query` | string | Yes | Search query |
203
- | `limit` | number | No | Max results (default: 10) |
204
-
205
- ## Resources
206
-
207
- MCP resources provide read-only data that AI assistants can access passively.
208
-
209
- | Resource URI | Description |
210
- |-------------|-------------|
211
- | `slm://recent` | The 20 most recently stored memories |
212
- | `slm://stats` | Memory count, database size, mode, profile |
213
- | `slm://clusters` | Topic clusters detected across memories |
214
- | `slm://identity` | Learned user preferences and patterns |
215
- | `slm://learning` | Current state of the adaptive learning system |
216
- | `slm://engagement` | Usage statistics and interaction patterns |
217
-
218
- ---
219
-
220
- *SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
@@ -1,170 +0,0 @@
1
- # Migration from V2
2
- > SuperLocalMemory V3 Documentation
3
- > https://superlocalmemory.com | Part of Qualixar
4
-
5
- Upgrade from SuperLocalMemory V2 to V3. Zero data loss, one command, rollback available.
6
-
7
- ---
8
-
9
- ## What Changed in V3
10
-
11
- | Area | V2 | V3 |
12
- |------|----|----|
13
- | **Retrieval** | Single-channel semantic search | 4-channel: Semantic + BM25 + Entity Graph + Temporal |
14
- | **Modes** | One mode (cloud required for smart features) | Three modes: A (zero-cloud), B (local LLM), C (cloud LLM) |
15
- | **Math layer** | None | Fisher-Rao similarity, Sheaf consistency, Langevin lifecycle |
16
- | **Ingestion** | Basic text storage | 11-step pipeline: entities, facts, emotions, beliefs, graph, and more |
17
- | **Data directory** | `~/.superlocalmemory/` | `~/.superlocalmemory/` (symlink preserves old path) |
18
- | **Consistency** | Manual | Automatic contradiction detection |
19
- | **Recall quality** | Good | Significantly better on complex queries (multi-hop, temporal) |
20
-
21
- **What stays the same:** All CLI commands, MCP tools, IDE integrations, profiles, trust scores, and learned patterns carry forward.
22
-
23
- ## Before You Migrate
24
-
25
- 1. **Update to the latest version:**
26
-
27
- ```bash
28
- npm update -g superlocalmemory
29
- ```
30
-
31
- 2. **Check your current version:**
32
-
33
- ```bash
34
- slm --version
35
- # Should show 3.x.x
36
- ```
37
-
38
- 3. **(Optional) Preview changes:**
39
-
40
- ```bash
41
- slm migrate --dry-run
42
- ```
43
-
44
- This shows exactly what will change without modifying anything.
45
-
46
- ## Run the Migration
47
-
48
- ```bash
49
- slm migrate
50
- ```
51
-
52
- The migration:
53
-
54
- 1. Creates a full backup of your V2 database
55
- 2. Moves data from `~/.superlocalmemory/` to `~/.superlocalmemory/`
56
- 3. Creates a symlink (`~/.superlocalmemory/ -> ~/.superlocalmemory/`) so old IDE configs still work
57
- 4. Extends the database schema with V3 tables (15 new tables)
58
- 5. Re-indexes existing memories for 4-channel retrieval
59
- 6. Sets Mode A as default (zero breaking changes)
60
- 7. Verifies integrity
61
-
62
- **Duration:** Under 30 seconds for most databases. Large databases (10,000+ memories) may take 1-2 minutes.
63
-
64
- ## What Gets Preserved
65
-
66
- Everything:
67
-
68
- - All stored memories (content, timestamps, metadata)
69
- - All profiles and their isolation boundaries
70
- - Trust scores and provenance data
71
- - Learned patterns and behavioral data
72
- - Compliance settings and retention policies
73
- - Audit trail (hash-chain intact)
74
- - IDE configurations (via symlink)
75
-
76
- ## What Gets Added
77
-
78
- The migration adds V3 capabilities to your existing data:
79
-
80
- - BM25 token index for keyword search
81
- - Entity graph nodes and edges
82
- - Temporal event entries
83
- - Fisher-Rao similarity metadata
84
- - Sheaf consistency sections
85
- - Langevin lifecycle state
86
-
87
- These are computed from your existing memories during migration.
88
-
89
- ## After Migration
90
-
91
- ### Verify
92
-
93
- ```bash
94
- slm status
95
- ```
96
-
97
- Confirm:
98
- - Mode shows `A` (default after migration)
99
- - Memory count matches your V2 count
100
- - Health shows all green
101
- - Profile is your previous active profile
102
-
103
- ### Try a recall
104
-
105
- ```bash
106
- slm recall "something you stored in V2"
107
- ```
108
-
109
- Results should match or exceed V2 quality. V3's 4-channel retrieval finds memories that V2's single-channel search might have missed.
110
-
111
- ### Explore V3 features
112
-
113
- ```bash
114
- slm trace "your query" # See channel-by-channel breakdown
115
- slm health # Check math layer status
116
- slm consistency # Run contradiction detection
117
- slm mode b # Try local LLM mode (if Ollama installed)
118
- ```
119
-
120
- ## Rollback
121
-
122
- If anything goes wrong, roll back within 30 days:
123
-
124
- ```bash
125
- slm migrate --rollback
126
- ```
127
-
128
- This restores your V2 database from the backup created during migration. The symlink is removed and the original `~/.superlocalmemory/` directory is restored.
129
-
130
- **After 30 days:** The backup is automatically cleaned up. If you need to roll back after 30 days, restore from your own backups.
131
-
132
- ## IDE Configuration Updates
133
-
134
- ### Automatic (recommended)
135
-
136
- The migration preserves your IDE configs via symlink. No IDE reconfiguration needed.
137
-
138
- ### Manual (optional)
139
-
140
- If you want to update your IDE configs to use the new path directly:
141
-
142
- ```bash
143
- slm connect
144
- ```
145
-
146
- This updates all detected IDE configs to point to `~/.superlocalmemory/` instead of relying on the symlink.
147
-
148
- ## FAQ
149
-
150
- **Q: Will my IDE break during migration?**
151
- No. The symlink ensures old paths still work. Your IDE will not notice the change.
152
-
153
- **Q: Do I need to reconfigure my API keys?**
154
- No. API keys are migrated to the new config location automatically.
155
-
156
- **Q: Can I run V2 and V3 side by side?**
157
- No. The migration converts your database in place (with backup). Use `--rollback` if you want to return to V2.
158
-
159
- **Q: What if migration fails halfway?**
160
- The migration is transactional. If any step fails, everything is rolled back automatically. Your V2 data remains untouched.
161
-
162
- **Q: I have multiple profiles. Are they all migrated?**
163
- Yes. All profiles are migrated together. Profile isolation is preserved.
164
-
165
- **Q: How big will my database get after migration?**
166
- The V3 schema adds approximately 20-40% to database size due to the entity graph, BM25 index, and math layer metadata. A 50MB V2 database becomes roughly 60-70MB.
167
-
168
- ---
169
-
170
- *SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
package/docs/profiles.md DELETED
@@ -1,173 +0,0 @@
1
- # Profiles
2
- > SuperLocalMemory V3 Documentation
3
- > https://superlocalmemory.com | Part of Qualixar
4
-
5
- Profiles let you maintain completely isolated memory contexts. Work memories never mix with personal memories. Client A never sees Client B's data.
6
-
7
- ---
8
-
9
- ## What Profiles Are
10
-
11
- A profile is an isolated memory namespace. Each profile has its own:
12
-
13
- - Memories and knowledge graph
14
- - Learned patterns and behavioral data
15
- - Trust scores and provenance records
16
- - Retention policies
17
- - Audit trail
18
-
19
- There is zero data leakage between profiles. Searching in one profile never returns results from another.
20
-
21
- ## Default Profile
22
-
23
- After installation, you have one profile called `default`. All memories go here unless you create and switch to another profile.
24
-
25
- ## Managing Profiles
26
-
27
- ### List profiles
28
-
29
- ```bash
30
- slm profile list
31
- ```
32
-
33
- Output:
34
-
35
- ```
36
- Profiles:
37
- * default (142 memories, active)
38
- work (89 memories)
39
- personal (34 memories)
40
- client-acme (67 memories)
41
- ```
42
-
43
- The `*` marks the active profile.
44
-
45
- ### Create a profile
46
-
47
- ```bash
48
- slm profile create work
49
- slm profile create client-acme
50
- slm profile create personal
51
- ```
52
-
53
- ### Switch profiles
54
-
55
- ```bash
56
- slm profile switch work
57
- ```
58
-
59
- All subsequent `remember`, `recall`, and auto-memory operations use this profile until you switch again.
60
-
61
- ### Delete a profile
62
-
63
- ```bash
64
- slm profile delete old-project
65
- ```
66
-
67
- This permanently deletes all memories in that profile. You will be prompted for confirmation.
68
-
69
- ### Export a profile
70
-
71
- ```bash
72
- slm profile export work > work-backup.json
73
- ```
74
-
75
- ### Import a profile
76
-
77
- ```bash
78
- slm profile import < work-backup.json
79
- ```
80
-
81
- ## Use Cases
82
-
83
- ### Work vs Personal
84
-
85
- ```bash
86
- # Morning: switch to work
87
- slm profile switch work
88
- # Work memories are captured and recalled all day
89
-
90
- # Evening: switch to personal
91
- slm profile switch personal
92
- # Personal project memories are now active
93
- ```
94
-
95
- ### Per-Client Isolation
96
-
97
- For consultants and agencies working across multiple clients:
98
-
99
- ```bash
100
- slm profile create client-alpha
101
- slm profile create client-beta
102
-
103
- # Working on Alpha's project
104
- slm profile switch client-alpha
105
- # Only Alpha's architecture, decisions, and context are available
106
-
107
- # Switch to Beta
108
- slm profile switch client-beta
109
- # Alpha's data is completely invisible
110
- ```
111
-
112
- ### Per-Project Isolation
113
-
114
- ```bash
115
- slm profile create mobile-app
116
- slm profile create backend-api
117
- slm profile create infrastructure
118
- ```
119
-
120
- ### Temporary Profiles
121
-
122
- For experiments or short-term work:
123
-
124
- ```bash
125
- slm profile create experiment-graphql
126
- slm profile switch experiment-graphql
127
- # ... do your experiment ...
128
-
129
- # Done — delete it
130
- slm profile switch default
131
- slm profile delete experiment-graphql
132
- ```
133
-
134
- ## Profile-Specific Settings
135
-
136
- Each profile can have its own retention policy:
137
-
138
- ```bash
139
- slm profile switch client-acme
140
- slm retention set gdpr-30d # GDPR compliance for this client
141
-
142
- slm profile switch internal
143
- slm retention set indefinite # Keep internal memories forever
144
- ```
145
-
146
- ## Using Profiles With CLI Commands
147
-
148
- Most commands operate on the active profile. You can override this per-command:
149
-
150
- ```bash
151
- # Recall from a specific profile without switching
152
- slm recall "database config" --profile client-acme
153
-
154
- # Store to a specific profile without switching
155
- slm remember "Acme uses Aurora PostgreSQL" --profile client-acme
156
- ```
157
-
158
- ## How Profiles Work Internally
159
-
160
- Each profile stores memories in the same SQLite database but with a profile identifier on every row. Queries are filtered by profile at the database level, ensuring complete isolation.
161
-
162
- The entity graph, BM25 index, and all math layer state are also per-profile. Building the graph for one profile does not affect another.
163
-
164
- ## Limits
165
-
166
- - No hard limit on the number of profiles
167
- - Each profile adds minimal overhead (a few KB for metadata)
168
- - Performance is determined by per-profile memory count, not total profiles
169
- - Switching profiles is instant (no data loading required)
170
-
171
- ---
172
-
173
- *SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
Binary file
Binary file
Binary file