nexo-brain 2.4.0 → 2.5.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.
- package/README.md +80 -4
- package/bin/nexo-brain.js +238 -12
- package/bin/nexo.js +55 -0
- package/community/skills/.gitkeep +1 -0
- package/package.json +11 -3
- package/src/auto_update.py +193 -9
- package/src/cli.py +719 -0
- package/src/cognitive/_ingest.py +1 -1
- package/src/cognitive/_memory.py +4 -4
- package/src/crons/manifest.json +8 -0
- package/src/dashboard/app.py +700 -35
- package/src/dashboard/templates/adaptive.html +112 -218
- package/src/dashboard/templates/artifacts.html +133 -0
- package/src/dashboard/templates/backups.html +136 -0
- package/src/dashboard/templates/base.html +413 -0
- package/src/dashboard/templates/calendar.html +523 -654
- package/src/dashboard/templates/chat.html +356 -0
- package/src/dashboard/templates/claims.html +259 -0
- package/src/dashboard/templates/cortex.html +262 -0
- package/src/dashboard/templates/credentials.html +128 -0
- package/src/dashboard/templates/crons.html +370 -0
- package/src/dashboard/templates/dashboard.html +383 -578
- package/src/dashboard/templates/dreams.html +252 -0
- package/src/dashboard/templates/email.html +160 -0
- package/src/dashboard/templates/evolution.html +189 -0
- package/src/dashboard/templates/feed.html +249 -0
- package/src/dashboard/templates/followup_health.html +170 -0
- package/src/dashboard/templates/graph.html +191 -269
- package/src/dashboard/templates/guard.html +259 -0
- package/src/dashboard/templates/inbox.html +220 -346
- package/src/dashboard/templates/memory.html +317 -197
- package/src/dashboard/templates/operations.html +521 -698
- package/src/dashboard/templates/plugins.html +185 -0
- package/src/dashboard/templates/rules.html +246 -0
- package/src/dashboard/templates/sentiment.html +247 -0
- package/src/dashboard/templates/sessions.html +215 -182
- package/src/dashboard/templates/skills.html +329 -0
- package/src/dashboard/templates/somatic.html +68 -172
- package/src/dashboard/templates/triggers.html +133 -0
- package/src/dashboard/templates/trust.html +360 -0
- package/src/db/__init__.py +5 -0
- package/src/db/_schema.py +16 -1
- package/src/db/_sessions.py +22 -0
- package/src/db/_skills.py +980 -274
- package/src/doctor/__init__.py +1 -0
- package/src/doctor/formatters.py +52 -0
- package/src/doctor/models.py +44 -0
- package/src/doctor/orchestrator.py +42 -0
- package/src/doctor/providers/__init__.py +1 -0
- package/src/doctor/providers/boot.py +206 -0
- package/src/doctor/providers/deep.py +292 -0
- package/src/doctor/providers/runtime.py +686 -0
- package/src/evolution_cycle.py +86 -6
- package/src/hooks/post-compact.sh +5 -1
- package/src/hooks/pre-compact.sh +1 -1
- package/src/plugins/doctor.py +36 -0
- package/src/plugins/evolution.py +11 -3
- package/src/plugins/skills.py +135 -175
- package/src/requirements.txt +1 -0
- package/src/script_registry.py +322 -0
- package/src/scripts/deep-sleep/apply_findings.py +63 -48
- package/src/scripts/deep-sleep/extract-prompt.md +14 -0
- package/src/scripts/deep-sleep/synthesize-prompt.md +36 -0
- package/src/scripts/deep-sleep/synthesize.py +37 -1
- package/src/scripts/nexo-dashboard.sh +29 -0
- package/src/scripts/nexo-day-orchestrator.sh +139 -0
- package/src/scripts/nexo-evolution-run.py +141 -54
- package/src/scripts/nexo-learning-housekeep.py +1 -1
- package/src/scripts/nexo-watchdog.sh +1 -1
- package/src/server.py +9 -5
- package/src/skills/run-runtime-doctor/guide.md +12 -0
- package/src/skills/run-runtime-doctor/script.py +21 -0
- package/src/skills/run-runtime-doctor/skill.json +25 -0
- package/src/skills_runtime.py +347 -0
- package/src/tools_menu.py +3 -2
- package/src/tools_sessions.py +126 -0
- package/src/user_context.py +46 -0
- package/templates/nexo_helper.py +45 -0
- package/templates/script-template.py +44 -0
- package/templates/skill-script-template.py +39 -0
- package/templates/skill-template.md +33 -0
package/src/cognitive/_ingest.py
CHANGED
|
@@ -79,7 +79,7 @@ def ingest(
|
|
|
79
79
|
|
|
80
80
|
# Auto-pin: corrections and blocking learnings get pinned (zero decay, +0.2 boost)
|
|
81
81
|
# This ensures user's corrections NEVER fade away
|
|
82
|
-
_pin_lifecycle =
|
|
82
|
+
_pin_lifecycle = 'active'
|
|
83
83
|
if auto_pin or (source_type in ('learning', 'feedback') and
|
|
84
84
|
any(kw in content.upper() for kw in ('BLOCKING', 'CRÍTICO', 'CRITICAL', 'NUNCA', 'NEVER', 'PROHIBIDO'))):
|
|
85
85
|
_pin_lifecycle = 'pinned'
|
package/src/cognitive/_memory.py
CHANGED
|
@@ -398,20 +398,20 @@ def get_stats() -> dict:
|
|
|
398
398
|
"""Return statistics about the cognitive memory system."""
|
|
399
399
|
db = _get_db()
|
|
400
400
|
|
|
401
|
-
stm_active = db.execute("SELECT COUNT(*) FROM stm_memories WHERE lifecycle_state
|
|
401
|
+
stm_active = db.execute("SELECT COUNT(*) FROM stm_memories WHERE lifecycle_state IN ('active', 'pinned') AND promoted_to_ltm = 0").fetchone()[0]
|
|
402
402
|
stm_promoted = db.execute("SELECT COUNT(*) FROM stm_memories WHERE promoted_to_ltm = 1").fetchone()[0]
|
|
403
|
-
stm_total = db.execute("SELECT COUNT(*) FROM stm_memories WHERE lifecycle_state
|
|
403
|
+
stm_total = db.execute("SELECT COUNT(*) FROM stm_memories WHERE lifecycle_state IN ('active', 'pinned')").fetchone()[0]
|
|
404
404
|
ltm_active = db.execute("SELECT COUNT(*) FROM ltm_memories WHERE is_dormant = 0").fetchone()[0]
|
|
405
405
|
ltm_dormant = db.execute("SELECT COUNT(*) FROM ltm_memories WHERE is_dormant = 1").fetchone()[0]
|
|
406
406
|
|
|
407
|
-
avg_stm = db.execute("SELECT AVG(strength) FROM stm_memories WHERE lifecycle_state
|
|
407
|
+
avg_stm = db.execute("SELECT AVG(strength) FROM stm_memories WHERE lifecycle_state IN ('active', 'pinned') AND promoted_to_ltm = 0").fetchone()[0] or 0.0
|
|
408
408
|
avg_ltm = db.execute("SELECT AVG(strength) FROM ltm_memories WHERE is_dormant = 0").fetchone()[0] or 0.0
|
|
409
409
|
|
|
410
410
|
total_retrievals = db.execute("SELECT COUNT(*) FROM retrieval_log").fetchone()[0]
|
|
411
411
|
avg_retrieval_score = db.execute("SELECT AVG(top_score) FROM retrieval_log").fetchone()[0] or 0.0
|
|
412
412
|
|
|
413
413
|
top_domains_stm = db.execute(
|
|
414
|
-
"SELECT domain, COUNT(*) as cnt FROM stm_memories WHERE lifecycle_state
|
|
414
|
+
"SELECT domain, COUNT(*) as cnt FROM stm_memories WHERE lifecycle_state IN ('active', 'pinned') AND promoted_to_ltm = 0 AND domain != '' GROUP BY domain ORDER BY cnt DESC LIMIT 5"
|
|
415
415
|
).fetchall()
|
|
416
416
|
top_domains_ltm = db.execute(
|
|
417
417
|
"SELECT domain, COUNT(*) as cnt FROM ltm_memories WHERE is_dormant = 0 AND domain != '' GROUP BY domain ORDER BY cnt DESC LIMIT 5"
|
package/src/crons/manifest.json
CHANGED
|
@@ -94,6 +94,14 @@
|
|
|
94
94
|
"run_at_load": true,
|
|
95
95
|
"description": "Morning catchup briefing for the user",
|
|
96
96
|
"core": true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "day-orchestrator",
|
|
100
|
+
"script": "scripts/nexo-day-orchestrator.sh",
|
|
101
|
+
"type": "shell",
|
|
102
|
+
"description": "Autonomous NEXO cycle — checks followups, emails, infra every 15 min (8:00-23:00)",
|
|
103
|
+
"core": true,
|
|
104
|
+
"optional": "orchestrator"
|
|
97
105
|
}
|
|
98
106
|
]
|
|
99
107
|
}
|