superlocalmemory 2.3.0 → 2.3.2
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/bin/slm +9 -4
- package/mcp_server.py +18 -8
- package/package.json +1 -1
- package/src/graph_engine.py +2 -2
- package/src/memory-profiles.py +2 -2
- package/src/pattern_learner.py +4 -4
package/bin/slm
CHANGED
|
@@ -35,8 +35,13 @@ case "$1" in
|
|
|
35
35
|
|
|
36
36
|
list|ls)
|
|
37
37
|
shift
|
|
38
|
-
#
|
|
39
|
-
"
|
|
38
|
+
# Convert positional number to --limit flag
|
|
39
|
+
# e.g., "slm list 5" becomes "--limit 5"
|
|
40
|
+
if [ -n "$1" ] && [[ "$1" =~ ^[0-9]+$ ]]; then
|
|
41
|
+
"$SLM_DIR/bin/superlocalmemoryv2:list" --limit "$1"
|
|
42
|
+
else
|
|
43
|
+
"$SLM_DIR/bin/superlocalmemoryv2:list" "$@"
|
|
44
|
+
fi
|
|
40
45
|
;;
|
|
41
46
|
|
|
42
47
|
status|info|stats)
|
|
@@ -57,7 +62,7 @@ case "$1" in
|
|
|
57
62
|
;;
|
|
58
63
|
|
|
59
64
|
serve|server)
|
|
60
|
-
PORT="${2:-
|
|
65
|
+
PORT="${2:-8417}"
|
|
61
66
|
echo "Starting SuperLocalMemory MCP HTTP server..."
|
|
62
67
|
echo "Endpoint: http://localhost:$PORT"
|
|
63
68
|
echo ""
|
|
@@ -142,7 +147,7 @@ PATTERN LEARNING:
|
|
|
142
147
|
slm patterns context [threshold] Get coding identity context
|
|
143
148
|
|
|
144
149
|
HTTP SERVER:
|
|
145
|
-
slm serve [PORT] Start MCP HTTP server (default port
|
|
150
|
+
slm serve [PORT] Start MCP HTTP server (default port 8417)
|
|
146
151
|
For ChatGPT/remote: ngrok http PORT
|
|
147
152
|
|
|
148
153
|
ADVANCED:
|
package/mcp_server.py
CHANGED
|
@@ -46,9 +46,18 @@ except ImportError as e:
|
|
|
46
46
|
print(f"Ensure SuperLocalMemory V2 is installed at {MEMORY_DIR}", file=sys.stderr)
|
|
47
47
|
sys.exit(1)
|
|
48
48
|
|
|
49
|
+
# Parse command line arguments early (needed for port in constructor)
|
|
50
|
+
import argparse as _argparse
|
|
51
|
+
_parser = _argparse.ArgumentParser(add_help=False)
|
|
52
|
+
_parser.add_argument("--transport", default="stdio")
|
|
53
|
+
_parser.add_argument("--port", type=int, default=8417)
|
|
54
|
+
_pre_args, _ = _parser.parse_known_args()
|
|
55
|
+
|
|
49
56
|
# Initialize MCP server
|
|
50
57
|
mcp = FastMCP(
|
|
51
|
-
name="SuperLocalMemory V2"
|
|
58
|
+
name="SuperLocalMemory V2",
|
|
59
|
+
host="127.0.0.1",
|
|
60
|
+
port=_pre_args.port,
|
|
52
61
|
)
|
|
53
62
|
|
|
54
63
|
# Database path
|
|
@@ -523,15 +532,15 @@ if __name__ == "__main__":
|
|
|
523
532
|
)
|
|
524
533
|
parser.add_argument(
|
|
525
534
|
"--transport",
|
|
526
|
-
choices=["stdio", "http"],
|
|
535
|
+
choices=["stdio", "http", "sse"],
|
|
527
536
|
default="stdio",
|
|
528
|
-
help="Transport method: stdio for local IDEs (default), http for remote access"
|
|
537
|
+
help="Transport method: stdio for local IDEs (default), http/sse for remote access"
|
|
529
538
|
)
|
|
530
539
|
parser.add_argument(
|
|
531
540
|
"--port",
|
|
532
541
|
type=int,
|
|
533
|
-
default=
|
|
534
|
-
help="Port for HTTP transport (default
|
|
542
|
+
default=8417,
|
|
543
|
+
help="Port for HTTP transport (default 8417)"
|
|
535
544
|
)
|
|
536
545
|
|
|
537
546
|
args = parser.parse_args()
|
|
@@ -580,6 +589,7 @@ if __name__ == "__main__":
|
|
|
580
589
|
# stdio transport for local IDEs (default)
|
|
581
590
|
mcp.run(transport="stdio")
|
|
582
591
|
else:
|
|
583
|
-
#
|
|
584
|
-
|
|
585
|
-
|
|
592
|
+
# SSE transport for remote access (ChatGPT, web clients)
|
|
593
|
+
# "http" is accepted as alias for "sse"
|
|
594
|
+
print(f"HTTP/SSE server will be available at http://localhost:{args.port}", file=sys.stderr)
|
|
595
|
+
mcp.run(transport="sse")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
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 16+ AI tools. 100% local, zero cloud dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|
package/src/graph_engine.py
CHANGED
|
@@ -882,9 +882,9 @@ class GraphEngine:
|
|
|
882
882
|
|
|
883
883
|
# Cluster breakdown
|
|
884
884
|
cluster_info = cursor.execute('''
|
|
885
|
-
SELECT
|
|
885
|
+
SELECT name, member_count, avg_importance
|
|
886
886
|
FROM graph_clusters
|
|
887
|
-
ORDER BY
|
|
887
|
+
ORDER BY member_count DESC
|
|
888
888
|
LIMIT 10
|
|
889
889
|
''').fetchall()
|
|
890
890
|
|
package/src/memory-profiles.py
CHANGED
|
@@ -259,8 +259,8 @@ class ProfileManager:
|
|
|
259
259
|
|
|
260
260
|
print(f"\nSwitching from '{current}' to '{name}'...")
|
|
261
261
|
|
|
262
|
-
# Save current profile
|
|
263
|
-
if current and current in self.config['profiles']:
|
|
262
|
+
# Save current profile (skip for 'default' — it uses main DB directly)
|
|
263
|
+
if current and current != 'default' and current in self.config['profiles']:
|
|
264
264
|
self._save_current_to_profile(current)
|
|
265
265
|
|
|
266
266
|
# Load new profile
|
package/src/pattern_learner.py
CHANGED
|
@@ -655,17 +655,17 @@ class PatternStore:
|
|
|
655
655
|
|
|
656
656
|
if pattern_type:
|
|
657
657
|
cursor.execute('''
|
|
658
|
-
SELECT id, pattern_type,
|
|
658
|
+
SELECT id, pattern_type, key, value, confidence, evidence_count, updated_at, created_at
|
|
659
659
|
FROM identity_patterns
|
|
660
660
|
WHERE confidence >= ? AND pattern_type = ?
|
|
661
|
-
ORDER BY confidence DESC,
|
|
661
|
+
ORDER BY confidence DESC, evidence_count DESC
|
|
662
662
|
''', (min_confidence, pattern_type))
|
|
663
663
|
else:
|
|
664
664
|
cursor.execute('''
|
|
665
|
-
SELECT id, pattern_type,
|
|
665
|
+
SELECT id, pattern_type, key, value, confidence, evidence_count, updated_at, created_at
|
|
666
666
|
FROM identity_patterns
|
|
667
667
|
WHERE confidence >= ?
|
|
668
|
-
ORDER BY confidence DESC,
|
|
668
|
+
ORDER BY confidence DESC, evidence_count DESC
|
|
669
669
|
''', (min_confidence,))
|
|
670
670
|
|
|
671
671
|
patterns = []
|