superlocalmemory 2.7.2 → 2.7.4
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 +30 -1
- package/README.md +1 -1
- package/docs/ARCHITECTURE.md +8 -8
- package/docs/COMPRESSION-README.md +1 -1
- package/docs/SEARCH-ENGINE-V2.2.0.md +1 -0
- package/hooks/post-recall-hook.js +53 -0
- package/mcp_server.py +425 -17
- package/package.json +1 -1
- package/skills/slm-recall/SKILL.md +1 -0
- package/src/agent_registry.py +3 -3
- package/src/auto_backup.py +64 -31
- package/src/graph_engine.py +15 -11
- package/src/learning/adaptive_ranker.py +70 -1
- package/src/learning/feature_extractor.py +131 -16
- package/src/learning/feedback_collector.py +114 -0
- package/src/learning/learning_db.py +158 -34
- package/src/learning/tests/test_adaptive_ranker.py +5 -4
- package/src/learning/tests/test_aggregator.py +4 -3
- package/src/learning/tests/test_feedback_collector.py +7 -4
- package/src/learning/tests/test_signal_inference.py +399 -0
- package/src/learning/tests/test_synthetic_bootstrap.py +1 -1
- package/src/trust_scorer.py +288 -74
- package/ui/app.js +4 -4
- package/ui/index.html +38 -0
- package/ui/js/agents.js +4 -4
- package/ui/js/feedback.js +333 -0
- package/ui/js/learning.js +117 -0
- package/ui/js/modal.js +22 -1
- package/ui/js/profiles.js +8 -0
- package/ui/js/settings.js +58 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,35 @@ SuperLocalMemory V2 - Intelligent local memory system for AI coding assistants.
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## [2.7.4] - 2026-02-16
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Per-profile learning — each profile has its own preferences and feedback
|
|
23
|
+
- Thumbs up/down and pin feedback on memory cards
|
|
24
|
+
- Learning data management in Settings (backup + reset)
|
|
25
|
+
- "What We Learned" summary card in Learning tab
|
|
26
|
+
|
|
27
|
+
### Improved
|
|
28
|
+
- Smarter learning from your natural usage patterns
|
|
29
|
+
- Recall results improve automatically over time
|
|
30
|
+
- Privacy notice for all learning features
|
|
31
|
+
- Learning and backup databases protected together
|
|
32
|
+
- All dashboard tabs refresh on profile switch
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## [2.7.3] - 2026-02-16
|
|
37
|
+
|
|
38
|
+
### Improved
|
|
39
|
+
- Enhanced trust scoring accuracy
|
|
40
|
+
- Improved search result relevance across all access methods
|
|
41
|
+
- Better error handling for optional components
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- Corrected outdated performance references in documentation
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
19
48
|
## [2.7.1] - 2026-02-16
|
|
20
49
|
|
|
21
50
|
### Added
|
|
@@ -270,7 +299,7 @@ SuperLocalMemory V2 represents a complete architectural rewrite with intelligent
|
|
|
270
299
|
- **Profile Management** - Multi-profile support with isolated databases
|
|
271
300
|
|
|
272
301
|
### Performance
|
|
273
|
-
-
|
|
302
|
+
- Improved search performance over V1 (see Performance Benchmarks)
|
|
274
303
|
- 60-96% storage reduction with compression
|
|
275
304
|
|
|
276
305
|
### Research Foundation
|
package/README.md
CHANGED
|
@@ -425,7 +425,7 @@ WAL mode + serialized write queue = zero "database is locked" errors, ever.
|
|
|
425
425
|
|
|
426
426
|
### Storage
|
|
427
427
|
|
|
428
|
-
10,000 memories = **13.6 MB** on disk (~1.
|
|
428
|
+
10,000 memories = **13.6 MB** on disk (~1.4 KB per memory). Your entire AI memory history takes less space than a photo.
|
|
429
429
|
|
|
430
430
|
### Graph Construction
|
|
431
431
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -381,7 +381,7 @@ SuperLocalMemory V2 uses a hierarchical, additive architecture where each layer
|
|
|
381
381
|
- Cold storage archival
|
|
382
382
|
|
|
383
383
|
**Performance:**
|
|
384
|
-
- Full-text search:
|
|
384
|
+
- Full-text search: Sub-11ms median for typical databases (see wiki Performance Benchmarks for measured data)
|
|
385
385
|
- Insert: <10ms
|
|
386
386
|
- Tag search: ~30ms
|
|
387
387
|
|
|
@@ -737,7 +737,7 @@ Vue: 10% confidence → Low priority, exploratory
|
|
|
737
737
|
| Operation | Complexity | Typical Time |
|
|
738
738
|
|-----------|-----------|--------------|
|
|
739
739
|
| Add memory | O(1) | <10ms |
|
|
740
|
-
| Search (FTS5) | O(log n) | ~
|
|
740
|
+
| Search (FTS5) | O(log n) | ~11ms median (100 memories) |
|
|
741
741
|
| Graph build | O(n²) worst, O(n log n) avg | ~2s (100 memories) |
|
|
742
742
|
| Pattern update | O(n) | <2s (100 memories) |
|
|
743
743
|
| Find related | O(1) | <10ms |
|
|
@@ -794,12 +794,12 @@ Vue: 10% confidence → Low priority, exploratory
|
|
|
794
794
|
|
|
795
795
|
### Current Limits (Tested)
|
|
796
796
|
|
|
797
|
-
| Memories | Build Time | Search Time | Database Size |
|
|
798
|
-
|
|
799
|
-
|
|
|
800
|
-
|
|
|
801
|
-
|
|
|
802
|
-
|
|
|
797
|
+
| Memories | Build Time | Search Time (median) | Database Size |
|
|
798
|
+
|----------|-----------|----------------------|---------------|
|
|
799
|
+
| 100 | 0.28s | 10.6ms | ~150KB |
|
|
800
|
+
| 500 | ~5s | 65.2ms | ~700KB |
|
|
801
|
+
| 1,000 | 10.6s | 124.3ms | 1.50 MB |
|
|
802
|
+
| 5,000 | 277s | 1,172ms | ~6.8 MB |
|
|
803
803
|
|
|
804
804
|
### Scaling Strategies
|
|
805
805
|
|
|
@@ -245,7 +245,7 @@ Priority order:
|
|
|
245
245
|
- Tier 2 (40 memories @ 10KB): 400KB
|
|
246
246
|
- Tier 3 (30 memories @ 2KB): 60KB
|
|
247
247
|
- **Total: 1.96MB (61% reduction)**
|
|
248
|
-
- **Search time:
|
|
248
|
+
- **Search time: Sub-11ms median for typical databases** (only scan Tier 1+2, see wiki Performance Benchmarks)
|
|
249
249
|
- **Memory load: 1.9MB** (Tier 3 loaded on-demand)
|
|
250
250
|
|
|
251
251
|
### Space Savings Scale
|
|
@@ -418,6 +418,7 @@ weights = {'bm25': 0.4, 'semantic': 0.3, 'graph': 0.3} # Default
|
|
|
418
418
|
- Index time is one-time cost
|
|
419
419
|
- Search time scales sub-linearly (inverted index efficiency)
|
|
420
420
|
- Hybrid search includes fusion overhead (~10-15ms)
|
|
421
|
+
- These are projected estimates for the optional BM25 engine. See wiki Performance Benchmarks for measured end-to-end search latency.
|
|
421
422
|
|
|
422
423
|
---
|
|
423
424
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SuperLocalMemory V2 - Post-Recall Hook (v2.7.4)
|
|
4
|
+
* Copyright (c) 2026 Varun Pratap Bhardwaj
|
|
5
|
+
* Licensed under MIT License
|
|
6
|
+
*
|
|
7
|
+
* Claude Code hook that tracks recall events for implicit signal collection.
|
|
8
|
+
* This hook fires after the slm-recall skill completes, recording timing
|
|
9
|
+
* data that the signal inference engine uses to detect satisfaction/dissatisfaction.
|
|
10
|
+
*
|
|
11
|
+
* Installation: Automatically registered via install-skills.sh
|
|
12
|
+
* All data stays 100% local.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
const os = require('os');
|
|
18
|
+
|
|
19
|
+
const MEMORY_DIR = path.join(os.homedir(), '.claude-memory');
|
|
20
|
+
const HOOK_LOG = path.join(MEMORY_DIR, 'recall-events.jsonl');
|
|
21
|
+
|
|
22
|
+
// Parse input from Claude Code hook system
|
|
23
|
+
function main() {
|
|
24
|
+
try {
|
|
25
|
+
const timestamp = Date.now();
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
|
+
|
|
28
|
+
// Extract query from args if available
|
|
29
|
+
let query = '';
|
|
30
|
+
for (let i = 0; i < args.length; i++) {
|
|
31
|
+
if (args[i] && !args[i].startsWith('--')) {
|
|
32
|
+
query = args[i];
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!query) return;
|
|
38
|
+
|
|
39
|
+
// Append recall event to JSONL log (lightweight, append-only)
|
|
40
|
+
const event = JSON.stringify({
|
|
41
|
+
type: 'recall',
|
|
42
|
+
query: query.substring(0, 100), // Truncate for privacy
|
|
43
|
+
timestamp: timestamp,
|
|
44
|
+
source: 'claude-code-hook',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
fs.appendFileSync(HOOK_LOG, event + '\n', { flag: 'a' });
|
|
48
|
+
} catch (e) {
|
|
49
|
+
// Hook failures must be silent
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
main();
|