superlocalmemory 3.0.30 → 3.0.31
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 +2 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/server/api.py +1 -1
- package/src/superlocalmemory/server/routes/helpers.py +36 -0
- package/src/superlocalmemory/server/routes/v3_api.py +1 -1
- package/src/superlocalmemory/server/ui.py +1 -33
package/CHANGELOG.md
CHANGED
|
@@ -16,12 +16,13 @@ SuperLocalMemory V3 - Intelligent local memory system for AI coding assistants.
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## [3.0.
|
|
19
|
+
## [3.0.31] - 2026-03-21
|
|
20
20
|
|
|
21
21
|
### Fixed
|
|
22
22
|
- Profile switching and display uses correct identifiers
|
|
23
23
|
- Profile sync across CLI, Dashboard, and MCP — all entry points now see the same profiles
|
|
24
24
|
- Profile switching now persists correctly across restarts
|
|
25
|
+
- Resolve circular import in server module loading
|
|
25
26
|
|
|
26
27
|
---
|
|
27
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.31",
|
|
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
|
@@ -23,7 +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.
|
|
26
|
+
from superlocalmemory.server.routes.helpers import SLM_VERSION
|
|
27
27
|
|
|
28
28
|
logger = logging.getLogger("superlocalmemory.api_server")
|
|
29
29
|
|
|
@@ -16,6 +16,42 @@ from typing import Optional
|
|
|
16
16
|
from fastapi import HTTPException
|
|
17
17
|
from pydantic import BaseModel, Field
|
|
18
18
|
|
|
19
|
+
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
# Version detection (shared — avoids circular import between ui.py ↔ v3_api.py)
|
|
22
|
+
# ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
def _get_version() -> str:
|
|
25
|
+
"""Read version from package.json / pyproject.toml / importlib."""
|
|
26
|
+
try:
|
|
27
|
+
import json as _json
|
|
28
|
+
pkg_root = Path(__file__).resolve().parent.parent.parent.parent
|
|
29
|
+
pkg_json = pkg_root / "package.json"
|
|
30
|
+
if pkg_json.exists():
|
|
31
|
+
with open(pkg_json) as f:
|
|
32
|
+
v = _json.load(f).get("version", "")
|
|
33
|
+
if v:
|
|
34
|
+
return v
|
|
35
|
+
except Exception:
|
|
36
|
+
pass
|
|
37
|
+
try:
|
|
38
|
+
import tomllib
|
|
39
|
+
toml_path = Path(__file__).resolve().parent.parent.parent.parent / "pyproject.toml"
|
|
40
|
+
if toml_path.exists():
|
|
41
|
+
with open(toml_path, "rb") as f:
|
|
42
|
+
return tomllib.load(f)["project"]["version"]
|
|
43
|
+
except Exception:
|
|
44
|
+
pass
|
|
45
|
+
try:
|
|
46
|
+
from importlib.metadata import version
|
|
47
|
+
return version("superlocalmemory")
|
|
48
|
+
except Exception:
|
|
49
|
+
pass
|
|
50
|
+
return "unknown"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
SLM_VERSION = _get_version()
|
|
54
|
+
|
|
19
55
|
# V3 paths (migrated from ~/.claude-memory to ~/.superlocalmemory)
|
|
20
56
|
MEMORY_DIR = Path.home() / ".superlocalmemory"
|
|
21
57
|
DB_PATH = MEMORY_DIR / "memory.db"
|
|
@@ -12,7 +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.
|
|
15
|
+
from superlocalmemory.server.routes.helpers import SLM_VERSION
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger(__name__)
|
|
18
18
|
|
|
@@ -25,39 +25,7 @@ from datetime import datetime
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
"""Read version from package.json (npm), pyproject.toml, or metadata."""
|
|
30
|
-
import json as _json
|
|
31
|
-
pkg_root = Path(__file__).resolve().parent.parent.parent.parent
|
|
32
|
-
# 1. Try package.json FIRST (source of truth for npm installs)
|
|
33
|
-
try:
|
|
34
|
-
pkg_json = pkg_root / "package.json"
|
|
35
|
-
if pkg_json.exists():
|
|
36
|
-
with open(pkg_json) as f:
|
|
37
|
-
v = _json.load(f).get("version", "")
|
|
38
|
-
if v:
|
|
39
|
-
return v
|
|
40
|
-
except Exception:
|
|
41
|
-
pass
|
|
42
|
-
# 2. Try pyproject.toml (source of truth for pip installs)
|
|
43
|
-
try:
|
|
44
|
-
import tomllib
|
|
45
|
-
toml_path = pkg_root / "pyproject.toml"
|
|
46
|
-
if toml_path.exists():
|
|
47
|
-
with open(toml_path, "rb") as f:
|
|
48
|
-
return tomllib.load(f)["project"]["version"]
|
|
49
|
-
except Exception:
|
|
50
|
-
pass
|
|
51
|
-
# 3. Fallback to importlib.metadata
|
|
52
|
-
try:
|
|
53
|
-
from importlib.metadata import version
|
|
54
|
-
return version("superlocalmemory")
|
|
55
|
-
except Exception:
|
|
56
|
-
pass
|
|
57
|
-
return "unknown"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
SLM_VERSION = _get_version()
|
|
28
|
+
from superlocalmemory.server.routes.helpers import SLM_VERSION # noqa: E402
|
|
61
29
|
|
|
62
30
|
_script_dir = str(Path(__file__).parent.resolve())
|
|
63
31
|
sys.path = [p for p in sys.path if p not in ("", _script_dir)]
|