superlocalmemory 3.0.25 → 3.0.26
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/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/server/ui.py +12 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
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
|
@@ -26,24 +26,20 @@ logger = logging.getLogger(__name__)
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def _get_version() -> str:
|
|
29
|
-
"""Read version from package
|
|
29
|
+
"""Read version from package.json (npm), pyproject.toml, or metadata."""
|
|
30
30
|
import json as _json
|
|
31
|
-
# 1. Try importlib.metadata (works when pip-installed)
|
|
32
|
-
try:
|
|
33
|
-
from importlib.metadata import version
|
|
34
|
-
return version("superlocalmemory")
|
|
35
|
-
except Exception:
|
|
36
|
-
pass
|
|
37
|
-
# 2. Try package.json (works when npm-installed)
|
|
38
31
|
pkg_root = Path(__file__).resolve().parent.parent.parent.parent
|
|
32
|
+
# 1. Try package.json FIRST (source of truth for npm installs)
|
|
39
33
|
try:
|
|
40
34
|
pkg_json = pkg_root / "package.json"
|
|
41
35
|
if pkg_json.exists():
|
|
42
36
|
with open(pkg_json) as f:
|
|
43
|
-
|
|
37
|
+
v = _json.load(f).get("version", "")
|
|
38
|
+
if v:
|
|
39
|
+
return v
|
|
44
40
|
except Exception:
|
|
45
41
|
pass
|
|
46
|
-
#
|
|
42
|
+
# 2. Try pyproject.toml (source of truth for pip installs)
|
|
47
43
|
try:
|
|
48
44
|
import tomllib
|
|
49
45
|
toml_path = pkg_root / "pyproject.toml"
|
|
@@ -52,6 +48,12 @@ def _get_version() -> str:
|
|
|
52
48
|
return tomllib.load(f)["project"]["version"]
|
|
53
49
|
except Exception:
|
|
54
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
|
|
55
57
|
return "unknown"
|
|
56
58
|
|
|
57
59
|
|