nexo-brain 7.23.8 → 7.23.9
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/package.json +1 -1
- package/src/runtime_versioning.py +30 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexo-brain",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.9",
|
|
4
4
|
"mcpName": "io.github.wazionapps/nexo",
|
|
5
5
|
"description": "NEXO Brain — 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",
|
|
@@ -890,15 +890,28 @@ def _mcp_client_readiness(
|
|
|
890
890
|
) -> dict:
|
|
891
891
|
generation = runtime_generation(installed_version_value, installed_fp, str(active_runtime_root()))
|
|
892
892
|
process_fp = str(state.get("process_fingerprint") or "").strip()
|
|
893
|
+
service_fp = str(service_status.get("runtime_fingerprint") or "").strip()
|
|
894
|
+
effective_process_fp = process_fp or service_fp
|
|
893
895
|
service_ok = bool(service_status.get("ok", True))
|
|
894
896
|
fingerprint_ready = (
|
|
895
897
|
bool(installed_fp)
|
|
896
|
-
and bool(
|
|
897
|
-
and
|
|
898
|
-
and installed_fp ==
|
|
898
|
+
and bool(effective_process_fp)
|
|
899
|
+
and effective_process_fp != "unknown"
|
|
900
|
+
and installed_fp == effective_process_fp
|
|
901
|
+
)
|
|
902
|
+
marker_recoverable_reason = str(state.get("reason") or "") in {
|
|
903
|
+
"marker_required",
|
|
904
|
+
"process_fingerprint_missing",
|
|
905
|
+
}
|
|
906
|
+
marker_recoverable_for_client = (
|
|
907
|
+
bool(client)
|
|
908
|
+
and bool(state.get("restart_required"))
|
|
909
|
+
and marker_recoverable_reason
|
|
910
|
+
and fingerprint_ready
|
|
911
|
+
and service_ok
|
|
899
912
|
)
|
|
900
913
|
global_ready = (
|
|
901
|
-
not bool(state.get("restart_required"))
|
|
914
|
+
(not bool(state.get("restart_required")) or marker_recoverable_for_client)
|
|
902
915
|
and fingerprint_ready
|
|
903
916
|
and service_ok
|
|
904
917
|
)
|
|
@@ -906,13 +919,13 @@ def _mcp_client_readiness(
|
|
|
906
919
|
global_reason = "runtime_service_unavailable"
|
|
907
920
|
elif not installed_fp:
|
|
908
921
|
global_reason = "installed_fingerprint_missing"
|
|
909
|
-
elif not
|
|
922
|
+
elif not effective_process_fp or effective_process_fp == "unknown":
|
|
910
923
|
global_reason = "process_fingerprint_missing"
|
|
911
|
-
elif installed_fp !=
|
|
924
|
+
elif installed_fp != effective_process_fp:
|
|
912
925
|
global_reason = "process_fingerprint_mismatch"
|
|
913
926
|
else:
|
|
914
927
|
global_reason = "ready"
|
|
915
|
-
if state.get("restart_required"):
|
|
928
|
+
if state.get("restart_required") and not marker_recoverable_for_client:
|
|
916
929
|
return {
|
|
917
930
|
"runtime_generation": generation,
|
|
918
931
|
"global_ready": False,
|
|
@@ -1003,6 +1016,11 @@ def build_mcp_status(*, client: str = "") -> dict:
|
|
|
1003
1016
|
service_status=service_status,
|
|
1004
1017
|
)
|
|
1005
1018
|
client_states = read_mcp_client_states()
|
|
1019
|
+
service_fp = str(service_status.get("runtime_fingerprint") or "").strip()
|
|
1020
|
+
effective_process_fp = process_fp or service_fp
|
|
1021
|
+
restart_required = bool(state["restart_required"]) and not bool(
|
|
1022
|
+
readiness["client_ready"]
|
|
1023
|
+
)
|
|
1006
1024
|
return {
|
|
1007
1025
|
"ok": True,
|
|
1008
1026
|
"schema_version": MCP_STATUS_SCHEMA_VERSION,
|
|
@@ -1013,14 +1031,14 @@ def build_mcp_status(*, client: str = "") -> dict:
|
|
|
1013
1031
|
"process_fingerprint": process_fp,
|
|
1014
1032
|
"fingerprint_match": (
|
|
1015
1033
|
bool(installed_fp)
|
|
1016
|
-
and bool(
|
|
1017
|
-
and
|
|
1018
|
-
and installed_fp ==
|
|
1034
|
+
and bool(effective_process_fp)
|
|
1035
|
+
and effective_process_fp != "unknown"
|
|
1036
|
+
and installed_fp == effective_process_fp
|
|
1019
1037
|
),
|
|
1020
1038
|
"active_runtime_root": str(active_runtime_root()),
|
|
1021
1039
|
"active_runtime_version": read_version_for_path(active_runtime_root()),
|
|
1022
|
-
"restart_required":
|
|
1023
|
-
"reason": state["reason"],
|
|
1040
|
+
"restart_required": restart_required,
|
|
1041
|
+
"reason": state["reason"] if restart_required else "",
|
|
1024
1042
|
"client_action": readiness["client_action"],
|
|
1025
1043
|
"reason_code": readiness["reason_code"],
|
|
1026
1044
|
"global_ready": bool(readiness["global_ready"]),
|