superlocalmemory 3.6.19 → 3.6.20
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/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/requirements.txt +1 -1
- package/plugin-src/manifest.json +1 -1
- package/plugin-src/requirements.txt +1 -1
- package/pyproject.toml +1 -1
- package/src/superlocalmemory/__init__.py +1 -1
- package/src/superlocalmemory/server/routes/mesh.py +8 -15
- package/src/superlocalmemory.egg-info/PKG-INFO +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.20",
|
|
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/plugin/requirements.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==3.6.
|
|
1
|
+
superlocalmemory==3.6.20
|
package/plugin-src/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==3.6.
|
|
1
|
+
superlocalmemory==3.6.20
|
package/pyproject.toml
CHANGED
|
@@ -32,7 +32,7 @@ if "OMP_NUM_THREADS" not in os.environ:
|
|
|
32
32
|
os.environ["OMP_NUM_THREADS"] = "2"
|
|
33
33
|
# ---------------------------------------------------------------------------
|
|
34
34
|
|
|
35
|
-
__version__ = "3.6.
|
|
35
|
+
__version__ = "3.6.20"
|
|
36
36
|
|
|
37
37
|
_REQUIRED_VERSIONS = {
|
|
38
38
|
"sentence_transformers": "5.3.0",
|
|
@@ -87,24 +87,18 @@ def _get_broker(request: Request):
|
|
|
87
87
|
client_host = request.client.host if request.client else ""
|
|
88
88
|
if client_host not in ("127.0.0.1", "::1", "localhost"):
|
|
89
89
|
import hmac
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
# Accept X-Mesh-Secret (undocumented legacy header, v3.6.12 regression) OR
|
|
91
|
+
# Authorization: Bearer <secret> (RFC 7617 — canonical; what remote_sync.py
|
|
92
|
+
# sends and what the docs specify). Both are constant-time compared.
|
|
93
|
+
presented = (
|
|
94
|
+
request.headers.get("x-mesh-secret")
|
|
95
|
+
or request.headers.get("authorization", "").removeprefix("Bearer ").strip()
|
|
96
|
+
)
|
|
97
|
+
if not presented or not hmac.compare_digest(presented, secret):
|
|
92
98
|
raise HTTPException(401, detail="invalid or missing mesh secret")
|
|
93
99
|
return broker
|
|
94
100
|
|
|
95
101
|
|
|
96
|
-
def _validate_remote_auth(request: Request, broker) -> None:
|
|
97
|
-
"""Validate bearer token for cross-machine requests."""
|
|
98
|
-
if not broker._is_remote:
|
|
99
|
-
return # local mode — no auth needed
|
|
100
|
-
secret = broker._shared_secret
|
|
101
|
-
if not secret:
|
|
102
|
-
return
|
|
103
|
-
auth = request.headers.get("Authorization", "")
|
|
104
|
-
if auth != f"Bearer {secret}":
|
|
105
|
-
raise HTTPException(401, detail="Unauthorized")
|
|
106
|
-
|
|
107
|
-
|
|
108
102
|
# -- Routes --
|
|
109
103
|
|
|
110
104
|
@router.post("/register")
|
|
@@ -130,7 +124,6 @@ async def deregister(req: DeregisterRequest, request: Request):
|
|
|
130
124
|
@router.get("/peers")
|
|
131
125
|
async def peers(request: Request):
|
|
132
126
|
broker = _get_broker(request)
|
|
133
|
-
_validate_remote_auth(request, broker)
|
|
134
127
|
return {"peers": broker.list_all_peers()}
|
|
135
128
|
|
|
136
129
|
|