nexo-brain 5.3.11 → 5.3.13

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 (35) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +3 -5
  3. package/package.json +1 -1
  4. package/src/agent_runner.py +2 -0
  5. package/src/auto_update.py +116 -4
  6. package/src/cli.py +8 -2
  7. package/src/client_preferences.py +26 -7
  8. package/src/client_sync.py +3 -2
  9. package/src/doctor/orchestrator.py +10 -1
  10. package/src/doctor/planes.py +87 -0
  11. package/src/hook_guardrails.py +147 -11
  12. package/src/plugins/doctor.py +3 -2
  13. package/src/plugins/schedule.py +119 -1
  14. package/src/runtime_power.py +3 -2
  15. package/src/scripts/check-context.py +7 -1
  16. package/src/scripts/deep-sleep/extract.py +8 -2
  17. package/src/scripts/deep-sleep/synthesize.py +8 -1
  18. package/src/scripts/nexo-catchup.py +8 -2
  19. package/src/scripts/nexo-cortex-cycle.py +48 -21
  20. package/src/scripts/nexo-daily-self-audit.py +56 -23
  21. package/src/scripts/nexo-evolution-run.py +10 -2
  22. package/src/scripts/nexo-immune.py +8 -1
  23. package/src/scripts/nexo-learning-validator.py +9 -1
  24. package/src/scripts/nexo-postmortem-consolidator.py +9 -1
  25. package/src/scripts/nexo-sleep.py +7 -1
  26. package/src/scripts/nexo-synthesis.py +8 -1
  27. package/src/scripts/rehydrate_learnings_from_archive.py +245 -0
  28. package/src/server.py +2 -0
  29. package/src/skills/run-nexo-core-fix-cycle/guide.md +17 -0
  30. package/src/skills/run-nexo-core-fix-cycle/script.py +276 -0
  31. package/src/skills/run-nexo-core-fix-cycle/skill.json +58 -0
  32. package/src/skills/run-release-final-audit/guide.md +5 -3
  33. package/src/skills/run-release-final-audit/script.py +17 -8
  34. package/src/skills/run-release-final-audit/skill.json +15 -2
  35. package/src/skills/run-runtime-doctor/script.py +1 -1
@@ -194,12 +194,14 @@ def _looks_like_nexo_home(raw: str) -> bool:
194
194
  return (candidate / "skills-runtime").is_dir() or (candidate / "operations" / "tool-logs").is_dir()
195
195
 
196
196
 
197
- def _parse_optional_paths(argv: list[str]) -> tuple[str, str]:
198
- if len(argv) > 6:
199
- return argv[5], argv[6]
200
- if len(argv) > 5:
201
- return ("", argv[5]) if _looks_like_nexo_home(argv[5]) else (argv[5], "")
202
- return "", ""
197
+ def _parse_optional_args(argv: list[str]) -> tuple[str, str, str, str]:
198
+ website_root = argv[5] if len(argv) > 5 else ""
199
+ nexo_home = argv[6] if len(argv) > 6 else ""
200
+ final_closeout = argv[7] if len(argv) > 7 else ""
201
+ protocol_task_id = argv[8] if len(argv) > 8 else ""
202
+ if website_root and not nexo_home and _looks_like_nexo_home(website_root):
203
+ nexo_home, website_root = website_root, ""
204
+ return website_root, nexo_home, final_closeout, protocol_task_id
203
205
 
204
206
 
205
207
  def main() -> int:
@@ -207,7 +209,8 @@ def main() -> int:
207
209
  require_contract_complete = _parse_bool(sys.argv[2] if len(sys.argv) > 2 else "true", True)
208
210
  include_smoke = _parse_bool(sys.argv[3] if len(sys.argv) > 3 else "true", True)
209
211
  ci = _parse_bool(sys.argv[4] if len(sys.argv) > 4 else "false", False)
210
- website_root, nexo_home = _parse_optional_paths(sys.argv)
212
+ website_root, nexo_home, final_closeout_raw, protocol_task_id = _parse_optional_args(sys.argv)
213
+ final_closeout = _parse_bool(final_closeout_raw, False)
211
214
 
212
215
  version = _package_version()
213
216
  contract_path = _resolve_contract(version, contract_arg)
@@ -216,8 +219,10 @@ def main() -> int:
216
219
 
217
220
  print(f"[release-final-audit] version={version}")
218
221
  print(f"[release-final-audit] contract={contract_path or 'none'}")
219
- print(f"[release-final-audit] include_smoke={include_smoke} ci={ci}")
222
+ print(f"[release-final-audit] include_smoke={include_smoke} ci={ci} final_closeout={final_closeout}")
220
223
  print(f"[release-final-audit] python={python_bin}")
224
+ if final_closeout and protocol_task_id.strip():
225
+ print(f"[release-final-audit] protocol_task_id={protocol_task_id.strip()}")
221
226
 
222
227
  if include_smoke:
223
228
  smoke_runner = _resolve_smoke_runner(version)
@@ -240,6 +245,10 @@ def main() -> int:
240
245
  readiness_cmd.append("--require-contract-complete")
241
246
  elif require_contract_complete:
242
247
  print("[release-final-audit] require_contract_complete ignored because contract=none")
248
+ if final_closeout:
249
+ readiness_cmd.append("--final-closeout")
250
+ if protocol_task_id.strip():
251
+ readiness_cmd.extend(["--protocol-task-id", protocol_task_id.strip()])
243
252
 
244
253
  _run(readiness_cmd, env=env)
245
254
  print("[release-final-audit] OK")
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "SK-RUN-RELEASE-FINAL-AUDIT",
3
3
  "name": "Run Release Final Audit",
4
- "description": "Runs the final pre-release audit for NEXO: smoke when available, release-readiness checks, contract completeness, and consistency guardrails before a release/publication package.",
4
+ "description": "Runs the final release audit for NEXO: smoke when available, release-readiness checks, contract completeness, and optional closeout gates for GitHub Release, npm, runtime update/doctor, and protocol evidence.",
5
5
  "level": "published",
6
6
  "mode": "hybrid",
7
7
  "source_kind": "core",
@@ -12,6 +12,7 @@
12
12
  "final release audit",
13
13
  "release readiness audit",
14
14
  "pre-release audit",
15
+ "release closeout audit",
15
16
  "auditoria final release",
16
17
  "auditoria final publicacion",
17
18
  "seguridad reversibilidad consistencia"
@@ -37,6 +38,16 @@
37
38
  "required": false,
38
39
  "default": false
39
40
  },
41
+ "final_closeout": {
42
+ "type": "boolean",
43
+ "required": false,
44
+ "default": false
45
+ },
46
+ "protocol_task_id": {
47
+ "type": "string",
48
+ "required": false,
49
+ "default": ""
50
+ },
40
51
  "website_root": {
41
52
  "type": "string",
42
53
  "required": false,
@@ -56,7 +67,9 @@
56
67
  "{{include_smoke}}",
57
68
  "{{ci}}",
58
69
  "{{website_root}}",
59
- "{{nexo_home}}"
70
+ "{{nexo_home}}",
71
+ "{{final_closeout}}",
72
+ "{{protocol_task_id}}"
60
73
  ]
61
74
  },
62
75
  "executable_entry": "script.py",
@@ -12,7 +12,7 @@ def main() -> int:
12
12
  return 1
13
13
 
14
14
  cli_py = os.path.join(nexo_code, "cli.py")
15
- cmd = [sys.executable, cli_py, "doctor", "--tier", tier, "--json"]
15
+ cmd = [sys.executable, cli_py, "doctor", "--tier", tier, "--plane", "runtime_personal", "--json"]
16
16
  result = subprocess.run(cmd, text=True)
17
17
  return result.returncode
18
18