superlocalmemory 3.0.21 → 3.0.23
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
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.23",
|
|
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
|
@@ -33,7 +33,15 @@ MAX_RETRIES = 3
|
|
|
33
33
|
RETRY_BACKOFF_BASE = 2 # seconds: 2, 4, 8
|
|
34
34
|
REQUEST_TIMEOUT = 10 # seconds
|
|
35
35
|
MAX_QUEUE_SIZE = 1000
|
|
36
|
-
|
|
36
|
+
def _get_version() -> str:
|
|
37
|
+
try:
|
|
38
|
+
from importlib.metadata import version
|
|
39
|
+
return version("superlocalmemory")
|
|
40
|
+
except Exception:
|
|
41
|
+
return "3.0.0"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
VERSION = _get_version()
|
|
37
45
|
|
|
38
46
|
# stdlib HTTP -- always available
|
|
39
47
|
from urllib.request import Request, urlopen # noqa: E402
|
|
@@ -23,6 +23,7 @@ from pydantic import BaseModel
|
|
|
23
23
|
import uvicorn
|
|
24
24
|
|
|
25
25
|
from superlocalmemory.server.security_middleware import SecurityHeadersMiddleware
|
|
26
|
+
from superlocalmemory.server.ui import SLM_VERSION
|
|
26
27
|
|
|
27
28
|
logger = logging.getLogger("superlocalmemory.api_server")
|
|
28
29
|
|
|
@@ -84,7 +85,7 @@ def create_app() -> FastAPI:
|
|
|
84
85
|
application = FastAPI(
|
|
85
86
|
title="SuperLocalMemory V3 API",
|
|
86
87
|
description="V3 Memory Engine REST API",
|
|
87
|
-
version=
|
|
88
|
+
version=SLM_VERSION,
|
|
88
89
|
lifespan=lifespan,
|
|
89
90
|
)
|
|
90
91
|
|
|
@@ -212,7 +213,7 @@ def create_app() -> FastAPI:
|
|
|
212
213
|
engine = application.state.engine
|
|
213
214
|
return {
|
|
214
215
|
"status": "healthy",
|
|
215
|
-
"version":
|
|
216
|
+
"version": SLM_VERSION,
|
|
216
217
|
"engine": "initialized" if engine else "unavailable",
|
|
217
218
|
"database": "connected" if DB_PATH.exists() else "missing",
|
|
218
219
|
"timestamp": datetime.now().isoformat(),
|
|
@@ -24,6 +24,27 @@ from datetime import datetime
|
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
27
|
+
|
|
28
|
+
def _get_version() -> str:
|
|
29
|
+
"""Read version from package metadata, falling back to pyproject.toml."""
|
|
30
|
+
try:
|
|
31
|
+
from importlib.metadata import version
|
|
32
|
+
return version("superlocalmemory")
|
|
33
|
+
except Exception:
|
|
34
|
+
pass
|
|
35
|
+
try:
|
|
36
|
+
import tomllib
|
|
37
|
+
toml_path = Path(__file__).resolve().parent.parent.parent.parent / "pyproject.toml"
|
|
38
|
+
if toml_path.exists():
|
|
39
|
+
with open(toml_path, "rb") as f:
|
|
40
|
+
return tomllib.load(f)["project"]["version"]
|
|
41
|
+
except Exception:
|
|
42
|
+
pass
|
|
43
|
+
return "3.0.0"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
SLM_VERSION = _get_version()
|
|
47
|
+
|
|
27
48
|
_script_dir = str(Path(__file__).parent.resolve())
|
|
28
49
|
sys.path = [p for p in sys.path if p not in ("", _script_dir)]
|
|
29
50
|
|
|
@@ -54,7 +75,7 @@ def create_app() -> FastAPI:
|
|
|
54
75
|
application = FastAPI(
|
|
55
76
|
title="SuperLocalMemory V3 UI Server",
|
|
56
77
|
description="Memory Dashboard with V3 Engine, Trust, Learning, and Compliance",
|
|
57
|
-
version=
|
|
78
|
+
version=SLM_VERSION,
|
|
58
79
|
docs_url="/api/docs",
|
|
59
80
|
redoc_url="/api/redoc",
|
|
60
81
|
)
|
|
@@ -185,7 +206,7 @@ def create_app() -> FastAPI:
|
|
|
185
206
|
"""Health check endpoint."""
|
|
186
207
|
return {
|
|
187
208
|
"status": "healthy",
|
|
188
|
-
"version":
|
|
209
|
+
"version": SLM_VERSION,
|
|
189
210
|
"database": "connected" if DB_PATH.exists() else "missing",
|
|
190
211
|
"timestamp": datetime.now().isoformat(),
|
|
191
212
|
}
|
package/ui/js/dashboard.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
// SuperLocalMemory V3 — Dashboard
|
|
2
2
|
// Part of Qualixar | https://superlocalmemory.com
|
|
3
3
|
|
|
4
|
+
// Auto-refresh dashboard when tab becomes visible (fixes stale data after settings change)
|
|
5
|
+
document.addEventListener('visibilitychange', function() {
|
|
6
|
+
if (!document.hidden) loadDashboard();
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// Also refresh when navigating back to dashboard tab in SPA
|
|
10
|
+
window.addEventListener('hashchange', function() {
|
|
11
|
+
if (window.location.hash === '' || window.location.hash === '#dashboard') {
|
|
12
|
+
loadDashboard();
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// Refresh on focus (covers alt-tab back to browser)
|
|
17
|
+
window.addEventListener('focus', function() { loadDashboard(); });
|
|
18
|
+
|
|
4
19
|
async function loadDashboard() {
|
|
5
20
|
try {
|
|
6
21
|
var response = await fetch('/api/v3/dashboard');
|