superlocalmemory 3.4.44 → 3.4.45
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 +10 -7
- package/scripts/install.ps1 +17 -0
- package/scripts/install.sh +17 -0
- package/scripts/postinstall.js +22 -0
- package/src/superlocalmemory/__init__.py +27 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.45",
|
|
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.4.
|
|
3
|
+
version = "3.4.45"
|
|
4
4
|
description = "Information-geometric agent memory with mathematical guarantees"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {text = "AGPL-3.0-or-later"}
|
|
@@ -54,10 +54,12 @@ dependencies = [
|
|
|
54
54
|
"psutil==7.2.2",
|
|
55
55
|
"structlog==25.5.0",
|
|
56
56
|
"portalocker==3.2.0",
|
|
57
|
-
# Semantic search + cross-encoder reranker.
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
|
|
57
|
+
# Semantic search + cross-encoder reranker. Do NOT use
|
|
58
|
+
# sentence-transformers[onnx] — its extras pull optimum which
|
|
59
|
+
# overrides the sentence-transformers pin via transitive deps.
|
|
60
|
+
# Pin all three explicitly instead.
|
|
61
|
+
"sentence-transformers==5.3.0",
|
|
62
|
+
"optimum==2.1.0",
|
|
61
63
|
"onnxruntime==1.24.4",
|
|
62
64
|
"transformers==4.57.6",
|
|
63
65
|
"huggingface_hub==0.36.2",
|
|
@@ -72,8 +74,9 @@ dependencies = [
|
|
|
72
74
|
# moved into core in v3.4.18. ``pip install superlocalmemory[search]`` still
|
|
73
75
|
# works but installs nothing extra.
|
|
74
76
|
search = [
|
|
75
|
-
# Same hard pin as core deps —
|
|
76
|
-
"sentence-transformers
|
|
77
|
+
# Same hard pin as core deps — no [onnx] extra.
|
|
78
|
+
"sentence-transformers==5.3.0",
|
|
79
|
+
"optimum==2.1.0",
|
|
77
80
|
"einops==0.8.2",
|
|
78
81
|
"torch==2.11.0",
|
|
79
82
|
"scikit-learn==1.8.0",
|
package/scripts/install.ps1
CHANGED
|
@@ -260,6 +260,23 @@ if ($ProjRoot) {
|
|
|
260
260
|
Write-Host "WARNING: pyproject.toml not found, cannot install dependencies" -ForegroundColor Yellow
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
# Verify critical dependency versions (pip resolver can override pins)
|
|
264
|
+
Write-Host ""
|
|
265
|
+
Write-Host "Verifying critical dependency versions..."
|
|
266
|
+
$criticalDeps = @{ "sentence_transformers" = "5.3.0"; "onnxruntime" = "1.24.4" }
|
|
267
|
+
foreach ($mod in $criticalDeps.Keys) {
|
|
268
|
+
$expected = $criticalDeps[$mod]
|
|
269
|
+
$pipName = $mod.Replace("_", "-")
|
|
270
|
+
$actual = & python -c "import $mod; print(getattr($mod,'__version__',''))" 2>$null
|
|
271
|
+
if ($actual -and $actual -ne $expected) {
|
|
272
|
+
Write-Host "WARNING: $pipName is $actual, expected $expected. Fixing..." -ForegroundColor Yellow
|
|
273
|
+
& python -m pip install -q "$pipName==$expected" 2>$null
|
|
274
|
+
Write-Host "OK $pipName==$expected installed" -ForegroundColor Green
|
|
275
|
+
} elseif ($actual -eq $expected) {
|
|
276
|
+
Write-Host "OK $mod==$expected" -ForegroundColor Green
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
263
280
|
# Initialize knowledge graph and pattern learning
|
|
264
281
|
Write-Host ""
|
|
265
282
|
Write-Host "Initializing advanced features..."
|
package/scripts/install.sh
CHANGED
|
@@ -389,6 +389,23 @@ else
|
|
|
389
389
|
echo "⚠️ pyproject.toml not found, cannot install dependencies"
|
|
390
390
|
fi
|
|
391
391
|
|
|
392
|
+
# Verify critical dependency versions (pip resolver can override pins)
|
|
393
|
+
echo ""
|
|
394
|
+
echo "Verifying critical dependency versions..."
|
|
395
|
+
for pair in "sentence_transformers:5.3.0:sentence-transformers" "onnxruntime:1.24.4:onnxruntime"; do
|
|
396
|
+
mod=$(echo "$pair" | cut -d: -f1)
|
|
397
|
+
expected=$(echo "$pair" | cut -d: -f2)
|
|
398
|
+
pipname=$(echo "$pair" | cut -d: -f3)
|
|
399
|
+
actual=$(python3 -c "import $mod; print(getattr($mod,'__version__',''))" 2>/dev/null)
|
|
400
|
+
if [ -n "$actual" ] && [ "$actual" != "$expected" ]; then
|
|
401
|
+
echo "⚠️ $pipname is $actual, expected $expected. Fixing..."
|
|
402
|
+
pip3 install $PIP_FLAGS -q "$pipname==$expected" 2>/dev/null
|
|
403
|
+
echo "✓ $pipname==$expected installed"
|
|
404
|
+
elif [ "$actual" = "$expected" ]; then
|
|
405
|
+
echo "✓ $mod==$expected"
|
|
406
|
+
fi
|
|
407
|
+
done
|
|
408
|
+
|
|
392
409
|
# Initialize knowledge graph and pattern learning
|
|
393
410
|
echo ""
|
|
394
411
|
echo "Initializing advanced features..."
|
package/scripts/postinstall.js
CHANGED
|
@@ -140,6 +140,28 @@ if (pipInstallPkg.status === 0) {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
// --- Step 3c: Verify critical dependency versions ---
|
|
144
|
+
// sentence-transformers and onnxruntime MUST be exact versions to avoid
|
|
145
|
+
// memory blow-up on Apple Silicon. pip resolver can override pins via
|
|
146
|
+
// transitive deps — this step catches and fixes that.
|
|
147
|
+
console.log('\nVerifying critical dependency versions...');
|
|
148
|
+
const criticalDeps = { 'sentence_transformers': '5.3.0', 'onnxruntime': '1.24.4' };
|
|
149
|
+
for (const [mod, expected] of Object.entries(criticalDeps)) {
|
|
150
|
+
const check = spawnSync(pythonParts[0], [
|
|
151
|
+
...pythonParts.slice(1), '-c',
|
|
152
|
+
`import ${mod}; v=getattr(${mod},'__version__',''); print(v)`,
|
|
153
|
+
], { stdio: 'pipe', timeout: 10000, env: { ...process.env, PATH: '/opt/homebrew/bin:/usr/local/bin:/usr/bin:' + (process.env.PATH || '') } });
|
|
154
|
+
const actual = (check.stdout || '').toString().trim();
|
|
155
|
+
if (actual && actual !== expected) {
|
|
156
|
+
const pipName = mod.replace('_', '-');
|
|
157
|
+
console.log(`⚠ ${pipName} is ${actual}, expected ${expected}. Fixing...`);
|
|
158
|
+
pipInstall([`${pipName}==${expected}`], pipName);
|
|
159
|
+
console.log(`✓ ${pipName}==${expected} installed`);
|
|
160
|
+
} else if (actual === expected) {
|
|
161
|
+
console.log(`✓ ${mod}==${expected}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
143
165
|
// --- Step 4: Detect V2 installation ---
|
|
144
166
|
const V2_HOME = path.join(os.homedir(), '.claude-memory');
|
|
145
167
|
if (fs.existsSync(V2_HOME) && fs.existsSync(path.join(V2_HOME, 'memory.db'))) {
|
|
@@ -1,3 +1,29 @@
|
|
|
1
1
|
"""SuperLocalMemory — information-geometric agent memory."""
|
|
2
2
|
|
|
3
|
-
__version__ = "3.4.
|
|
3
|
+
__version__ = "3.4.45"
|
|
4
|
+
|
|
5
|
+
_REQUIRED_VERSIONS = {
|
|
6
|
+
"sentence_transformers": "5.3.0",
|
|
7
|
+
"onnxruntime": "1.24.4",
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _check_critical_deps() -> None:
|
|
12
|
+
"""Warn if embedding-critical packages have wrong versions."""
|
|
13
|
+
import warnings
|
|
14
|
+
for mod_name, expected in _REQUIRED_VERSIONS.items():
|
|
15
|
+
try:
|
|
16
|
+
mod = __import__(mod_name)
|
|
17
|
+
actual = getattr(mod, "__version__", None)
|
|
18
|
+
if actual and actual != expected:
|
|
19
|
+
warnings.warn(
|
|
20
|
+
f"SuperLocalMemory requires {mod_name}=={expected} but "
|
|
21
|
+
f"{actual} is installed. This causes memory blow-up on "
|
|
22
|
+
f"Apple Silicon. Fix: pip install {mod_name}=={expected}",
|
|
23
|
+
stacklevel=2,
|
|
24
|
+
)
|
|
25
|
+
except ImportError:
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
_check_critical_deps()
|