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.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -3
- package/pyproject.toml +10 -1
- package/src/superlocalmemory/cli/setup_wizard.py +30 -0
- package/src/superlocalmemory/server/routes/entity.py +5 -9
- package/src/superlocalmemory/server/routes/helpers.py +120 -15
- package/src/superlocalmemory/server/routes/ingest.py +2 -3
- package/src/superlocalmemory/server/routes/v3_api.py +42 -2
- package/src/superlocalmemory/server/unified_daemon.py +21 -11
- package/src/superlocalmemory.egg-info/PKG-INFO +5 -2
- package/src/superlocalmemory.egg-info/requires.txt +3 -0
- package/docs/ARCHITECTURE.md +0 -149
- package/docs/api-reference.md +0 -284
- package/docs/auto-memory.md +0 -150
- package/docs/cli-reference.md +0 -327
- package/docs/cloud-backup.md +0 -174
- package/docs/compliance.md +0 -191
- package/docs/configuration.md +0 -182
- package/docs/getting-started.md +0 -102
- package/docs/ide-setup.md +0 -261
- package/docs/mcp-tools.md +0 -220
- package/docs/migration-from-v2.md +0 -170
- package/docs/profiles.md +0 -173
- package/docs/screenshots/01-dashboard-main.png +0 -0
- package/docs/screenshots/02-knowledge-graph.png +0 -0
- package/docs/screenshots/03-math-health.png +0 -0
- package/docs/screenshots/03-patterns-learning.png +0 -0
- package/docs/screenshots/04-learning-dashboard.png +0 -0
- package/docs/screenshots/04-recall-lab.png +0 -0
- package/docs/screenshots/05-behavioral-analysis.png +0 -0
- package/docs/screenshots/05-trust-dashboard.png +0 -0
- package/docs/screenshots/06-graph-communities.png +0 -0
- package/docs/screenshots/06-settings.png +0 -0
- package/docs/screenshots/07-memories-blurred.png +0 -0
- package/docs/skill-evolution.md +0 -256
- package/docs/troubleshooting.md +0 -310
- package/docs/v2-archive/ACCESSIBILITY.md +0 -291
- package/docs/v2-archive/ARCHITECTURE.md +0 -886
- package/docs/v2-archive/CLI-COMMANDS-REFERENCE.md +0 -425
- package/docs/v2-archive/COMPRESSION-README.md +0 -390
- package/docs/v2-archive/FRAMEWORK-INTEGRATIONS.md +0 -300
- package/docs/v2-archive/MCP-MANUAL-SETUP.md +0 -775
- package/docs/v2-archive/MCP-TROUBLESHOOTING.md +0 -787
- package/docs/v2-archive/PATTERN-LEARNING.md +0 -228
- package/docs/v2-archive/PROFILES-GUIDE.md +0 -453
- package/docs/v2-archive/RESET-GUIDE.md +0 -353
- package/docs/v2-archive/SEARCH-ENGINE-V2.2.0.md +0 -749
- package/docs/v2-archive/SEARCH-INTEGRATION-GUIDE.md +0 -502
- package/docs/v2-archive/UI-SERVER.md +0 -262
- package/docs/v2-archive/UNIVERSAL-INTEGRATION.md +0 -488
- package/docs/v2-archive/V2.2.0-OPTIONAL-SEARCH.md +0 -666
- package/docs/v2-archive/WINDOWS-INSTALL-README.txt +0 -34
- package/docs/v2-archive/WINDOWS-POST-INSTALL.txt +0 -45
- package/docs/v2-archive/example_graph_usage.py +0 -146
- package/ui/index.html +0 -1879
- package/ui/js/agents.js +0 -192
- package/ui/js/auto-settings.js +0 -399
- package/ui/js/behavioral.js +0 -276
- package/ui/js/clusters.js +0 -206
- package/ui/js/compliance.js +0 -252
- package/ui/js/core.js +0 -246
- package/ui/js/dashboard.js +0 -110
- package/ui/js/events.js +0 -178
- package/ui/js/fact-detail.js +0 -92
- package/ui/js/feedback.js +0 -333
- package/ui/js/graph-core.js +0 -447
- package/ui/js/graph-filters.js +0 -220
- package/ui/js/graph-interactions.js +0 -351
- package/ui/js/graph-ui.js +0 -214
- package/ui/js/ide-status.js +0 -102
- package/ui/js/init.js +0 -45
- package/ui/js/learning.js +0 -435
- package/ui/js/lifecycle.js +0 -298
- package/ui/js/math-health.js +0 -98
- package/ui/js/memories.js +0 -264
- package/ui/js/modal.js +0 -357
- package/ui/js/patterns.js +0 -93
- package/ui/js/profiles.js +0 -236
- package/ui/js/recall-lab.js +0 -292
- package/ui/js/search.js +0 -59
- package/ui/js/settings.js +0 -224
- package/ui/js/timeline.js +0 -32
- package/ui/js/trust-dashboard.js +0 -73
package/docs/cli-reference.md
DELETED
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
# CLI Reference
|
|
2
|
-
> SuperLocalMemory V3 Documentation
|
|
3
|
-
> https://superlocalmemory.com | Part of Qualixar
|
|
4
|
-
|
|
5
|
-
Complete reference for the `slm` command-line interface.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Setup & Configuration
|
|
10
|
-
|
|
11
|
-
### `slm setup`
|
|
12
|
-
|
|
13
|
-
Run the interactive setup wizard. Guides you through mode selection, IDE connection, and verification.
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
slm setup
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### `slm mode [a|b|c]`
|
|
20
|
-
|
|
21
|
-
Get or set the operating mode.
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
slm mode # Show current mode
|
|
25
|
-
slm mode a # Zero-cloud (no LLM, no API key)
|
|
26
|
-
slm mode b # Local LLM via Ollama
|
|
27
|
-
slm mode c # Cloud LLM (requires API key)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### `slm provider [set]`
|
|
31
|
-
|
|
32
|
-
Get or set the LLM provider for Mode B/C.
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
slm provider # Show current provider
|
|
36
|
-
slm provider set # Interactive provider selector
|
|
37
|
-
slm provider set openai # Set provider directly
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### `slm connect [ide]`
|
|
41
|
-
|
|
42
|
-
Configure IDE integrations.
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
slm connect # Auto-detect and configure all IDEs
|
|
46
|
-
slm connect cursor # Configure Cursor specifically
|
|
47
|
-
slm connect claude # Configure Claude Code specifically
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Supported IDEs: `claude`, `cursor`, `vscode`, `windsurf`, `gemini`, `jetbrains`, `continue`, `zed`
|
|
51
|
-
|
|
52
|
-
## Memory Operations
|
|
53
|
-
|
|
54
|
-
### `slm remember "content" [options]`
|
|
55
|
-
|
|
56
|
-
Store a memory.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
slm remember "API rate limit is 100 req/min on staging"
|
|
60
|
-
slm remember "Use camelCase for JS, snake_case for Python" --tags "style,convention"
|
|
61
|
-
slm remember "Maria owns the auth service" --tags "team,ownership"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
| Option | Description |
|
|
65
|
-
|--------|-------------|
|
|
66
|
-
| `--tags "a,b"` | Comma-separated tags for categorization |
|
|
67
|
-
| `--profile name` | Store in a specific profile (overrides active profile) |
|
|
68
|
-
|
|
69
|
-
### `slm recall "query" [options]`
|
|
70
|
-
|
|
71
|
-
Search your memories. Returns the most relevant results.
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
slm recall "rate limit"
|
|
75
|
-
slm recall "who owns auth" --limit 5
|
|
76
|
-
slm recall "database config" --profile work
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
| Option | Default | Description |
|
|
80
|
-
|--------|---------|-------------|
|
|
81
|
-
| `--limit N` | 10 | Maximum results to return |
|
|
82
|
-
| `--profile name` | active | Search in a specific profile |
|
|
83
|
-
|
|
84
|
-
### `slm search "query" [options]`
|
|
85
|
-
|
|
86
|
-
Alias for `slm recall`. Same behavior, same options.
|
|
87
|
-
|
|
88
|
-
### `slm forget "query" [options]`
|
|
89
|
-
|
|
90
|
-
Delete memories matching a query.
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
slm forget "old staging credentials"
|
|
94
|
-
slm forget --id 42 # Delete by memory ID
|
|
95
|
-
slm forget --before "2026-01-01" # Delete memories before a date
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
| Option | Description |
|
|
99
|
-
|--------|-------------|
|
|
100
|
-
| `--id N` | Delete a specific memory by ID |
|
|
101
|
-
| `--before "date"` | Delete all memories before this date |
|
|
102
|
-
| `--confirm` | Skip the confirmation prompt |
|
|
103
|
-
|
|
104
|
-
### `slm list [options]`
|
|
105
|
-
|
|
106
|
-
List recent memories.
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
slm list # Last 20 memories
|
|
110
|
-
slm list --limit 50 # Last 50 memories
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## V3 Features
|
|
114
|
-
|
|
115
|
-
### `slm trace "query"`
|
|
116
|
-
|
|
117
|
-
Recall with a channel-by-channel breakdown. Shows how each retrieval channel contributed to the results.
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
slm trace "database port"
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Output shows scores from each channel:
|
|
124
|
-
- Semantic (vector similarity)
|
|
125
|
-
- BM25 (keyword matching)
|
|
126
|
-
- Entity Graph (relationship traversal)
|
|
127
|
-
- Temporal (time-based relevance)
|
|
128
|
-
|
|
129
|
-
### `slm health`
|
|
130
|
-
|
|
131
|
-
Show diagnostics for the mathematical layers.
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
slm health
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Reports status of:
|
|
138
|
-
- Fisher-Rao similarity layer
|
|
139
|
-
- Sheaf consistency layer
|
|
140
|
-
- Langevin lifecycle dynamics
|
|
141
|
-
- Embedding model status
|
|
142
|
-
- Database integrity
|
|
143
|
-
|
|
144
|
-
### `slm consistency`
|
|
145
|
-
|
|
146
|
-
Run a consistency check across your memories. Detects contradictions and outdated information.
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
slm consistency
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Migration
|
|
153
|
-
|
|
154
|
-
### `slm migrate [options]`
|
|
155
|
-
|
|
156
|
-
Migrate a V2 database to V3 format.
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
slm migrate # Run migration
|
|
160
|
-
slm migrate --dry-run # Preview what will change
|
|
161
|
-
slm migrate --rollback # Undo migration (within 30 days)
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
| Option | Description |
|
|
165
|
-
|--------|-------------|
|
|
166
|
-
| `--dry-run` | Show what would change without modifying anything |
|
|
167
|
-
| `--rollback` | Revert to V2 format (backup must exist) |
|
|
168
|
-
|
|
169
|
-
## Profile Management
|
|
170
|
-
|
|
171
|
-
### `slm profile [command]`
|
|
172
|
-
|
|
173
|
-
Manage memory profiles (isolated memory contexts).
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
slm profile list # List all profiles
|
|
177
|
-
slm profile switch work # Switch to "work" profile
|
|
178
|
-
slm profile create client-acme # Create a new profile
|
|
179
|
-
slm profile delete old-project # Delete a profile
|
|
180
|
-
slm profile export work > backup.json # Export a profile
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## System & Maintenance
|
|
184
|
-
|
|
185
|
-
### `slm status`
|
|
186
|
-
|
|
187
|
-
Show system status: mode, profile, memory count, database location, health.
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
slm status
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### `slm compact`
|
|
194
|
-
|
|
195
|
-
Compress and optimize the memory database. Merges redundant memories and reclaims space.
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
slm compact
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### `slm backup`
|
|
202
|
-
|
|
203
|
-
Check backup status or create a manual backup.
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
slm backup # Show backup status
|
|
207
|
-
slm backup create # Create a backup now
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### `slm audit [options]`
|
|
211
|
-
|
|
212
|
-
View the audit trail. Shows all memory operations with timestamps and hash-chain verification.
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
slm audit # Recent audit entries
|
|
216
|
-
slm audit --limit 100 # Last 100 entries
|
|
217
|
-
slm audit --verify # Verify hash-chain integrity
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### `slm retention [policy]`
|
|
221
|
-
|
|
222
|
-
Manage retention policies.
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
slm retention # Show current policy
|
|
226
|
-
slm retention set gdpr-30d # Apply GDPR 30-day policy
|
|
227
|
-
slm retention set hipaa-7y # Apply HIPAA 7-year policy
|
|
228
|
-
slm retention set custom --days 90 # Custom retention period
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## Global Options
|
|
232
|
-
|
|
233
|
-
These options work with any command:
|
|
234
|
-
|
|
235
|
-
| Option | Description |
|
|
236
|
-
|--------|-------------|
|
|
237
|
-
| `--help` | Show help for a command |
|
|
238
|
-
| `--version` | Show SLM version |
|
|
239
|
-
| `--verbose` | Show detailed output |
|
|
240
|
-
| `--json` | Output structured JSON with agent-native envelope (for AI agents, scripts, CI/CD) |
|
|
241
|
-
| `--profile name` | Override the active profile for this command |
|
|
242
|
-
|
|
243
|
-
## Agent-Native JSON Output
|
|
244
|
-
|
|
245
|
-
All data-returning commands support `--json` for structured output. The envelope follows the 2026 agent-native CLI standard:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"success": true,
|
|
250
|
-
"command": "recall",
|
|
251
|
-
"version": "3.0.22",
|
|
252
|
-
"data": {
|
|
253
|
-
"results": [
|
|
254
|
-
{"fact_id": "abc123", "score": 0.87, "content": "Database uses PostgreSQL 16"}
|
|
255
|
-
],
|
|
256
|
-
"count": 1,
|
|
257
|
-
"query_type": "semantic"
|
|
258
|
-
},
|
|
259
|
-
"next_actions": [
|
|
260
|
-
{"command": "slm list --json", "description": "List recent memories"}
|
|
261
|
-
]
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Supported Commands
|
|
266
|
-
|
|
267
|
-
`recall`, `remember`, `list`, `status`, `health`, `trace`, `forget`, `delete`, `update`, `mode`, `profile`, `connect`
|
|
268
|
-
|
|
269
|
-
### Usage with jq
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
# Get first result content
|
|
273
|
-
slm recall "auth" --json | jq '.data.results[0].content'
|
|
274
|
-
|
|
275
|
-
# Get all fact IDs
|
|
276
|
-
slm list --json | jq '.data.results[].fact_id'
|
|
277
|
-
|
|
278
|
-
# Check current mode
|
|
279
|
-
slm status --json | jq '.data.mode'
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
### In CI/CD (GitHub Actions)
|
|
283
|
-
|
|
284
|
-
```yaml
|
|
285
|
-
- name: Store deployment info
|
|
286
|
-
run: slm remember "Deployed ${{ github.sha }} to production" --json
|
|
287
|
-
|
|
288
|
-
- name: Check memory health
|
|
289
|
-
run: slm status --json | jq -e '.success'
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Examples
|
|
295
|
-
|
|
296
|
-
### Daily workflow
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
# Morning: check what you remembered yesterday
|
|
300
|
-
slm list --limit 10
|
|
301
|
-
|
|
302
|
-
# During work: store a decision
|
|
303
|
-
slm remember "Decided to use WebSocket instead of SSE for real-time updates" --tags "architecture"
|
|
304
|
-
|
|
305
|
-
# Later: recall the decision
|
|
306
|
-
slm recall "real-time communication approach"
|
|
307
|
-
|
|
308
|
-
# End of day: check system health
|
|
309
|
-
slm status
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### Project setup
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
# Create a profile for a new project
|
|
316
|
-
slm profile create mobile-app
|
|
317
|
-
slm profile switch mobile-app
|
|
318
|
-
|
|
319
|
-
# Store project context
|
|
320
|
-
slm remember "React Native 0.76 with Expo SDK 52"
|
|
321
|
-
slm remember "Backend is FastAPI on AWS ECS"
|
|
322
|
-
slm remember "CI/CD via GitHub Actions, deploys on merge to main"
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
*SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
|
package/docs/cloud-backup.md
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# Cloud Backup — Google Drive & GitHub
|
|
2
|
-
|
|
3
|
-
SuperLocalMemory v3.4.10+ can automatically back up your memory databases to **Google Drive** and **GitHub**. All credentials are stored in your OS keychain (macOS Keychain, Windows Credential Locker, or Linux Secret Service) — never in plaintext.
|
|
4
|
-
|
|
5
|
-
## GitHub Backup (Recommended)
|
|
6
|
-
|
|
7
|
-
GitHub backup works out of the box. No additional setup needed beyond a Personal Access Token.
|
|
8
|
-
|
|
9
|
-
### Setup (2 minutes)
|
|
10
|
-
|
|
11
|
-
1. Open the SLM Dashboard: `http://localhost:8765`
|
|
12
|
-
2. Click the **account widget** in the sidebar (bottom), then click the **GitHub icon**
|
|
13
|
-
3. You'll see the "Connect GitHub" form:
|
|
14
|
-
|
|
15
|
-
- **Personal Access Token**: Click [Create one here](https://github.com/settings/tokens/new?scopes=repo&description=SLM+Backup) — this opens GitHub with the `repo` scope pre-selected. Click "Generate token" and copy it.
|
|
16
|
-
- **Repository Name**: Default is `slm-backup`. Change if you want.
|
|
17
|
-
|
|
18
|
-
4. Click **Connect**
|
|
19
|
-
|
|
20
|
-
That's it. SLM will:
|
|
21
|
-
- Verify your token
|
|
22
|
-
- Create a **private** repository (always private — your data is never public)
|
|
23
|
-
- Initialize it with a README
|
|
24
|
-
- Show your GitHub avatar and username in the sidebar
|
|
25
|
-
|
|
26
|
-
### How It Works
|
|
27
|
-
|
|
28
|
-
- Each backup creates a **GitHub Release** with your database files as assets
|
|
29
|
-
- ALL databases are included: memory.db, learning.db, audit_chain.db, code_graph.db, pending.db
|
|
30
|
-
- Only the last **5 releases** are kept — older ones are automatically deleted to prevent storage bloat
|
|
31
|
-
- Backups run in the background — the dashboard never freezes
|
|
32
|
-
|
|
33
|
-
### Restoring from GitHub
|
|
34
|
-
|
|
35
|
-
1. Go to your `slm-backup` repo on GitHub
|
|
36
|
-
2. Click **Releases** in the sidebar
|
|
37
|
-
3. Download the `.db` files from the latest release
|
|
38
|
-
4. Copy them to `~/.superlocalmemory/`
|
|
39
|
-
5. Run `slm restart`
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Google Drive Backup
|
|
44
|
-
|
|
45
|
-
Google Drive backup requires a one-time OAuth client setup through Google Cloud Console. This is a Google requirement for any application that accesses Drive on behalf of users.
|
|
46
|
-
|
|
47
|
-
### Why Is This Needed?
|
|
48
|
-
|
|
49
|
-
Google requires every application to register an "OAuth client" before it can access your Drive. This is a security measure — it ensures you know exactly which application is accessing your data. For GitHub, a simple Personal Access Token is enough, but Google's security model is stricter.
|
|
50
|
-
|
|
51
|
-
### Setup (5 minutes)
|
|
52
|
-
|
|
53
|
-
#### Step 1: Create a Google Cloud Project
|
|
54
|
-
|
|
55
|
-
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
|
|
56
|
-
2. Click the project dropdown (top bar) → **New Project**
|
|
57
|
-
3. Name it anything (e.g., `slm-backup`) → **Create**
|
|
58
|
-
4. Select the new project from the dropdown
|
|
59
|
-
|
|
60
|
-
#### Step 2: Enable APIs
|
|
61
|
-
|
|
62
|
-
1. Go to **APIs & Services** → **Library**
|
|
63
|
-
2. Search for and enable:
|
|
64
|
-
- **Google Drive API**
|
|
65
|
-
- **People API** (for showing your email/name)
|
|
66
|
-
|
|
67
|
-
#### Step 3: Configure OAuth Consent Screen
|
|
68
|
-
|
|
69
|
-
1. Go to **APIs & Services** → **OAuth consent screen**
|
|
70
|
-
2. Select **External** → **Create**
|
|
71
|
-
3. Fill in:
|
|
72
|
-
- **App name**: `SuperLocalMemory` (or anything)
|
|
73
|
-
- **User support email**: your Gmail
|
|
74
|
-
- **Developer contact email**: your Gmail
|
|
75
|
-
4. Click **Save and Continue** through the remaining steps
|
|
76
|
-
5. Go to **Test users** → **Add users** → add your Gmail address
|
|
77
|
-
|
|
78
|
-
#### Step 4: Create OAuth Client
|
|
79
|
-
|
|
80
|
-
1. Go to **APIs & Services** → **Credentials**
|
|
81
|
-
2. Click **Create Credentials** → **OAuth client ID**
|
|
82
|
-
3. Application type: **Web application**
|
|
83
|
-
4. Name: `SLM Dashboard` (or anything)
|
|
84
|
-
5. Under **Authorized redirect URIs**, add:
|
|
85
|
-
```
|
|
86
|
-
http://localhost:8765/api/backup/oauth/google/callback
|
|
87
|
-
```
|
|
88
|
-
6. Click **Create**
|
|
89
|
-
7. Copy the **Client ID** and **Client Secret** (you'll need both)
|
|
90
|
-
|
|
91
|
-
#### Step 5: Connect in SLM
|
|
92
|
-
|
|
93
|
-
1. Open the SLM Dashboard: `http://localhost:8765`
|
|
94
|
-
2. Click the **Google icon** in the sidebar account widget
|
|
95
|
-
3. Paste your **Client ID** and **Client Secret**
|
|
96
|
-
4. Click **Save & Connect Google Drive**
|
|
97
|
-
5. Google's login page opens — sign in and click **Allow**
|
|
98
|
-
6. You'll see "Google Drive Connected!" — close the popup
|
|
99
|
-
|
|
100
|
-
### How It Works
|
|
101
|
-
|
|
102
|
-
- Backups are uploaded to a `SLM-Backup` folder in your Google Drive
|
|
103
|
-
- Files are **replaced in-place** (no duplicates, no storage bloat)
|
|
104
|
-
- ALL databases are backed up, not just memory.db
|
|
105
|
-
- Your OAuth credentials are stored in your OS keychain
|
|
106
|
-
- Backups run in the background
|
|
107
|
-
|
|
108
|
-
### Restoring from Google Drive
|
|
109
|
-
|
|
110
|
-
1. Open Google Drive → `SLM-Backup` folder
|
|
111
|
-
2. Download all `.db` files
|
|
112
|
-
3. Copy them to `~/.superlocalmemory/`
|
|
113
|
-
4. Run `slm restart`
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Sync & Schedule
|
|
118
|
-
|
|
119
|
-
### Manual Sync
|
|
120
|
-
|
|
121
|
-
Click **Sync Now** (cloud upload icon) in the sidebar account widget, or go to **Settings** → **Cloud Backup** → **Sync Now**.
|
|
122
|
-
|
|
123
|
-
### Auto-Backup
|
|
124
|
-
|
|
125
|
-
SLM automatically creates local backups on a schedule (default: weekly). When cloud destinations are connected, backups are also pushed to the cloud after each auto-backup.
|
|
126
|
-
|
|
127
|
-
Configure the schedule in **Settings** → **Backup Configuration**:
|
|
128
|
-
- **Interval**: Daily or Weekly
|
|
129
|
-
- **Max backups**: How many local backups to keep (default: 10)
|
|
130
|
-
|
|
131
|
-
### Export
|
|
132
|
-
|
|
133
|
-
Click the **download icon** in the sidebar to export a compressed `.gz` backup file you can store anywhere.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## What Gets Backed Up
|
|
138
|
-
|
|
139
|
-
| Database | Contents | Typical Size |
|
|
140
|
-
|---|---|---|
|
|
141
|
-
| `memory.db` | Facts, entities, graph edges, embeddings, sessions | 50 MB — 2 GB |
|
|
142
|
-
| `learning.db` | Learning signals, behavioral patterns, ranker data | 0.5 — 5 MB |
|
|
143
|
-
| `audit_chain.db` | Audit trail, compliance provenance | 0.5 — 2 MB |
|
|
144
|
-
| `code_graph.db` | Code knowledge graph (if used) | 0.1 — 10 MB |
|
|
145
|
-
| `pending.db` | Pending operations queue | 0.1 — 1 MB |
|
|
146
|
-
|
|
147
|
-
All databases are backed up using SQLite's `sqlite3.backup()` API, which creates a consistent, atomic snapshot even while the daemon is running.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Security
|
|
152
|
-
|
|
153
|
-
- **GitHub repos are always private** — hardcoded, cannot be changed
|
|
154
|
-
- **Credentials stored in OS keychain** — macOS Keychain, Windows Credential Locker, or Linux Secret Service
|
|
155
|
-
- **Fallback**: On systems without a keychain (headless Linux), credentials are stored in `~/.superlocalmemory/.credentials.json` with `chmod 0600` (owner-only)
|
|
156
|
-
- **Google OAuth tokens** are refresh tokens — they can be revoked from your [Google Account Security page](https://myaccount.google.com/permissions)
|
|
157
|
-
- **GitHub PATs** can be revoked from [GitHub Settings → Tokens](https://github.com/settings/tokens)
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Troubleshooting
|
|
162
|
-
|
|
163
|
-
### "Sync failed" in the sidebar
|
|
164
|
-
Check the destination status in **Settings** → **Cloud Backup**. Common causes:
|
|
165
|
-
- GitHub: PAT expired or revoked → reconnect with a new token
|
|
166
|
-
- Google: OAuth token expired → click "Connect Google Drive" again to re-authorize
|
|
167
|
-
|
|
168
|
-
### Google Drive shows "Connection Failed"
|
|
169
|
-
- Make sure you added yourself as a **test user** in the OAuth consent screen
|
|
170
|
-
- Verify the redirect URI matches exactly: `http://localhost:8765/api/backup/oauth/google/callback`
|
|
171
|
-
- Check that the SLM daemon is running on port 8765
|
|
172
|
-
|
|
173
|
-
### Dashboard freezes during sync
|
|
174
|
-
This was fixed in v3.4.10 — syncs now run in a background thread. If you're on an older version, update: `pip install -U superlocalmemory`
|
package/docs/compliance.md
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# Compliance
|
|
2
|
-
> SuperLocalMemory V3 Documentation
|
|
3
|
-
> https://superlocalmemory.com | Part of Qualixar
|
|
4
|
-
|
|
5
|
-
SuperLocalMemory is designed for organizations that need to meet data protection and privacy regulations. Mode A satisfies the strictest requirements by keeping all data local.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## EU AI Act
|
|
10
|
-
|
|
11
|
-
The EU AI Act (Regulation 2024/1689) establishes requirements for AI systems operating in the European Union.
|
|
12
|
-
|
|
13
|
-
### Mode A: Full Compliance by Architecture
|
|
14
|
-
|
|
15
|
-
In Mode A, SuperLocalMemory operates as a local data retrieval system with zero cloud dependency:
|
|
16
|
-
|
|
17
|
-
| Requirement | How Mode A satisfies it |
|
|
18
|
-
|-------------|------------------------|
|
|
19
|
-
| **Data sovereignty** | All data stored and processed locally. Nothing leaves the device. |
|
|
20
|
-
| **Right to erasure** | `slm forget` deletes data from the local database. No cloud logs exist to purge. |
|
|
21
|
-
| **Transparency** | The retrieval pipeline is fully auditable. No black-box AI decisions. |
|
|
22
|
-
| **Risk classification** | A local retrieval system with no autonomous decision-making qualifies as minimal risk. |
|
|
23
|
-
|
|
24
|
-
### Mode B: Full Compliance
|
|
25
|
-
|
|
26
|
-
Mode B uses a local LLM (Ollama). Data never leaves the device. Same compliance posture as Mode A.
|
|
27
|
-
|
|
28
|
-
### Mode C: Shared Responsibility
|
|
29
|
-
|
|
30
|
-
Mode C sends recall queries to a cloud LLM provider. In this mode:
|
|
31
|
-
|
|
32
|
-
- **Your data** (stored memories) remains local
|
|
33
|
-
- **Queries** are sent to the cloud provider
|
|
34
|
-
- The cloud provider's compliance posture applies to those queries
|
|
35
|
-
- A Data Processing Agreement (DPA) with your provider is recommended
|
|
36
|
-
|
|
37
|
-
## GDPR
|
|
38
|
-
|
|
39
|
-
The General Data Protection Regulation applies to personal data of EU residents.
|
|
40
|
-
|
|
41
|
-
### Right to Erasure (Article 17)
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Delete specific memories
|
|
45
|
-
slm forget "John's phone number"
|
|
46
|
-
slm forget --id 42
|
|
47
|
-
|
|
48
|
-
# Delete all memories before a date
|
|
49
|
-
slm forget --before "2025-01-01"
|
|
50
|
-
|
|
51
|
-
# Delete an entire profile
|
|
52
|
-
slm profile delete client-eu
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Deletion is permanent. In Mode A, there are no cloud copies to worry about.
|
|
56
|
-
|
|
57
|
-
### Data Portability (Article 20)
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Export all memories for a profile
|
|
61
|
-
slm profile export work > work-data.json
|
|
62
|
-
|
|
63
|
-
# The export is standard JSON — readable by any system
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Data Minimization (Article 5)
|
|
67
|
-
|
|
68
|
-
The entropy gate in the ingestion pipeline filters out redundant and low-value information automatically. Only memories with sufficient information value are stored.
|
|
69
|
-
|
|
70
|
-
### Purpose Limitation
|
|
71
|
-
|
|
72
|
-
Profiles enforce purpose limitation. Client A's data is stored in Client A's profile and is never accessible from another profile.
|
|
73
|
-
|
|
74
|
-
## Retention Policies
|
|
75
|
-
|
|
76
|
-
Named retention policies automate data lifecycle management.
|
|
77
|
-
|
|
78
|
-
### Built-in policies
|
|
79
|
-
|
|
80
|
-
| Policy | Retention period | Use case |
|
|
81
|
-
|--------|:----------------:|----------|
|
|
82
|
-
| `indefinite` | Forever | Default. No automatic deletion. |
|
|
83
|
-
| `gdpr-30d` | 30 days | GDPR-compliant short retention |
|
|
84
|
-
| `hipaa-7y` | 7 years | HIPAA medical records requirement |
|
|
85
|
-
|
|
86
|
-
### Apply a policy
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
slm retention set gdpr-30d
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
This applies to the active profile. Memories older than the retention period are automatically archived and then deleted.
|
|
93
|
-
|
|
94
|
-
### Custom policies
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
slm retention set custom --days 90
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Per-profile policies
|
|
101
|
-
|
|
102
|
-
Different profiles can have different policies:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
slm profile switch client-eu
|
|
106
|
-
slm retention set gdpr-30d
|
|
107
|
-
|
|
108
|
-
slm profile switch internal
|
|
109
|
-
slm retention set indefinite
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Access Control
|
|
113
|
-
|
|
114
|
-
SuperLocalMemory uses Attribute-Based Access Control (ABAC) per profile.
|
|
115
|
-
|
|
116
|
-
- Each profile is an isolated access boundary
|
|
117
|
-
- No cross-profile data access is possible
|
|
118
|
-
- Profile switching requires the `slm profile switch` command
|
|
119
|
-
- The audit trail logs all profile switches
|
|
120
|
-
|
|
121
|
-
## Audit Trail
|
|
122
|
-
|
|
123
|
-
Every memory operation is logged in a tamper-evident hash chain.
|
|
124
|
-
|
|
125
|
-
### View the audit trail
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
slm audit # Recent entries
|
|
129
|
-
slm audit --limit 100 # Last 100 entries
|
|
130
|
-
slm audit --action store # Only store operations
|
|
131
|
-
slm audit --action delete # Only delete operations
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Verify integrity
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
slm audit --verify
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
This checks the hash chain for tampering. Each entry contains a hash of the previous entry, creating a blockchain-like chain. Any modification to a past entry breaks the chain and is detected.
|
|
141
|
-
|
|
142
|
-
### What gets logged
|
|
143
|
-
|
|
144
|
-
| Action | What is recorded |
|
|
145
|
-
|--------|-----------------|
|
|
146
|
-
| `store` | Memory ID, timestamp, profile, content hash |
|
|
147
|
-
| `recall` | Query, timestamp, profile, result count |
|
|
148
|
-
| `delete` | Memory ID, timestamp, profile, reason |
|
|
149
|
-
| `profile_switch` | From profile, to profile, timestamp |
|
|
150
|
-
| `mode_change` | From mode, to mode, timestamp |
|
|
151
|
-
| `migration` | Source version, target version, timestamp |
|
|
152
|
-
|
|
153
|
-
## HIPAA
|
|
154
|
-
|
|
155
|
-
For healthcare applications:
|
|
156
|
-
|
|
157
|
-
1. Use Mode A (zero cloud) to ensure PHI never leaves the device
|
|
158
|
-
2. Apply the `hipaa-7y` retention policy
|
|
159
|
-
3. Use per-patient or per-case profiles for isolation
|
|
160
|
-
4. Enable audit trail verification for compliance audits
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
slm profile create patient-12345
|
|
164
|
-
slm profile switch patient-12345
|
|
165
|
-
slm retention set hipaa-7y
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## SOC 2
|
|
169
|
-
|
|
170
|
-
SuperLocalMemory supports SOC 2 requirements through:
|
|
171
|
-
|
|
172
|
-
- **Access controls:** Profile-based isolation with ABAC
|
|
173
|
-
- **Audit logging:** Hash-chained, tamper-evident audit trail
|
|
174
|
-
- **Data encryption:** SQLite database can be encrypted at rest using OS-level encryption (FileVault, BitLocker, LUKS)
|
|
175
|
-
- **Change management:** All configuration changes are logged
|
|
176
|
-
|
|
177
|
-
## Compliance Checklist
|
|
178
|
-
|
|
179
|
-
| Requirement | Mode A | Mode B | Mode C |
|
|
180
|
-
|-------------|:------:|:------:|:------:|
|
|
181
|
-
| Data stays on device | Yes | Yes | Partial (queries sent to cloud) |
|
|
182
|
-
| No cloud dependency | Yes | Yes | No |
|
|
183
|
-
| Right to erasure | Yes | Yes | Yes (local); cloud logs depend on provider |
|
|
184
|
-
| Audit trail | Yes | Yes | Yes |
|
|
185
|
-
| Retention policies | Yes | Yes | Yes |
|
|
186
|
-
| Profile isolation | Yes | Yes | Yes |
|
|
187
|
-
| Tamper detection | Yes | Yes | Yes |
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
*SuperLocalMemory V3 — Copyright 2026 Varun Pratap Bhardwaj. Elastic License 2.0. Part of Qualixar.*
|