nexo-brain 7.37.0 → 7.37.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexo-brain",
3
- "version": "7.37.0",
3
+ "version": "7.37.1",
4
4
  "description": "Local cognitive runtime for Claude Code \u2014 persistent memory, overnight learning, doctor diagnostics, personal scripts, recovery-aware jobs, startup preflight, and optional dashboard/power helper.",
5
5
  "author": {
6
6
  "name": "NEXO Brain",
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  [Watch the overview video](https://nexo-brain.com/watch/) · [Watch on YouTube](https://www.youtube.com/watch?v=i2lkGhKyVqI) · [Open the infographic](https://nexo-brain.com/assets/nexo-brain-infographic-v5.png)
20
20
 
21
- Version `7.37.0` is the current packaged-runtime line. Minor release - transparent server self-heal: when an update lands while a Brain MCP server is already running, the resident stdio child now re-execs itself in place (same process, same live MCP connection) instead of telling the user to restart, so the updated code runs immediately with nothing visible. Fail-open (non-POSIX, re-exec error, resident service, or `NEXO_DISABLE_SELFHEAL_REEXEC` kill switch all fall back to the prior safe hard-exit), anti-loop (bounded generations + same-target guard), defers past any in-flight tool call, and a boot-time pre-serve heal. Also fixes email-monitor zombie reinjection: an already-replied email left in 'processing' after a crash is closed as terminal 'processed' and never re-sent as a duplicate reply. Builds on v7.36.0 (local index disk reclaim).
21
+ Version `7.37.1` is the current packaged-runtime line. Patch release over v7.37.0 - release hardening for Desktop-bundled Brain: large existing `local-context.db` files no longer run a surprise full `VACUUM` on the first writer, `schema_abstraction` MCP tools are loaded by the essential startup set, and learning tools tolerate Desktop compatibility payloads. Builds on v7.37.0 (transparent server self-heal + email zombie reinjection guard).
22
22
 
23
23
  Previously in `7.31.9`: patch release over v7.31.8 - UI release closeout now has to prove the original reported symptom was reopened with observable evidence before claiming the release is ready.
24
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexo-brain",
3
- "version": "7.37.0",
3
+ "version": "7.37.1",
4
4
  "mcpName": "io.github.wazionapps/nexo",
5
5
  "description": "NEXO Brain — Shared brain for AI agents. Persistent memory, semantic RAG, natural forgetting, metacognitive guard, trust scoring, 150+ MCP tools. Works with Claude Code, Codex, Claude Desktop & any MCP client. 100% local, free.",
6
6
  "homepage": "https://nexo-brain.com",
@@ -20,6 +20,8 @@ MAIN_CLEANUP_STATE_KEY = "local_context_main_tables_drained"
20
20
  # per never-converted DB (guarded by free disk) and record it here so it never
21
21
  # re-runs the expensive rewrite. See ensure_local_context_db().
22
22
  AUTO_VACUUM_CONVERTED_KEY = "auto_vacuum_converted"
23
+ AUTO_VACUUM_MAX_SYNC_BYTES_ENV = "NEXO_LOCAL_CONTEXT_AUTO_VACUUM_MAX_SYNC_BYTES"
24
+ DEFAULT_AUTO_VACUUM_MAX_SYNC_BYTES = 128 * 1024 * 1024
23
25
 
24
26
  LOCAL_CONTEXT_TABLES: tuple[str, ...] = (
25
27
  "local_index_roots",
@@ -472,6 +474,9 @@ def _convert_auto_vacuum_once(conn: sqlite3.Connection, db_path: Path) -> None:
472
474
  free = shutil.disk_usage(db_path.parent).free
473
475
  except OSError:
474
476
  return
477
+ max_sync_bytes = _auto_vacuum_max_sync_bytes()
478
+ if max_sync_bytes <= 0 or db_size > max_sync_bytes:
479
+ return
475
480
  if free <= db_size * 2:
476
481
  # Not enough scratch room — leave NONE mode, retry on a later boot.
477
482
  return
@@ -486,6 +491,16 @@ def _convert_auto_vacuum_once(conn: sqlite3.Connection, db_path: Path) -> None:
486
491
  pass
487
492
 
488
493
 
494
+ def _auto_vacuum_max_sync_bytes() -> int:
495
+ value = os.environ.get(AUTO_VACUUM_MAX_SYNC_BYTES_ENV, "")
496
+ if value:
497
+ try:
498
+ return max(0, int(value))
499
+ except (TypeError, ValueError):
500
+ return DEFAULT_AUTO_VACUUM_MAX_SYNC_BYTES
501
+ return DEFAULT_AUTO_VACUUM_MAX_SYNC_BYTES
502
+
503
+
489
504
  def get_local_context_db() -> sqlite3.Connection:
490
505
  ensure_local_context_db()
491
506
  assert _CONN is not None
package/src/server.py CHANGED
@@ -340,6 +340,7 @@ _ESSENTIAL_MCP_STARTUP_PLUGINS = (
340
340
  "preferences.py",
341
341
  "protocol.py",
342
342
  "recover.py",
343
+ "schema_abstraction.py",
343
344
  "skills.py",
344
345
  "user_state_tools.py",
345
346
  "workflow.py",
@@ -2630,12 +2631,14 @@ def nexo_learning_resolve_candidate(
2630
2631
 
2631
2632
 
2632
2633
  @mcp.tool
2633
- def nexo_learning_search(query: str, category: str = "") -> str:
2634
+ def nexo_learning_search(query: str, category: str = "", limit: int = 0) -> str:
2634
2635
  """Search learnings by keyword. Searches title and content.
2635
2636
 
2636
2637
  Args:
2637
2638
  query: Search term.
2638
2639
  category: Filter by category (optional).
2640
+ limit: Accepted for Desktop/client compatibility; search ranking is
2641
+ owned by the Brain handler.
2639
2642
  """
2640
2643
  return handle_learning_search(query, category)
2641
2644
 
@@ -2767,13 +2770,15 @@ def nexo_learning_delete(id: int) -> str:
2767
2770
 
2768
2771
 
2769
2772
  @mcp.tool
2770
- def nexo_learning_list(category: str = "", created_after: str = "", created_before: str = "") -> str:
2773
+ def nexo_learning_list(category: str = "", created_after: str = "", created_before: str = "", limit: int = 0) -> str:
2771
2774
  """List all learnings, grouped by category.
2772
2775
 
2773
2776
  Args:
2774
2777
  category: Filter by category (optional). If empty, shows all grouped.
2775
2778
  created_after: Filter to learnings created at or after this date/time (optional).
2776
2779
  created_before: Filter to learnings created at or before this date/time (optional).
2780
+ limit: Accepted for Desktop/client compatibility; grouping is owned by
2781
+ the Brain handler.
2777
2782
  """
2778
2783
  return handle_learning_list(category, created_after, created_before)
2779
2784