superlocalmemory 3.0.22 → 3.0.24
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-npm +9 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/server/routes/v3_api.py +19 -13
package/bin/slm-npm
CHANGED
|
@@ -70,8 +70,16 @@ if (!python) {
|
|
|
70
70
|
process.exit(1);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
//
|
|
73
|
+
// Handle --version directly from package.json (Python importlib.metadata
|
|
74
|
+
// fails when running via PYTHONPATH instead of pip install)
|
|
74
75
|
const args = process.argv.slice(2);
|
|
76
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
77
|
+
const pkg = require(path.join(PKG_ROOT, 'package.json'));
|
|
78
|
+
console.log(`superlocalmemory ${pkg.version}`);
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Launch V3 CLI via Python module
|
|
75
83
|
const pythonParts = python.split(' ');
|
|
76
84
|
const result = spawnSync(pythonParts[0], [
|
|
77
85
|
...pythonParts.slice(1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.24",
|
|
4
4
|
"description": "Information-geometric agent memory with mathematical guarantees. 4-channel retrieval, Fisher-Rao similarity, zero-LLM mode, EU AI Act compliant. Works with Claude, Cursor, Windsurf, and 17+ AI tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|
package/pyproject.toml
CHANGED
|
@@ -12,6 +12,7 @@ import os
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
from fastapi import APIRouter, Request
|
|
14
14
|
from fastapi.responses import JSONResponse
|
|
15
|
+
from superlocalmemory.server.ui import SLM_VERSION
|
|
15
16
|
|
|
16
17
|
logger = logging.getLogger(__name__)
|
|
17
18
|
|
|
@@ -27,21 +28,26 @@ async def dashboard(request: Request):
|
|
|
27
28
|
from superlocalmemory.core.config import SLMConfig
|
|
28
29
|
config = SLMConfig.load()
|
|
29
30
|
|
|
30
|
-
#
|
|
31
|
-
|
|
31
|
+
# Read stats directly from SQLite (dashboard doesn't load engine)
|
|
32
|
+
import sqlite3
|
|
32
33
|
memory_count = 0
|
|
33
34
|
fact_count = 0
|
|
34
|
-
|
|
35
|
+
db_path = config.base_dir / "memory.db"
|
|
36
|
+
if db_path.exists():
|
|
35
37
|
try:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
conn = sqlite3.connect(str(db_path))
|
|
39
|
+
cursor = conn.cursor()
|
|
40
|
+
try:
|
|
41
|
+
cursor.execute("SELECT COUNT(*) FROM atomic_facts")
|
|
42
|
+
fact_count = cursor.fetchone()[0]
|
|
43
|
+
except Exception:
|
|
44
|
+
pass
|
|
45
|
+
try:
|
|
46
|
+
cursor.execute("SELECT COUNT(*) FROM memories")
|
|
47
|
+
memory_count = cursor.fetchone()[0]
|
|
48
|
+
except Exception:
|
|
49
|
+
pass
|
|
50
|
+
conn.close()
|
|
45
51
|
except Exception:
|
|
46
52
|
pass
|
|
47
53
|
|
|
@@ -54,7 +60,7 @@ async def dashboard(request: Request):
|
|
|
54
60
|
"fact_count": fact_count,
|
|
55
61
|
"profile": config.active_profile,
|
|
56
62
|
"base_dir": str(config.base_dir),
|
|
57
|
-
"version":
|
|
63
|
+
"version": SLM_VERSION,
|
|
58
64
|
}
|
|
59
65
|
except Exception as e:
|
|
60
66
|
return JSONResponse({"error": str(e)}, status_code=500)
|