nexo-brain 7.9.11 → 7.9.12

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.9.11",
3
+ "version": "7.9.12",
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.9.11` is the current packaged-runtime line. Patch release over `7.9.10`: canonical Desktop lifecycle completion now requires both diary evidence and real stop evidence before Brain marks archive/delete/app-exit done, canonical plans add `wait_for_stop`, and Brain exposes the exact stop-wait primitives Desktop uses to avoid leaving duplicate live NEXO sessions behind a reopened conversation. Coordinated Desktop release: v0.28.12.
21
+ Version `7.9.12` is the current packaged-runtime line. Patch release over `7.9.11`: managed `~/.nexo/bin/nexo` wrappers now self-repair `core/current` when it lags behind `~/.nexo/core`, so installed users stop executing stale snapshots and `nexo update` no longer gets stuck claiming “Already up to date” from the old runtime. Coordinated Desktop release: v0.28.13.
22
22
 
23
23
  Previously in `7.9.5`: patch release that fixes canonical diary confirmation for Desktop: Brain resolves the Desktop/Claude session UUID through NEXO SID aliases before checking `session_diary`, so archive/delete/app-exit can confirm diaries written by `nexo_session_diary_write` under the active `nexo-...` SID. Verification: `pytest tests/test_lifecycle_events.py` (28 passing) plus coordinated Desktop v0.28.6 shutdown/archive/delete/app-exit checks.
24
24
 
package/bin/nexo-brain.js CHANGED
@@ -3442,6 +3442,31 @@ async function runSetup() {
3442
3442
  ' echo "NEXO runtime Python not found. Run nexo-brain or nexo update to repair the installation." >&2',
3443
3443
  ' exit 1',
3444
3444
  'fi',
3445
+ 'read_runtime_version() {',
3446
+ ' local base="${1:-}"',
3447
+ ' [ -n "$base" ] || return 0',
3448
+ ' local candidate=""',
3449
+ ' for candidate in "$base/version.json" "$base/package.json"; do',
3450
+ ' [ -f "$candidate" ] || continue',
3451
+ ' "$PYTHON" -c "import json, sys; from pathlib import Path; payload=json.loads(Path(sys.argv[1]).read_text(encoding=\\"utf-8\\")); version=str(payload.get(\\"version\\", \\"\\")).strip(); sys.stdout.write(version); sys.exit(0 if version else 1)" "$candidate" 2>/dev/null || continue',
3452
+ ' return 0',
3453
+ ' done',
3454
+ ' return 0',
3455
+ '}',
3456
+ 'repair_stale_current_runtime() {',
3457
+ ' local core_root="$NEXO_HOME/core"',
3458
+ ' local current_root="$NEXO_HOME/core/current"',
3459
+ ' [ -d "$core_root" ] || return 0',
3460
+ ' [ -e "$current_root" ] || return 0',
3461
+ ' local core_version=""',
3462
+ ' local current_version=""',
3463
+ ' core_version="$(read_runtime_version "$core_root")"',
3464
+ ' current_version="$(read_runtime_version "$current_root")"',
3465
+ ' [ -n "$core_version" ] || return 0',
3466
+ ' [ "$core_version" = "$current_version" ] && return 0',
3467
+ ' NEXO_HOME="$NEXO_HOME" NEXO_CODE="$core_root" "$PYTHON" -c "import os, sys; from pathlib import Path; home=Path(os.environ[\\"NEXO_HOME\\"]); core=home / \\"core\\"; sys.path.insert(0, str(core)); from runtime_versioning import activate_versioned_runtime_snapshot, read_version_for_path; version=read_version_for_path(core); result=activate_versioned_runtime_snapshot(source_root=core, version=str(version or \\"\\").strip()); sys.exit(0 if result.get(\\"ok\\") else 1)" >/dev/null 2>&1 || return 0',
3468
+ '}',
3469
+ 'repair_stale_current_runtime',
3445
3470
  'CLI_PY="$NEXO_CODE/cli.py"',
3446
3471
  'if [ ! -f "$CLI_PY" ] && [ -f "$NEXO_HOME/core/current/cli.py" ]; then',
3447
3472
  ' NEXO_CODE="$NEXO_HOME/core/current"',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexo-brain",
3
- "version": "7.9.11",
3
+ "version": "7.9.12",
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",
@@ -593,6 +593,31 @@ def _runtime_cli_wrapper_text() -> str:
593
593
  ' echo "NEXO runtime Python not found. Run nexo-brain or nexo update to repair the installation." >&2\n'
594
594
  ' exit 1\n'
595
595
  'fi\n'
596
+ 'read_runtime_version() {\n'
597
+ ' local base="${1:-}"\n'
598
+ ' [ -n "$base" ] || return 0\n'
599
+ ' local candidate=""\n'
600
+ ' for candidate in "$base/version.json" "$base/package.json"; do\n'
601
+ ' [ -f "$candidate" ] || continue\n'
602
+ ' "$PYTHON" -c "import json, sys; from pathlib import Path; payload=json.loads(Path(sys.argv[1]).read_text(encoding=\\"utf-8\\")); version=str(payload.get(\\"version\\", \\"\\")).strip(); sys.stdout.write(version); sys.exit(0 if version else 1)" "$candidate" 2>/dev/null || continue\n'
603
+ ' return 0\n'
604
+ ' done\n'
605
+ ' return 0\n'
606
+ '}\n'
607
+ 'repair_stale_current_runtime() {\n'
608
+ ' local core_root="$NEXO_HOME/core"\n'
609
+ ' local current_root="$NEXO_HOME/core/current"\n'
610
+ ' [ -d "$core_root" ] || return 0\n'
611
+ ' [ -e "$current_root" ] || return 0\n'
612
+ ' local core_version=""\n'
613
+ ' local current_version=""\n'
614
+ ' core_version="$(read_runtime_version "$core_root")"\n'
615
+ ' current_version="$(read_runtime_version "$current_root")"\n'
616
+ ' [ -n "$core_version" ] || return 0\n'
617
+ ' [ "$core_version" = "$current_version" ] && return 0\n'
618
+ ' NEXO_HOME="$NEXO_HOME" NEXO_CODE="$core_root" "$PYTHON" -c "import os, sys; from pathlib import Path; home=Path(os.environ[\\"NEXO_HOME\\"]); core=home / \\"core\\"; sys.path.insert(0, str(core)); from runtime_versioning import activate_versioned_runtime_snapshot, read_version_for_path; version=read_version_for_path(core); result=activate_versioned_runtime_snapshot(source_root=core, version=str(version or \\"\\").strip()); sys.exit(0 if result.get(\\"ok\\") else 1)" >/dev/null 2>&1 || return 0\n'
619
+ '}\n'
620
+ 'repair_stale_current_runtime\n'
596
621
  'CLI_PY="$NEXO_CODE/cli.py"\n'
597
622
  'if [ ! -f "$CLI_PY" ] && [ -f "$NEXO_HOME/core/current/cli.py" ]; then\n'
598
623
  ' NEXO_CODE="$NEXO_HOME/core/current"\n'