superlocalmemory 2.8.1 → 2.8.3
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/ATTRIBUTION.md +50 -0
- package/CHANGELOG.md +8 -0
- package/README.md +31 -20
- package/api_server.py +5 -0
- package/bin/aider-smart +2 -2
- package/bin/slm +18 -18
- package/bin/slm.bat +3 -3
- package/configs/continue-skills.yaml +4 -4
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/CLI-COMMANDS-REFERENCE.md +18 -18
- package/docs/FRAMEWORK-INTEGRATIONS.md +4 -4
- package/docs/SECURITY-QUICK-REFERENCE.md +214 -0
- package/docs/UNIVERSAL-INTEGRATION.md +15 -15
- package/install.ps1 +11 -11
- package/install.sh +4 -4
- package/mcp_server.py +4 -4
- package/package.json +5 -3
- package/requirements-core.txt +16 -18
- package/requirements-learning.txt +8 -8
- package/requirements.txt +9 -7
- package/scripts/prepack.js +33 -0
- package/scripts/verify-v27.ps1 +301 -0
- package/src/agent_registry.py +32 -28
- package/src/auto_backup.py +12 -6
- package/src/cache_manager.py +2 -2
- package/src/compression/__init__.py +25 -0
- package/src/compression/cli.py +150 -0
- package/src/compression/cold_storage.py +217 -0
- package/src/compression/config.py +72 -0
- package/src/compression/orchestrator.py +133 -0
- package/src/compression/tier2_compressor.py +228 -0
- package/src/compression/tier3_compressor.py +153 -0
- package/src/compression/tier_classifier.py +148 -0
- package/src/db_connection_manager.py +5 -5
- package/src/event_bus.py +24 -22
- package/src/graph/graph_core.py +3 -3
- package/src/hnsw_index.py +3 -3
- package/src/learning/__init__.py +5 -4
- package/src/learning/adaptive_ranker.py +14 -265
- package/src/learning/bootstrap/__init__.py +69 -0
- package/src/learning/bootstrap/constants.py +93 -0
- package/src/learning/bootstrap/db_queries.py +316 -0
- package/src/learning/bootstrap/sampling.py +82 -0
- package/src/learning/bootstrap/text_utils.py +71 -0
- package/src/learning/cross_project_aggregator.py +58 -57
- package/src/learning/db/__init__.py +40 -0
- package/src/learning/db/constants.py +44 -0
- package/src/learning/db/schema.py +279 -0
- package/src/learning/learning_db.py +15 -234
- package/src/learning/ranking/__init__.py +33 -0
- package/src/learning/ranking/constants.py +84 -0
- package/src/learning/ranking/helpers.py +278 -0
- package/src/learning/source_quality_scorer.py +66 -65
- package/src/learning/synthetic_bootstrap.py +28 -310
- package/src/memory/__init__.py +36 -0
- package/src/memory/cli.py +205 -0
- package/src/memory/constants.py +39 -0
- package/src/memory/helpers.py +28 -0
- package/src/memory/schema.py +166 -0
- package/src/memory-profiles.py +94 -86
- package/src/memory-reset.py +187 -185
- package/src/memory_compression.py +2 -2
- package/src/memory_store_v2.py +40 -355
- package/src/migrate_v1_to_v2.py +11 -10
- package/src/patterns/analyzers.py +104 -100
- package/src/patterns/learner.py +17 -13
- package/src/patterns/scoring.py +25 -21
- package/src/patterns/store.py +40 -38
- package/src/patterns/terminology.py +53 -51
- package/src/provenance_tracker.py +2 -2
- package/src/qualixar_attribution.py +139 -0
- package/src/qualixar_watermark.py +78 -0
- package/src/search/engine.py +16 -14
- package/src/search/index_loader.py +13 -11
- package/src/setup_validator.py +162 -160
- package/src/subscription_manager.py +20 -18
- package/src/tree/builder.py +66 -64
- package/src/tree/nodes.py +103 -97
- package/src/tree/queries.py +142 -137
- package/src/tree/schema.py +46 -42
- package/src/webhook_dispatcher.py +3 -3
- package/ui_server.py +7 -4
- /package/bin/{superlocalmemoryv2:learning → superlocalmemoryv2-learning} +0 -0
- /package/bin/{superlocalmemoryv2:list → superlocalmemoryv2-list} +0 -0
- /package/bin/{superlocalmemoryv2:patterns → superlocalmemoryv2-patterns} +0 -0
- /package/bin/{superlocalmemoryv2:profile → superlocalmemoryv2-profile} +0 -0
- /package/bin/{superlocalmemoryv2:recall → superlocalmemoryv2-recall} +0 -0
- /package/bin/{superlocalmemoryv2:remember → superlocalmemoryv2-remember} +0 -0
- /package/bin/{superlocalmemoryv2:reset → superlocalmemoryv2-reset} +0 -0
- /package/bin/{superlocalmemoryv2:status → superlocalmemoryv2-status} +0 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Security Quick Reference — For Developers
|
|
2
|
+
|
|
3
|
+
**Last Updated:** March 4, 2026
|
|
4
|
+
|
|
5
|
+
## TL;DR — Safe Coding Patterns
|
|
6
|
+
|
|
7
|
+
### ✅ DO THIS (Safe)
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
// Safe: Use textContent for plain text
|
|
11
|
+
element.textContent = userContent;
|
|
12
|
+
|
|
13
|
+
// Safe: Use escapeHtml() before DOM insertion
|
|
14
|
+
element.innerHTML = escapeHtml(userContent);
|
|
15
|
+
|
|
16
|
+
// Safe: Create elements programmatically
|
|
17
|
+
const div = document.createElement('div');
|
|
18
|
+
div.textContent = userContent;
|
|
19
|
+
parent.appendChild(div);
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### ❌ DON'T DO THIS (Dangerous)
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// DANGEROUS: Direct assignment with user content
|
|
26
|
+
element.innerHTML = userContent; // XSS VULNERABLE
|
|
27
|
+
|
|
28
|
+
// DANGEROUS: Using code evaluation with user input
|
|
29
|
+
// Never use eval, Function constructor, or similar
|
|
30
|
+
|
|
31
|
+
// DANGEROUS: Inline event handlers with user content
|
|
32
|
+
element.setAttribute('onclick', userCode); // XSS VULNERABLE
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Security Checklist — Before Committing
|
|
36
|
+
|
|
37
|
+
- [ ] No direct innerHTML assignments without escapeHtml()
|
|
38
|
+
- [ ] All user content either uses textContent or is escaped
|
|
39
|
+
- [ ] No code evaluation with user input
|
|
40
|
+
- [ ] No inline event handlers with dynamic content
|
|
41
|
+
- [ ] All API endpoints return explicit Content-Type
|
|
42
|
+
- [ ] SQL queries use parameterized statements (never string concatenation)
|
|
43
|
+
- [ ] No secrets in code or config files
|
|
44
|
+
- [ ] Run security tests: pytest tests/test_security_headers.py -v
|
|
45
|
+
|
|
46
|
+
## Common Patterns
|
|
47
|
+
|
|
48
|
+
### Rendering User-Generated Content
|
|
49
|
+
|
|
50
|
+
**Pattern 1: Plain Text Only**
|
|
51
|
+
```javascript
|
|
52
|
+
const contentDiv = document.getElementById('memory-content');
|
|
53
|
+
contentDiv.textContent = memory.content; // Automatically safe
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Pattern 2: Mixed Content (HTML Structure + User Text)**
|
|
57
|
+
```javascript
|
|
58
|
+
const html = `
|
|
59
|
+
<div class="memory-card">
|
|
60
|
+
<h3>${escapeHtml(memory.title)}</h3>
|
|
61
|
+
<p>${escapeHtml(memory.content)}</p>
|
|
62
|
+
<span class="badge">${escapeHtml(memory.category)}</span>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
container.innerHTML = html;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Pattern 3: Building DOM Programmatically (Most Secure)**
|
|
69
|
+
```javascript
|
|
70
|
+
const card = document.createElement('div');
|
|
71
|
+
card.className = 'memory-card';
|
|
72
|
+
|
|
73
|
+
const title = document.createElement('h3');
|
|
74
|
+
title.textContent = memory.title;
|
|
75
|
+
|
|
76
|
+
const content = document.createElement('p');
|
|
77
|
+
content.textContent = memory.content;
|
|
78
|
+
|
|
79
|
+
card.appendChild(title);
|
|
80
|
+
card.appendChild(content);
|
|
81
|
+
container.appendChild(card);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### FastAPI Routes
|
|
85
|
+
|
|
86
|
+
**Safe Pattern:**
|
|
87
|
+
```python
|
|
88
|
+
@router.get("/api/memories")
|
|
89
|
+
async def get_memories():
|
|
90
|
+
# FastAPI automatically sets Content-Type: application/json
|
|
91
|
+
return {
|
|
92
|
+
"memories": memories, # User content here is safe in JSON
|
|
93
|
+
"total": len(memories)
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**SQL Queries:**
|
|
98
|
+
```python
|
|
99
|
+
# SAFE: Parameterized query
|
|
100
|
+
cursor.execute("SELECT * FROM memories WHERE id = ?", (memory_id,))
|
|
101
|
+
|
|
102
|
+
# DANGEROUS: String concatenation (SQL injection)
|
|
103
|
+
# Never use f-strings or concatenation for SQL queries
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Testing XSS Protection
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
# Test that XSS payloads are handled safely
|
|
110
|
+
def test_xss_payload():
|
|
111
|
+
payload = "<script>alert('xss')</script>"
|
|
112
|
+
|
|
113
|
+
# This should be safe when:
|
|
114
|
+
# 1. Returned as JSON with Content-Type: application/json
|
|
115
|
+
# 2. Rendered with escapeHtml() on client
|
|
116
|
+
# 3. Protected by CSP headers
|
|
117
|
+
|
|
118
|
+
response = client.get(f"/api/memory?content={payload}")
|
|
119
|
+
assert response.headers["Content-Type"] == "application/json"
|
|
120
|
+
assert response.headers["X-Content-Type-Options"] == "nosniff"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Security Headers Reference
|
|
124
|
+
|
|
125
|
+
All responses include these headers automatically via SecurityHeadersMiddleware:
|
|
126
|
+
|
|
127
|
+
- X-Content-Type-Options: nosniff
|
|
128
|
+
- X-Frame-Options: DENY
|
|
129
|
+
- X-XSS-Protection: 1; mode=block
|
|
130
|
+
- Content-Security-Policy: (comprehensive policy)
|
|
131
|
+
- Referrer-Policy: strict-origin-when-cross-origin
|
|
132
|
+
- Cache-Control: no-store (API endpoints only)
|
|
133
|
+
|
|
134
|
+
**Don't override these headers** unless you have a specific security reason and understand the implications.
|
|
135
|
+
|
|
136
|
+
## CORS Configuration
|
|
137
|
+
|
|
138
|
+
Current allowed origins:
|
|
139
|
+
- http://localhost:8765
|
|
140
|
+
- http://127.0.0.1:8765
|
|
141
|
+
- http://localhost:8417
|
|
142
|
+
- http://127.0.0.1:8417
|
|
143
|
+
|
|
144
|
+
**To add a new origin:**
|
|
145
|
+
1. Add to the allow_origins list in ui_server.py
|
|
146
|
+
2. Document why it's needed
|
|
147
|
+
3. Never use wildcard * in production
|
|
148
|
+
|
|
149
|
+
## When to Update Security
|
|
150
|
+
|
|
151
|
+
### Add New Route
|
|
152
|
+
- [ ] Verify return type has explicit Content-Type
|
|
153
|
+
- [ ] Test with XSS payloads
|
|
154
|
+
- [ ] Add test case to test_security_headers.py
|
|
155
|
+
|
|
156
|
+
### Add New JavaScript
|
|
157
|
+
- [ ] Use textContent for plain text
|
|
158
|
+
- [ ] Use escapeHtml() for mixed content
|
|
159
|
+
- [ ] Test rendering with XSS payloads
|
|
160
|
+
|
|
161
|
+
### Modify Security Headers
|
|
162
|
+
- [ ] Document reason in commit message
|
|
163
|
+
- [ ] Update SECURITY.md
|
|
164
|
+
- [ ] Run full security test suite
|
|
165
|
+
- [ ] Consider security implications
|
|
166
|
+
|
|
167
|
+
## Resources
|
|
168
|
+
|
|
169
|
+
- **Full Security Policy:** See SECURITY.md
|
|
170
|
+
- **Security Enhancement Details:** .backup/security-enhancement-2026-03-04.md
|
|
171
|
+
- **Security Tests:** tests/test_security_headers.py
|
|
172
|
+
- **Middleware Source:** security_middleware.py
|
|
173
|
+
- **Client-Side Escaping:** ui/app.js (escapeHtml function)
|
|
174
|
+
|
|
175
|
+
## Quick Test Commands
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Run security tests only
|
|
179
|
+
pytest tests/test_security_headers.py -v
|
|
180
|
+
|
|
181
|
+
# Run all tests
|
|
182
|
+
pytest tests/ -x -q
|
|
183
|
+
|
|
184
|
+
# Manual verification (browser)
|
|
185
|
+
python3 ui_server.py
|
|
186
|
+
# Open http://localhost:8765
|
|
187
|
+
# DevTools → Network → Check response headers
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Red Flags — Stop and Review
|
|
191
|
+
|
|
192
|
+
If you see any of these patterns, STOP and review:
|
|
193
|
+
|
|
194
|
+
- innerHTML with user content (without escaping)
|
|
195
|
+
- Code evaluation functions anywhere
|
|
196
|
+
- String concatenation in SQL queries
|
|
197
|
+
- CORS with wildcard *
|
|
198
|
+
- User input in event handler attributes
|
|
199
|
+
- Disabling CSP or security headers
|
|
200
|
+
- Secrets or API keys in code
|
|
201
|
+
|
|
202
|
+
## When in Doubt
|
|
203
|
+
|
|
204
|
+
**Ask these questions:**
|
|
205
|
+
1. Could a user inject a script tag here?
|
|
206
|
+
2. Is this content escaped before rendering?
|
|
207
|
+
3. Does this SQL query use parameters?
|
|
208
|
+
4. Could this header configuration weaken security?
|
|
209
|
+
|
|
210
|
+
**If unsure:** Use the safest pattern (textContent or programmatic DOM creation).
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
**Remember:** Defense in depth. We have multiple layers (headers, CSP, escaping). Use all of them.
|
|
@@ -33,7 +33,7 @@ After installation, restart any IDE you want to use SuperLocalMemory with.
|
|
|
33
33
|
|
|
34
34
|
### Step 3: Start Using It
|
|
35
35
|
- **In Cursor/Windsurf:** Just talk naturally - "Remember that we use FastAPI for APIs"
|
|
36
|
-
- **In Claude Code:** Use `/superlocalmemoryv2
|
|
36
|
+
- **In Claude Code:** Use `/superlocalmemoryv2-remember` or the new `slm` commands
|
|
37
37
|
- **In Terminal:** Use `slm remember "content"`
|
|
38
38
|
|
|
39
39
|
---
|
|
@@ -48,11 +48,11 @@ After installation, restart any IDE you want to use SuperLocalMemory with.
|
|
|
48
48
|
|
|
49
49
|
**Usage:**
|
|
50
50
|
```
|
|
51
|
-
/superlocalmemoryv2
|
|
52
|
-
/superlocalmemoryv2
|
|
53
|
-
/superlocalmemoryv2
|
|
54
|
-
/superlocalmemoryv2
|
|
55
|
-
/superlocalmemoryv2
|
|
51
|
+
/superlocalmemoryv2-remember "Use FastAPI for REST APIs"
|
|
52
|
+
/superlocalmemoryv2-recall "FastAPI"
|
|
53
|
+
/superlocalmemoryv2-list
|
|
54
|
+
/superlocalmemoryv2-status
|
|
55
|
+
/superlocalmemoryv2-profile list
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
**OR use the simpler CLI:**
|
|
@@ -169,7 +169,7 @@ Continue's AI can also call memory tools directly.
|
|
|
169
169
|
slashCommands:
|
|
170
170
|
- name: "slm-remember"
|
|
171
171
|
description: "Save to SuperLocalMemory"
|
|
172
|
-
run: "~/.claude-memory/bin/superlocalmemoryv2
|
|
172
|
+
run: "~/.claude-memory/bin/superlocalmemoryv2-remember \"{{input}}\""
|
|
173
173
|
|
|
174
174
|
# For MCP tools
|
|
175
175
|
contextProviders:
|
|
@@ -293,7 +293,7 @@ ChatGPT: [calls fetch(42)]
|
|
|
293
293
|
|
|
294
294
|
**Commands Installed:**
|
|
295
295
|
- `slm` - Main command
|
|
296
|
-
- All original `superlocalmemoryv2
|
|
296
|
+
- All original `superlocalmemoryv2-*` commands still work
|
|
297
297
|
|
|
298
298
|
**Usage:**
|
|
299
299
|
```bash
|
|
@@ -335,7 +335,7 @@ All access methods use the **SAME local SQLite database**:
|
|
|
335
335
|
│ ACCESS METHODS │
|
|
336
336
|
├─────────────────────────────────────────────┤
|
|
337
337
|
│ TIER 1: Skills │
|
|
338
|
-
│ • Claude Code: /superlocalmemoryv2
|
|
338
|
+
│ • Claude Code: /superlocalmemoryv2-* │
|
|
339
339
|
│ • Continue: /slm-* │
|
|
340
340
|
│ • Cody: /slm-* │
|
|
341
341
|
├─────────────────────────────────────────────┤
|
|
@@ -359,7 +359,7 @@ All access methods use the **SAME local SQLite database**:
|
|
|
359
359
|
└───────────────────┘
|
|
360
360
|
```
|
|
361
361
|
|
|
362
|
-
**Key Point:** No matter which method you use, all data goes to the same place. You can use `/superlocalmemoryv2
|
|
362
|
+
**Key Point:** No matter which method you use, all data goes to the same place. You can use `/superlocalmemoryv2-remember` in Claude Code, then `slm recall` in terminal, and see the same memories.
|
|
363
363
|
|
|
364
364
|
---
|
|
365
365
|
|
|
@@ -453,11 +453,11 @@ python3 ~/.claude-memory/mcp_server.py --transport http --port 8001
|
|
|
453
453
|
|
|
454
454
|
| Old Command | Still Works? | New Alternative |
|
|
455
455
|
|-------------|--------------|-----------------|
|
|
456
|
-
| `superlocalmemoryv2
|
|
457
|
-
| `superlocalmemoryv2
|
|
458
|
-
| `superlocalmemoryv2
|
|
459
|
-
| `superlocalmemoryv2
|
|
460
|
-
| `superlocalmemoryv2
|
|
456
|
+
| `superlocalmemoryv2-remember` | ✅ Yes | `slm remember` |
|
|
457
|
+
| `superlocalmemoryv2-recall` | ✅ Yes | `slm recall` |
|
|
458
|
+
| `superlocalmemoryv2-list` | ✅ Yes | `slm list` |
|
|
459
|
+
| `superlocalmemoryv2-status` | ✅ Yes | `slm status` |
|
|
460
|
+
| `superlocalmemoryv2-profile` | ✅ Yes | `slm profile` |
|
|
461
461
|
|
|
462
462
|
**Nothing breaks. Everything gains new capabilities.**
|
|
463
463
|
|
package/install.ps1
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
# ============================================================================
|
|
2
|
-
# SuperLocalMemory V2.
|
|
2
|
+
# SuperLocalMemory V2.8.3 - Windows Installation Script (PowerShell)
|
|
3
3
|
# Copyright (c) 2026 Varun Pratap Bhardwaj
|
|
4
4
|
# Licensed under MIT License
|
|
5
5
|
# Repository: https://github.com/varun369/SuperLocalMemoryV2
|
|
6
6
|
# ============================================================================
|
|
7
7
|
|
|
8
|
+
# IMPORTANT: param() must be the FIRST executable statement in PowerShell
|
|
9
|
+
param(
|
|
10
|
+
[switch]$NonInteractive,
|
|
11
|
+
[switch]$Auto,
|
|
12
|
+
[switch]$Yes,
|
|
13
|
+
[switch]$y
|
|
14
|
+
)
|
|
15
|
+
|
|
8
16
|
$ErrorActionPreference = "Stop"
|
|
9
17
|
|
|
10
18
|
$INSTALL_DIR = Join-Path $env:USERPROFILE ".claude-memory"
|
|
@@ -16,14 +24,6 @@ if (-not [Environment]::UserInteractive) {
|
|
|
16
24
|
$NON_INTERACTIVE = $true
|
|
17
25
|
}
|
|
18
26
|
|
|
19
|
-
# Parse command line arguments
|
|
20
|
-
param(
|
|
21
|
-
[switch]$NonInteractive,
|
|
22
|
-
[switch]$Auto,
|
|
23
|
-
[switch]$Yes,
|
|
24
|
-
[switch]$y
|
|
25
|
-
)
|
|
26
|
-
|
|
27
27
|
if ($NonInteractive -or $Auto -or $Yes -or $y) {
|
|
28
28
|
$NON_INTERACTIVE = $true
|
|
29
29
|
}
|
|
@@ -31,7 +31,7 @@ if ($NonInteractive -or $Auto -or $Yes -or $y) {
|
|
|
31
31
|
# Print banner
|
|
32
32
|
Write-Host ""
|
|
33
33
|
Write-Host "=================================================================="
|
|
34
|
-
Write-Host " SuperLocalMemory V2.
|
|
34
|
+
Write-Host " SuperLocalMemory V2.8.3 - Windows Installation "
|
|
35
35
|
Write-Host " by Varun Pratap Bhardwaj "
|
|
36
36
|
Write-Host " https://github.com/varun369/SuperLocalMemoryV2 "
|
|
37
37
|
Write-Host "=================================================================="
|
|
@@ -552,7 +552,7 @@ Write-Host "=================================================================="
|
|
|
552
552
|
Write-Host " Optional Features Available "
|
|
553
553
|
Write-Host "=================================================================="
|
|
554
554
|
Write-Host ""
|
|
555
|
-
Write-Host "SuperLocalMemory
|
|
555
|
+
Write-Host "SuperLocalMemory includes optional features:"
|
|
556
556
|
Write-Host ""
|
|
557
557
|
Write-Host " 1) Advanced Search (~1.5GB, 5-10 min)"
|
|
558
558
|
Write-Host " - Semantic search with sentence transformers"
|
package/install.sh
CHANGED
|
@@ -848,10 +848,10 @@ echo ""
|
|
|
848
848
|
echo "Available commands (two ways to use them):"
|
|
849
849
|
echo ""
|
|
850
850
|
echo "OPTION 1: Original commands (still work):"
|
|
851
|
-
echo " superlocalmemoryv2
|
|
852
|
-
echo " superlocalmemoryv2
|
|
853
|
-
echo " superlocalmemoryv2
|
|
854
|
-
echo " superlocalmemoryv2
|
|
851
|
+
echo " superlocalmemoryv2-remember - Save a new memory"
|
|
852
|
+
echo " superlocalmemoryv2-recall - Search memories"
|
|
853
|
+
echo " superlocalmemoryv2-list - List recent memories"
|
|
854
|
+
echo " superlocalmemoryv2-status - Check system status"
|
|
855
855
|
echo ""
|
|
856
856
|
echo "OPTION 2: New simple commands:"
|
|
857
857
|
echo " slm remember <content> - Save (simpler syntax)"
|
package/mcp_server.py
CHANGED
|
@@ -203,7 +203,7 @@ _agent_registry = None
|
|
|
203
203
|
_provenance_tracker = None
|
|
204
204
|
|
|
205
205
|
|
|
206
|
-
def get_agent_registry():
|
|
206
|
+
def get_agent_registry() -> Optional[Any]:
|
|
207
207
|
"""Get shared AgentRegistry singleton (v2.5+). Returns None if unavailable."""
|
|
208
208
|
global _agent_registry
|
|
209
209
|
if not PROVENANCE_AVAILABLE:
|
|
@@ -213,7 +213,7 @@ def get_agent_registry():
|
|
|
213
213
|
return _agent_registry
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
def get_provenance_tracker():
|
|
216
|
+
def get_provenance_tracker() -> Optional[Any]:
|
|
217
217
|
"""Get shared ProvenanceTracker singleton (v2.5+). Returns None if unavailable."""
|
|
218
218
|
global _provenance_tracker
|
|
219
219
|
if not PROVENANCE_AVAILABLE:
|
|
@@ -226,7 +226,7 @@ def get_provenance_tracker():
|
|
|
226
226
|
_trust_scorer = None
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
def get_trust_scorer():
|
|
229
|
+
def get_trust_scorer() -> Optional[Any]:
|
|
230
230
|
"""Get shared TrustScorer singleton (v2.6+). Returns None if unavailable."""
|
|
231
231
|
global _trust_scorer
|
|
232
232
|
if not TRUST_AVAILABLE:
|
|
@@ -609,7 +609,7 @@ async def remember(
|
|
|
609
609
|
"""
|
|
610
610
|
Save content to SuperLocalMemory with intelligent indexing.
|
|
611
611
|
|
|
612
|
-
This calls the SAME backend as /superlocalmemoryv2
|
|
612
|
+
This calls the SAME backend as /superlocalmemoryv2-remember skill.
|
|
613
613
|
All memories are stored in the same local SQLite database.
|
|
614
614
|
|
|
615
615
|
Args:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "Your AI Finally Remembers You - Local-first intelligent memory system for AI assistants. Works with Claude, Cursor, Windsurf, VS Code/Copilot, Codex, and 17+ AI tools. 100% local, zero cloud dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"chatgpt",
|
|
23
23
|
"chatgpt-connector",
|
|
24
24
|
"openai",
|
|
25
|
-
"deep-research"
|
|
25
|
+
"deep-research",
|
|
26
|
+
"qualixar",
|
|
27
|
+
"agent-development-platform"
|
|
26
28
|
],
|
|
27
29
|
"author": {
|
|
28
30
|
"name": "Varun Pratap Bhardwaj",
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
"superlocalmemory": "./bin/slm-npm"
|
|
45
47
|
},
|
|
46
48
|
"scripts": {
|
|
47
|
-
"prepack": "
|
|
49
|
+
"prepack": "node scripts/prepack.js",
|
|
48
50
|
"postinstall": "node scripts/postinstall.js",
|
|
49
51
|
"preuninstall": "node scripts/preuninstall.js",
|
|
50
52
|
"test": "echo \"Run: npm install -g . && slm status\" && exit 0"
|
package/requirements-core.txt
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
# SuperLocalMemory
|
|
1
|
+
# SuperLocalMemory - Core Feature Dependencies
|
|
2
2
|
# ============================================================================
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# Required for knowledge graph and web dashboard.
|
|
4
|
+
# Core memory operations work without these (stdlib only).
|
|
5
5
|
#
|
|
6
|
-
# Download size: ~50MB
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# Install with: pip3 install -r requirements-core.txt
|
|
6
|
+
# Download size: ~50MB | Install time: 1-2 minutes
|
|
7
|
+
# Install: pip3 install -r requirements-core.txt
|
|
10
8
|
# ============================================================================
|
|
11
9
|
|
|
12
|
-
# Knowledge Graph
|
|
13
|
-
python-igraph>=0.10.0
|
|
14
|
-
leidenalg>=0.9.0
|
|
15
|
-
scikit-learn>=1.3.0
|
|
10
|
+
# Knowledge Graph
|
|
11
|
+
python-igraph>=0.10.0,<2.0.0
|
|
12
|
+
leidenalg>=0.9.0,<1.0.0
|
|
13
|
+
scikit-learn>=1.3.0,<2.0.0
|
|
16
14
|
|
|
17
|
-
# Web Dashboard
|
|
18
|
-
fastapi>=0.109.0
|
|
19
|
-
uvicorn[standard]>=0.27.0
|
|
20
|
-
python-multipart>=0.0.6
|
|
15
|
+
# Web Dashboard
|
|
16
|
+
fastapi>=0.109.0,<1.0.0
|
|
17
|
+
uvicorn[standard]>=0.27.0,<1.0.0
|
|
18
|
+
python-multipart>=0.0.6,<1.0.0
|
|
21
19
|
|
|
22
|
-
# Performance
|
|
23
|
-
orjson>=3.9.0
|
|
24
|
-
diskcache>=5.6.0
|
|
20
|
+
# Performance
|
|
21
|
+
orjson>=3.9.0,<4.0.0
|
|
22
|
+
diskcache>=5.6.0,<6.0.0
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# SuperLocalMemory
|
|
1
|
+
# SuperLocalMemory - Learning Dependencies
|
|
2
2
|
# ============================================================================
|
|
3
|
-
# Optional but recommended. Enables intelligent pattern learning
|
|
4
|
-
# personalized recall ranking.
|
|
5
|
-
#
|
|
6
|
-
# If installation fails, core features work normally (v2.6 behavior).
|
|
7
|
-
# To install: pip3 install -r requirements-learning.txt
|
|
3
|
+
# Optional but recommended. Enables intelligent pattern learning
|
|
4
|
+
# and personalized recall ranking.
|
|
8
5
|
#
|
|
6
|
+
# If installation fails, core features work normally.
|
|
7
|
+
# Install: pip3 install -r requirements-learning.txt
|
|
9
8
|
# Download size: ~30MB
|
|
10
9
|
# ============================================================================
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
|
|
11
|
+
lightgbm>=4.0.0,<5.0.0
|
|
12
|
+
scipy>=1.9.0,<2.0.0
|
package/requirements.txt
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# SuperLocalMemory
|
|
1
|
+
# SuperLocalMemory - Core Requirements
|
|
2
2
|
# ============================================================================
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# Core memory operations (store, recall, search) work with Python 3.8+
|
|
4
|
+
# standard library only — no required dependencies.
|
|
5
5
|
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# - requirements-
|
|
9
|
-
# - requirements-search.txt (
|
|
6
|
+
# Advanced features (knowledge graph, dashboard, semantic search) require
|
|
7
|
+
# optional dependencies listed in the other requirements files:
|
|
8
|
+
# - requirements-core.txt (graph + dashboard)
|
|
9
|
+
# - requirements-search.txt (semantic search)
|
|
10
|
+
# - requirements-learning.txt (ML-based ranking)
|
|
11
|
+
# - requirements-full.txt (everything)
|
|
10
12
|
# ============================================================================
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SuperLocalMemory - Cross-platform prepack cleanup
|
|
4
|
+
*
|
|
5
|
+
* Removes __pycache__ directories and .pyc files before npm pack.
|
|
6
|
+
* Works on Windows, macOS, and Linux.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
function removePycache(dir) {
|
|
13
|
+
if (!fs.existsSync(dir)) return;
|
|
14
|
+
|
|
15
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
16
|
+
for (const entry of entries) {
|
|
17
|
+
const fullPath = path.join(dir, entry.name);
|
|
18
|
+
|
|
19
|
+
if (entry.isDirectory()) {
|
|
20
|
+
if (entry.name === '__pycache__' || entry.name === 'node_modules') {
|
|
21
|
+
if (entry.name === '__pycache__') {
|
|
22
|
+
fs.rmSync(fullPath, { recursive: true, force: true });
|
|
23
|
+
}
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
removePycache(fullPath);
|
|
27
|
+
} else if (entry.isFile() && entry.name.endsWith('.pyc')) {
|
|
28
|
+
fs.unlinkSync(fullPath);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
removePycache(process.cwd());
|