nexo-brain 7.1.1 → 7.1.3

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.
Files changed (185) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +3 -2
  3. package/bin/nexo-brain.js +198 -92
  4. package/package.json +1 -1
  5. package/src/agent_runner.py +10 -8
  6. package/src/auto_close_sessions.py +19 -2
  7. package/src/auto_update.py +242 -28
  8. package/src/autonomy_mandate.py +260 -0
  9. package/src/bootstrap_docs.py +22 -1
  10. package/src/cli.py +211 -1
  11. package/src/cli_email.py +104 -73
  12. package/src/client_sync.py +22 -1
  13. package/src/cognitive/_core.py +5 -3
  14. package/src/core_prompts.py +50 -0
  15. package/src/cron_recovery.py +81 -7
  16. package/src/crons/manifest.json +57 -0
  17. package/src/crons/sync.py +95 -26
  18. package/src/dashboard/app.py +59 -0
  19. package/src/dashboard/templates/base.html +2 -0
  20. package/src/dashboard/templates/feature-disabled.html +27 -0
  21. package/src/db/_email_accounts.py +67 -18
  22. package/src/db/_fts.py +5 -5
  23. package/src/db/_personal_scripts.py +1 -1
  24. package/src/db/_skills.py +3 -3
  25. package/src/doctor/providers/runtime.py +35 -20
  26. package/src/email_config.py +18 -9
  27. package/src/enforcement_classifier.py +3 -12
  28. package/src/enforcement_engine.py +6 -9
  29. package/src/evolution_cycle.py +37 -149
  30. package/src/guardian_telemetry.py +3 -2
  31. package/src/hook_guardrails.py +61 -0
  32. package/src/hooks/capture-tool-logs.sh +11 -3
  33. package/src/hooks/daily-briefing-check.sh +7 -2
  34. package/src/hooks/heartbeat-enforcement.py +14 -1
  35. package/src/hooks/heartbeat-posttool.sh +2 -0
  36. package/src/hooks/heartbeat-user-msg.sh +2 -0
  37. package/src/hooks/inbox-hook.sh +6 -2
  38. package/src/hooks/post-compact.sh +12 -4
  39. package/src/hooks/pre-compact.sh +12 -4
  40. package/src/migrate_embeddings.py +5 -3
  41. package/src/nexo_migrate.py +3 -1
  42. package/src/plugin_loader.py +14 -5
  43. package/src/plugins/adaptive_mode.py +4 -1
  44. package/src/plugins/backup.py +32 -20
  45. package/src/plugins/evolution.py +2 -0
  46. package/src/plugins/memory_export.py +6 -1
  47. package/src/plugins/personal_plugins.py +17 -7
  48. package/src/plugins/personal_scripts.py +64 -3
  49. package/src/plugins/update.py +34 -14
  50. package/src/presets/entities_universal.json +67 -4
  51. package/src/product_mode.py +201 -0
  52. package/src/r14_correction_learning.py +5 -20
  53. package/src/r15_project_context.py +4 -10
  54. package/src/r16_declared_done.py +3 -16
  55. package/src/r17_promise_debt.py +3 -16
  56. package/src/r18_followup_autocomplete.py +5 -7
  57. package/src/r19_project_grep.py +5 -8
  58. package/src/r20_constant_change.py +5 -15
  59. package/src/r21_legacy_path.py +5 -7
  60. package/src/r22_personal_script.py +4 -8
  61. package/src/r23_ssh_without_atlas.py +4 -11
  62. package/src/r23b_deploy_vhost.py +7 -6
  63. package/src/r23c_cwd_mismatch.py +7 -6
  64. package/src/r23d_chown_chmod_recursive.py +6 -6
  65. package/src/r23e_force_push_main.py +5 -6
  66. package/src/r23f_db_no_where.py +5 -6
  67. package/src/r23g_secrets_in_output.py +5 -5
  68. package/src/r23h_shebang_mismatch.py +6 -5
  69. package/src/r23i_auto_deploy_ignored.py +5 -6
  70. package/src/r23j_global_install.py +5 -6
  71. package/src/r23k_script_duplicates_skill.py +7 -6
  72. package/src/r23l_resource_collision.py +7 -6
  73. package/src/r23m_message_duplicate.py +6 -5
  74. package/src/r24_stale_memory.py +4 -9
  75. package/src/r25_nora_maria_read_only.py +5 -10
  76. package/src/r34_identity_coherence.py +6 -13
  77. package/src/r_catalog.py +3 -7
  78. package/src/resonance_map.py +13 -13
  79. package/src/runtime_power.py +29 -80
  80. package/src/script_registry.py +236 -6
  81. package/src/scripts/check-context.py +8 -25
  82. package/src/scripts/deep-sleep/extract.py +9 -16
  83. package/src/scripts/nexo-auto-update.py +27 -4
  84. package/src/scripts/nexo-catchup.py +9 -19
  85. package/src/scripts/nexo-cognitive-decay.py +26 -3
  86. package/src/scripts/nexo-daily-self-audit.py +50 -51
  87. package/src/scripts/nexo-email-migrate-config.py +30 -11
  88. package/src/scripts/nexo-email-monitor.py +97 -238
  89. package/src/scripts/nexo-followup-runner.py +70 -133
  90. package/src/scripts/nexo-hook-record.py +1 -1
  91. package/src/scripts/nexo-immune.py +6 -31
  92. package/src/scripts/nexo-impact-scorer.py +27 -4
  93. package/src/scripts/nexo-learning-housekeep.py +26 -3
  94. package/src/scripts/nexo-learning-validator.py +34 -32
  95. package/src/scripts/nexo-migrate.py +28 -12
  96. package/src/scripts/nexo-morning-agent.py +9 -23
  97. package/src/scripts/nexo-outcome-checker.py +27 -4
  98. package/src/scripts/nexo-postmortem-consolidator.py +30 -62
  99. package/src/scripts/nexo-pre-commit.py +28 -0
  100. package/src/scripts/nexo-proactive-dashboard.py +27 -0
  101. package/src/scripts/nexo-reflection.py +33 -3
  102. package/src/scripts/nexo-runtime-preflight.py +27 -2
  103. package/src/scripts/nexo-send-reply.py +10 -8
  104. package/src/scripts/nexo-sleep.py +11 -25
  105. package/src/scripts/nexo-synthesis.py +7 -40
  106. package/src/scripts/nexo-watchdog-smoke.py +30 -1
  107. package/src/scripts/nexo-watchdog.sh +23 -17
  108. package/src/scripts/phase_guardian_analysis.py +27 -4
  109. package/src/server.py +14 -3
  110. package/src/storage_router.py +8 -6
  111. package/src/t4_llm_gate.py +17 -84
  112. package/src/tools_drive.py +5 -13
  113. package/src/tools_guardian.py +3 -4
  114. package/src/tools_menu.py +2 -2
  115. package/src/tools_reminders_crud.py +17 -0
  116. package/src/tools_sessions.py +1 -4
  117. package/src/user_context.py +3 -6
  118. package/src/user_data_portability.py +141 -44
  119. package/templates/CLAUDE.md.template +11 -3
  120. package/templates/CODEX.AGENTS.md.template +11 -3
  121. package/templates/core-prompts/catchup-assessment.md +19 -0
  122. package/templates/core-prompts/check-context.md +24 -0
  123. package/templates/core-prompts/daily-self-audit.md +42 -0
  124. package/templates/core-prompts/daily-synthesis.md +40 -0
  125. package/templates/core-prompts/deep-sleep-extract-json-conversion.md +6 -0
  126. package/templates/core-prompts/deep-sleep-extract-json-output.md +8 -0
  127. package/templates/core-prompts/drive-signal-classifier-system.md +4 -0
  128. package/templates/core-prompts/drive-signal-classifier-user.md +6 -0
  129. package/templates/core-prompts/email-monitor.md +202 -0
  130. package/templates/core-prompts/enforcement-classifier-retry.md +1 -0
  131. package/templates/core-prompts/enforcement-classifier-strict.md +1 -0
  132. package/templates/core-prompts/evolution-public-contribution.md +32 -0
  133. package/templates/core-prompts/evolution-public-pr-review.md +38 -0
  134. package/templates/core-prompts/evolution-weekly.md +71 -0
  135. package/templates/core-prompts/followup-runner-operator-attention-context.md +4 -0
  136. package/templates/core-prompts/followup-runner-operator-attention-question.md +1 -0
  137. package/templates/core-prompts/followup-runner.md +74 -0
  138. package/templates/core-prompts/immune-triage.md +31 -0
  139. package/templates/core-prompts/interactive-startup.md +1 -0
  140. package/templates/core-prompts/json-object-only.md +1 -0
  141. package/templates/core-prompts/learning-validator.md +25 -0
  142. package/templates/core-prompts/morning-agent-json-output.md +1 -0
  143. package/templates/core-prompts/morning-agent.md +23 -0
  144. package/templates/core-prompts/postmortem-consolidator.md +60 -0
  145. package/templates/core-prompts/r-catalog.md +1 -0
  146. package/templates/core-prompts/r13-pre-edit-guard-injection.md +1 -0
  147. package/templates/core-prompts/r14-correction-learning-injection.md +1 -0
  148. package/templates/core-prompts/r14-correction-learning-question.md +1 -0
  149. package/templates/core-prompts/r15-project-context-injection.md +1 -0
  150. package/templates/core-prompts/r16-declared-done-injection.md +1 -0
  151. package/templates/core-prompts/r16-declared-done-question.md +1 -0
  152. package/templates/core-prompts/r17-promise-debt-injection.md +1 -0
  153. package/templates/core-prompts/r17-promise-debt-question.md +1 -0
  154. package/templates/core-prompts/r18-followup-autocomplete-injection.md +3 -0
  155. package/templates/core-prompts/r19-project-grep-injection.md +1 -0
  156. package/templates/core-prompts/r20-constant-change-injection.md +1 -0
  157. package/templates/core-prompts/r20-constant-change-question.md +1 -0
  158. package/templates/core-prompts/r21-legacy-path-injection.md +1 -0
  159. package/templates/core-prompts/r22-personal-script-injection.md +1 -0
  160. package/templates/core-prompts/r23-ssh-without-atlas-injection.md +1 -0
  161. package/templates/core-prompts/r23b-deploy-vhost-injection.md +1 -0
  162. package/templates/core-prompts/r23c-cwd-mismatch-injection.md +1 -0
  163. package/templates/core-prompts/r23d-chown-chmod-recursive-injection.md +1 -0
  164. package/templates/core-prompts/r23e-force-push-main-injection.md +1 -0
  165. package/templates/core-prompts/r23f-db-no-where-injection.md +1 -0
  166. package/templates/core-prompts/r23g-secrets-in-output-injection.md +1 -0
  167. package/templates/core-prompts/r23h-shebang-mismatch-injection.md +1 -0
  168. package/templates/core-prompts/r23i-auto-deploy-ignored-injection.md +1 -0
  169. package/templates/core-prompts/r23j-global-install-injection.md +1 -0
  170. package/templates/core-prompts/r23k-script-duplicates-skill-injection.md +1 -0
  171. package/templates/core-prompts/r23l-resource-collision-injection.md +1 -0
  172. package/templates/core-prompts/r23m-message-duplicate-injection.md +1 -0
  173. package/templates/core-prompts/r24-stale-memory-injection.md +1 -0
  174. package/templates/core-prompts/r25-read-only-host-injection.md +1 -0
  175. package/templates/core-prompts/r34-identity-coherence-probe.md +1 -0
  176. package/templates/core-prompts/r34-identity-coherence-question.md +1 -0
  177. package/templates/core-prompts/sleep.md +25 -0
  178. package/templates/core-prompts/t4-r15-project-context-gate.md +14 -0
  179. package/templates/core-prompts/t4-r23e-force-push-gate.md +14 -0
  180. package/templates/core-prompts/t4-r23f-db-no-where-gate.md +14 -0
  181. package/templates/core-prompts/t4-r23h-shebang-mismatch-gate.md +14 -0
  182. package/templates/email-template.md +55 -0
  183. package/templates/nexo_helper.py +31 -13
  184. package/templates/plugin-template.py +3 -3
  185. package/templates/skill-template.md +2 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexo-brain",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
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,13 +18,13 @@
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.1.1` is the current packaged-runtime line. It hotfixes the post-F0.6 updater path after `7.1.0`: packaged installs no longer confuse `~/.nexo/core` with a mutable source repo, and source-sync/update flows now replace compatibility shims safely instead of failing on `db` / `cognitive` / `skills-core` / root-file conflicts. The companion NEXO Desktop client (v0.22.1, closed-source distributed separately) embeds the same hotfix so fresh installs and in-app repairs start from the corrected updater baseline.
21
+ Version `7.1.3` is the current packaged-runtime line. It closes the remaining post-`7.1.2` product/runtime gap for packaged Desktop-managed installs: the Brain updater can reuse Desktop's bundled npm runtime, portable user-data restores are inspectable before import, product-mode detection is tighter on real packaged machines, and the public release surfaces once again match the runtime line that actually ships. The companion NEXO Desktop client (v0.22.3, closed-source distributed separately) embeds the same release line for its guided bootstrap, repair, and restore flow.
22
22
 
23
23
  Previously in `7.0.1`: hotfix over v7.0.0 (db._core.DB_PATH was only caller still hardcoded to legacy ~/.nexo/data/nexo.db; every shared-DB command silently returned empty results post-migration). Previously in `7.0.0`: **BREAKING — Plan Consolidado fase F0.6**: physical separation of the runtime tree into `~/.nexo/{core,personal,runtime}/`. The flat layout (`~/.nexo/scripts/`, `brain/`, `data/`, `operations/`, ...) is gone. Operators on v6.x are auto-migrated on first `nexo update`; fresh installs land directly in the new tree. New `paths.py` helpers are transition-aware.
24
24
 
25
25
  Previously in `6.5.0`: Plan Consolidado fase F0.2: operators can now `nexo scripts enable|disable|status <name>` any personal automation. The cron wrapper honours the flag at every tick (`exit 0` with `summary='[disabled]'` while the LaunchAgent stays loaded). The companion NEXO Desktop client (a closed-source product, distributed separately) wires the same toggle into its Automatizaciones panel. See [CHANGELOG](CHANGELOG.md) for the full diff.
26
26
 
27
- > **About NEXO Desktop.** NEXO Desktop is a separate closed-source companion app distributed at [systeam.es/nexo-desktop](https://systeam.es/nexo-desktop) — its source does not live in this repo. When release notes mention Desktop they describe a coordinated client release that consumes the Brain's CLI / MCP contract; the Brain itself is fully usable on its own (terminal, Codex, Claude Code, or any MCP client).
27
+ > **About NEXO Desktop.** NEXO Desktop is a separate closed-source companion app distributed at [systeam.es/nexo-desktop](https://systeam.es/nexo-desktop) — its source does not live in this repo. When release notes mention Desktop they describe a coordinated client release that consumes the Brain's CLI / MCP contract; the Brain itself is fully usable on its own (terminal, Codex, Claude Code, or any MCP client). If you want the product edition rather than the open-source Brain alone, contact `info@wazion.com` and ask about NEXO Desktop.
28
28
 
29
29
 
30
30
  Previously in `6.4.0`: Plan Consolidado fase F1 — multi-tenant email accounts (`email_accounts` table, `nexo email setup` interactive wizard, `nexo email add --password-stdin --json` for machine consumers, idempotent migrator from legacy `~/.nexo/nexo-email/config.json`).
@@ -70,6 +70,7 @@ Previously in `5.5.3`: CLAUDE.md CORE teaches the model to trust the Protocol En
70
70
  Start here:
71
71
  - [5-minute quickstart](docs/quickstart-5-minutes.md)
72
72
  - [Workflow quickstart](docs/workflows-quickstart.md)
73
+ - [Runtime templates](docs/runtime-templates.md)
73
74
  - [Recent memory fallbacks + live system catalog](docs/recent-memory-fallbacks-and-system-catalog.md)
74
75
  - [Supported client guides](docs/integrations/cursor.md)
75
76
  - [Docker setup](docs/docker-setup.md)