superlocalmemory 3.0.27 → 3.0.28

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlocalmemory",
3
- "version": "3.0.27",
3
+ "version": "3.0.28",
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "superlocalmemory"
3
- version = "3.0.27"
3
+ version = "3.0.28"
4
4
  description = "Information-geometric agent memory with mathematical guarantees"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -18,12 +18,35 @@ import json
18
18
 
19
19
 
20
20
  def _get_version() -> str:
21
- """Get installed package version."""
21
+ """Read version from package.json (npm), pyproject.toml, or metadata."""
22
+ from pathlib import Path
23
+ pkg_root = Path(__file__).resolve().parent.parent.parent.parent
24
+ # 1. package.json (npm installs)
25
+ try:
26
+ pkg_json = pkg_root / "package.json"
27
+ if pkg_json.exists():
28
+ with open(pkg_json) as f:
29
+ v = json.load(f).get("version", "")
30
+ if v:
31
+ return v
32
+ except Exception:
33
+ pass
34
+ # 2. pyproject.toml (pip installs)
35
+ try:
36
+ import tomllib
37
+ toml_path = pkg_root / "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
+ # 3. importlib.metadata fallback
22
44
  try:
23
45
  from importlib.metadata import version
24
46
  return version("superlocalmemory")
25
47
  except Exception:
26
- return "unknown"
48
+ pass
49
+ return "unknown"
27
50
 
28
51
 
29
52
  def json_print(
@@ -70,11 +70,8 @@ documentation:
70
70
 
71
71
  def main() -> None:
72
72
  """Parse CLI arguments and dispatch to command handlers."""
73
- try:
74
- from importlib.metadata import version as _pkg_version
75
- _ver = _pkg_version("superlocalmemory")
76
- except Exception:
77
- _ver = "unknown"
73
+ from superlocalmemory.cli.json_output import _get_version
74
+ _ver = _get_version()
78
75
 
79
76
  parser = argparse.ArgumentParser(
80
77
  prog="slm",