superlocalmemory 3.5.6 → 3.5.8

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 CHANGED
@@ -5,6 +5,21 @@ All notable changes to SuperLocalMemory V3 will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.5.8] - 2026-06-06 — MCP zombie process fix
9
+
10
+ ### Fixed
11
+ - `slm mcp` zombie processes no longer accumulate across IDE sessions. Each new session now kills stale orphaned MCP bridges (dead parent) before starting. Also fixed `find_slm_processes()` which was blind to entry-point launched processes.
12
+
13
+ ## [3.5.7] - 2026-06-03 — Fix `__version__` mismatch (PyPI wheel correctness)
14
+
15
+ ### Fixed
16
+ - `superlocalmemory.__version__` now correctly returns `"3.5.7"` at runtime.
17
+ The 3.5.6 PyPI wheel shipped with `__version__ = "3.4.64"` in `__init__.py`
18
+ (stale value not updated during the M4 release). Any code or tool that reads
19
+ `superlocalmemory.__version__` (including `slm status`) would show `3.4.64`
20
+ despite the package being at 3.5.6. This patch corrects the value and adds
21
+ a CI note to keep `__version__` in sync with `pyproject.toml` on every bump.
22
+
8
23
  ## [3.5.6] - 2026-06-03 — Isolate LightGBM training (macOS daemon SIGSEGV fix)
9
24
 
10
25
  ### Fixed (CRITICAL — daemon hard-crash on macOS / Apple Silicon)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superlocalmemory",
3
- "version": "3.5.6",
3
+ "version": "3.5.8",
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.5.6"
3
+ version = "3.5.8"
4
4
  description = "Information-geometric agent memory with mathematical guarantees"
5
5
  readme = "README.md"
6
6
  license = {text = "AGPL-3.0-or-later"}
@@ -28,7 +28,7 @@ if "OMP_NUM_THREADS" not in os.environ:
28
28
  os.environ["OMP_NUM_THREADS"] = "2"
29
29
  # ---------------------------------------------------------------------------
30
30
 
31
- __version__ = "3.4.64"
31
+ __version__ = "3.5.8"
32
32
 
33
33
  _REQUIRED_VERSIONS = {
34
34
  "sentence_transformers": "5.3.0",
@@ -1661,6 +1661,26 @@ def cmd_trace(args: Namespace) -> None:
1661
1661
 
1662
1662
  def cmd_mcp(_args: Namespace) -> None:
1663
1663
  """Start the V3 MCP server (stdio transport for IDE integration)."""
1664
+ # SINGLETON GUARD (v3.5.8): Reap fresh orphans before binding stdio.
1665
+ # Root cause: every IDE session spawns a new `slm mcp`; dead sessions'
1666
+ # processes survive indefinitely (~400 MB each) because the reaper's
1667
+ # 1-hour age gate misses them. Fix: run find_orphans with age_threshold=0
1668
+ # so any `slm mcp` whose parent IDE/Claude process has died is killed
1669
+ # immediately. Only orphans (dead parent) are killed — live sessions safe.
1670
+ # CRITICAL: No stdout anywhere below — MCP stdio transport, any print
1671
+ # corrupts the JSON-RPC protocol.
1672
+ try:
1673
+ from superlocalmemory.infra.process_reaper import (
1674
+ ReaperConfig,
1675
+ find_orphans,
1676
+ kill_orphan,
1677
+ )
1678
+ _reaper_cfg = ReaperConfig(orphan_age_threshold_hours=0.0)
1679
+ for _orphan in find_orphans(_reaper_cfg):
1680
+ kill_orphan(_orphan.pid, graceful_timeout_seconds=1.0)
1681
+ except Exception:
1682
+ pass # Never block MCP startup on cleanup failure
1683
+
1664
1684
  # Auto-install hooks on MCP startup (fast path: ~0.1ms if already current)
1665
1685
  # CRITICAL: No stdout — MCP uses stdio transport, any print corrupts protocol
1666
1686
  try:
@@ -185,7 +185,18 @@ else:
185
185
  if not line:
186
186
  continue
187
187
 
188
- if "superlocalmemory" not in line:
188
+ # v3.5.8: Expand detection to include entry-point launched `slm mcp`
189
+ # processes. Previously only `python -m superlocalmemory.*` was caught;
190
+ # `/opt/homebrew/bin/slm mcp` processes were invisible to the reaper,
191
+ # causing zombie accumulation (55 processes / ~5 GB RAM observed).
192
+ _slm_identifiers = (
193
+ "superlocalmemory",
194
+ "/slm ",
195
+ "slm mcp",
196
+ "slm serve",
197
+ "slm daemon",
198
+ )
199
+ if not any(kw in line for kw in _slm_identifiers):
189
200
  continue
190
201
 
191
202
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superlocalmemory
3
- Version: 3.5.6
3
+ Version: 3.5.8
4
4
  Summary: Information-geometric agent memory with mathematical guarantees
5
5
  Author-email: Varun Pratap Bhardwaj <admin@superlocalmemory.com>
6
6
  License: AGPL-3.0-or-later