nexo-brain 7.23.2 → 7.23.4

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 (46) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +7 -1
  3. package/package.json +1 -1
  4. package/scripts/sync_release_artifacts.py +28 -0
  5. package/src/auto_update.py +25 -47
  6. package/src/automation_reconciler.py +383 -0
  7. package/src/automation_supervisor.py +86 -9
  8. package/src/backup_retention.py +70 -0
  9. package/src/cli.py +55 -2
  10. package/src/cognitive/_core.py +4 -3
  11. package/src/cognitive_paths.py +194 -0
  12. package/src/dashboard/app.py +2 -1
  13. package/src/db/_episodic.py +85 -7
  14. package/src/db/_schema.py +81 -0
  15. package/src/db/_skills.py +3 -3
  16. package/src/disk_recovery/__init__.py +11 -0
  17. package/src/disk_recovery/handlers/__init__.py +1 -0
  18. package/src/disk_recovery/handlers/common.py +37 -0
  19. package/src/disk_recovery/handlers/macos.py +39 -0
  20. package/src/disk_recovery/handlers/windows.py +49 -0
  21. package/src/disk_recovery/registry.py +135 -0
  22. package/src/doctor/providers/boot.py +115 -15
  23. package/src/kg_populate.py +2 -5
  24. package/src/paths.py +321 -5
  25. package/src/plugins/update.py +14 -36
  26. package/src/pre_answer_router.py +21 -0
  27. package/src/runtime_service.py +30 -3
  28. package/src/runtime_versioning.py +272 -10
  29. package/src/script_registry.py +3 -2
  30. package/src/scripts/backfill_task_owner.py +10 -4
  31. package/src/scripts/deep-sleep/apply_findings.py +2 -5
  32. package/src/scripts/deep-sleep/collect.py +2 -5
  33. package/src/scripts/nexo-cognitive-decay.py +2 -1
  34. package/src/scripts/nexo-daily-self-audit.py +36 -10
  35. package/src/scripts/nexo-followup-runner.py +1 -1
  36. package/src/scripts/nexo-immune.py +2 -1
  37. package/src/scripts/nexo-migrate.py +2 -3
  38. package/src/scripts/post_disk_recovery_sweep.py +75 -0
  39. package/src/scripts/prune_runtime_backups.py +78 -11
  40. package/src/server.py +13 -1
  41. package/src/storage_router.py +2 -3
  42. package/src/support_snapshot.py +25 -0
  43. package/src/transcript_index.py +234 -0
  44. package/src/transcript_utils.py +31 -8
  45. package/src/user_data_portability.py +2 -3
  46. package/tool-enforcement-map.json +15 -0
@@ -389,12 +389,11 @@ def import_user_bundle(bundle_path: str) -> dict:
389
389
  if not inspection.get("ok"):
390
390
  return inspection
391
391
 
392
- backups_dir = paths.backups_dir()
393
- backups_dir.mkdir(parents=True, exist_ok=True)
394
- safety_backup = backups_dir / f"pre-import-user-data-{_now_stamp()}.tar.gz"
392
+ safety_backup = paths.create_backup_path("pre-import-user-data", ".tar.gz")
395
393
  safety_result = export_user_bundle(str(safety_backup), enforce_rate_limit=False)
396
394
  if not safety_result.get("ok"):
397
395
  return {"ok": False, "error": "failed to create safety backup", "safety_backup": str(safety_backup)}
396
+ paths.finalize_backup_snapshot(safety_backup)
398
397
 
399
398
  stage_dir: Path | None = None
400
399
 
@@ -315,6 +315,21 @@
315
315
  },
316
316
  "triggers_after": []
317
317
  },
318
+ "nexo_automation_reconcile": {
319
+ "description": "Build or apply a reconciliation plan for operator-facing automations",
320
+ "category": "automation",
321
+ "source": "server",
322
+ "requires": [],
323
+ "provides": [
324
+ "automation_reconciliation_plan"
325
+ ],
326
+ "internal_calls": [],
327
+ "enforcement": {
328
+ "level": "none",
329
+ "rules": []
330
+ },
331
+ "triggers_after": []
332
+ },
318
333
  "nexo_automation_instructions": {
319
334
  "description": "Set or clear operator extra instructions for an automation",
320
335
  "category": "personal",