nexo-brain 7.9.2 → 7.9.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/lifecycle_prompts.py +35 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexo-brain",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.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,7 +18,9 @@
|
|
|
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.
|
|
21
|
+
Version `7.9.3` is the current packaged-runtime line. Patch release that hardens Brain's canonical lifecycle plan for Desktop close/archive/delete/app-exit diary guarantees: `canonical_actions` now publish the v2 canonical shape (`type` plus `payload.prompt`) while keeping one-release compatibility mirrors (`kind` plus top-level `prompt`) for older Desktop clients. This lets Desktop execute resume → diary prompt → stop with one exact owner per lifecycle event and preserve Brain-side dedupe by event id. Targeted verification: `pytest tests/test_lifecycle_events.py` (25 passing) plus release-readiness after artifact sync.
|
|
22
|
+
|
|
23
|
+
Previously in `7.9.2`: patch release that completes the Brain semantic-router site migration: the remaining decision callers now route through `semantic_router.route(...)` with named `decision_kind` policies (`r20_constant_change`, `r34_identity_coherence`, `t4_r15`, `t4_r23e`, `t4_r23f`, `t4_r23h`, `followup_operator_attention`, `drive_signal_type`, `drive_area`, `reply_event_type`, `query_intent`, and `sentiment_intent`). Brain now owns model choice, thresholds, and fallback behaviour centrally instead of each caller carrying its own classifier policy. The patch also fixes packaged headless Guardian map loading: `enforcement_engine` and `agent_runner` now check the installed core directory (`~/.nexo/core/tool-enforcement-map.json`) so followup-runner, morning-agent, digest, and email-monitor load the map instead of falling back to unguarded subprocess execution. Targeted verification: 100 semantic/router/enforcer tests, 125 Drive/cognitive/productization tests, and release-readiness passing.
|
|
22
24
|
|
|
23
25
|
Previously in `7.9.0`: minor release that ships the foundation of the semantic stack (router + reasoner + CLI) under the ONEPASS LLM Coverage plan, plus two product-bug fixes observed in the wild on 2026-04-23. New `src/semantic_router.py` exposes 18 named `decision_kinds` (13 textual + 5 code-aware) with a per-kind policy table and the layer chain `fast_local → semantic_reasoner → remote_fallback`. New `src/semantic_reasoner.py` adds Mode A (`multipass_local`: reuses the mDeBERTa pin with three prompt-perturbed passes + majority vote + 0.75 floor) and Mode B (`cached_llm`: wrapper over `call_model_raw` with a pid+uuid atomic-write 24h-TTL disk cache at `~/.nexo/runtime/operations/semantic-reasoner-cache.json`, SHA-256 keyed by `decision_kind` + normalized input, LRU-bounded at 2000 entries, corrupt entries dropped on read). New `scripts/semantic-classify.py` JSON-in JSON-out CLI lets external MCP clients (including the closed-source NEXO Desktop companion) query Brain as the single semantic authority. New `NEXO_SEMANTIC_REASONER` kill switch (`0`/`off`/`false`/`no`/`disable`/`disabled`) honours the plan mandate for a runtime opt-out separate from `NEXO_LOCAL_CLASSIFIER`. Bug fixes: `bin/nexo-brain.js` upgrade flow now copies `templates/` root the same way fresh install and same-version refresh already did (Maria iMac 7.1.10→7.8.1 upgrade had lost 27 core-prompts templates and broken post-update import verification); and `tool-enforcement-map.json` `nexo_startup.enforcement.inject_prompt` now instructs the model to preload the 13 `mcp__nexo__*` protocol tools via `ToolSearch` before calling `nexo_startup` when the host MCP client defers tool schemas (Claude Code with many MCPs installed). Audit-driven hardening: router/reasoner defensively use `getattr` over the `call_model_raw` module and add a trailing `except Exception` so provider errors degrade with `remote_error` instead of propagating; cache writes use pid+uuid tmp + `fsync` + `os.replace` to survive concurrent writers; `NEXO_SEMANTIC_REASONER_TTL` parse tolerates malformed values. Tests: +50 (22 router, 20 reasoner, 8 CLI). Per-site migration of existing callers (`session_end_intent`, `r14`, `r16`, `r17`, `r20`, `r34`, T4 gates, `tools_drive`, `nexo-followup-runner`) is explicitly deferred to follow-up patch releases and tracked as `NF-SEMANTIC-ROUTER-SITE-MIGRATION`; nothing in this release changes the behaviour of the existing callers. Companion coordinated release: NEXO Desktop v0.28.0.
|
|
24
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexo-brain",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.3",
|
|
4
4
|
"mcpName": "io.github.wazionapps/nexo",
|
|
5
5
|
"description": "NEXO Brain \u2014 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",
|
package/src/lifecycle_prompts.py
CHANGED
|
@@ -19,7 +19,7 @@ import json
|
|
|
19
19
|
from typing import Any, Dict, List, Optional
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
PLAN_VERSION =
|
|
22
|
+
PLAN_VERSION = 2
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# Actions that trigger a canonical diary+stop plan. `switch` and
|
|
@@ -79,6 +79,27 @@ def _diary_prompt_for_action(
|
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
|
|
82
|
+
def _canonical_action(
|
|
83
|
+
action_id: str,
|
|
84
|
+
action_type: str,
|
|
85
|
+
session_id: str,
|
|
86
|
+
timeout_ms: int,
|
|
87
|
+
**extra: Any,
|
|
88
|
+
) -> Dict[str, Any]:
|
|
89
|
+
"""Build one Desktop action with the v2 shape plus one-release mirrors."""
|
|
90
|
+
action: Dict[str, Any] = {
|
|
91
|
+
"id": action_id,
|
|
92
|
+
"type": action_type,
|
|
93
|
+
# Compatibility mirror for Desktop <= 0.28.1. Remove after one
|
|
94
|
+
# release once every supported Desktop consumes `type`.
|
|
95
|
+
"kind": action_type,
|
|
96
|
+
"session_id": str(session_id),
|
|
97
|
+
"timeout_ms": timeout_ms,
|
|
98
|
+
}
|
|
99
|
+
action.update(extra)
|
|
100
|
+
return action
|
|
101
|
+
|
|
102
|
+
|
|
82
103
|
def build_canonical_plan(
|
|
83
104
|
event_id: str,
|
|
84
105
|
action: str,
|
|
@@ -106,26 +127,19 @@ def build_canonical_plan(
|
|
|
106
127
|
prompt = _diary_prompt_for_action(action, conversation_id, payload_snapshot)
|
|
107
128
|
|
|
108
129
|
actions: List[Dict[str, Any]] = [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"id": "a3",
|
|
125
|
-
"kind": "stop_session",
|
|
126
|
-
"session_id": str(session_id),
|
|
127
|
-
"timeout_ms": DEFAULT_STOP_TIMEOUT_MS,
|
|
128
|
-
},
|
|
130
|
+
_canonical_action("a1", "resume_session", str(session_id), DEFAULT_RESUME_TIMEOUT_MS),
|
|
131
|
+
_canonical_action(
|
|
132
|
+
"a2",
|
|
133
|
+
"inject_prompt",
|
|
134
|
+
str(session_id),
|
|
135
|
+
DEFAULT_INJECT_TIMEOUT_MS,
|
|
136
|
+
payload={"prompt": prompt},
|
|
137
|
+
# Compatibility mirror for Desktop <= 0.28.1. Remove after one
|
|
138
|
+
# release once every supported Desktop consumes `payload.prompt`.
|
|
139
|
+
prompt=prompt,
|
|
140
|
+
expected_tool_call="nexo_session_diary_write",
|
|
141
|
+
),
|
|
142
|
+
_canonical_action("a3", "stop_session", str(session_id), DEFAULT_STOP_TIMEOUT_MS),
|
|
129
143
|
]
|
|
130
144
|
return {
|
|
131
145
|
"canonical_plan_id": canonical_plan_id(event_id, PLAN_VERSION),
|