eagle-mem 4.10.7 → 4.10.8

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/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to the **Eagle Mem** project are documented here.
4
4
 
5
5
  ---
6
6
 
7
+ ## v4.10.8 Graph Neighbors Hotfix
8
+
9
+ This hotfix tightens the final graph-memory verification path:
10
+
11
+ - **Exact Neighbor Matching**: `eagle-mem graph neighbors <node>` now prefers exact `node_name` matches before fuzzy matches, and prefers file nodes when names are otherwise ambiguous.
12
+ - **Regression Coverage**: The graph-memory regression suite now verifies that `graph neighbors "a.sh"` selects the exact file node rather than a declaration node whose scoped name merely contains the file path.
13
+
14
+ ---
15
+
7
16
  ## v4.10.7 Graph Rebuild Hotfix
8
17
 
9
18
  This hotfix closes an installed-runtime failure found after the v4.10.6 graph-memory release:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eagle-mem",
3
- "version": "4.10.7",
3
+ "version": "4.10.8",
4
4
  "description": "Shared memory, release guardrails, RTK token protection, and worker lanes for Claude Code, Codex, Grok, and Google Antigravity",
5
5
  "bin": {
6
6
  "eagle-mem": "bin/eagle-mem"
@@ -906,7 +906,18 @@ memories_graph() {
906
906
 
907
907
  # Find node by name (fuzzy or exact)
908
908
  local matched
909
- matched=$(eagle_db "SELECT id, node_type, node_name FROM graph_nodes WHERE project = '$(eagle_sql_escape "$project")' AND (node_name = '$(eagle_sql_escape "$target_name")' OR node_name LIKE '%$(eagle_sql_escape "$target_name")%') LIMIT 1;")
909
+ local project_sql target_sql
910
+ project_sql=$(eagle_sql_escape "$project")
911
+ target_sql=$(eagle_sql_escape "$target_name")
912
+ matched=$(eagle_db "SELECT id, node_type, node_name
913
+ FROM graph_nodes
914
+ WHERE project = '$project_sql'
915
+ AND (node_name = '$target_sql' OR node_name LIKE '%$target_sql%')
916
+ ORDER BY
917
+ CASE WHEN node_name = '$target_sql' THEN 0 ELSE 1 END,
918
+ CASE WHEN node_type = 'file' THEN 0 ELSE 1 END,
919
+ id
920
+ LIMIT 1;")
910
921
  if [ -z "$matched" ]; then
911
922
  eagle_err "Node not found matching '$target_name'."
912
923
  exit 1
@@ -107,6 +107,16 @@ case "$overview_value" in
107
107
  ;;
108
108
  esac
109
109
 
110
+ neighbors_output=$(cd "$repo" && "$EAGLE_BIN" graph neighbors "a.sh" | sed -E $'s/\x1b\\[[0-9;]*m//g')
111
+ case "$neighbors_output" in
112
+ *"Node: a.sh [file]"*) ;;
113
+ *)
114
+ echo "graph neighbors did not prefer exact file node match" >&2
115
+ echo "$neighbors_output" >&2
116
+ exit 1
117
+ ;;
118
+ esac
119
+
110
120
  eagle_db "INSERT INTO sessions (id, project, cwd, model, status)
111
121
  VALUES ('session-graph-test', 'project', '$repo', 'test-model', 'completed');" >/dev/null
112
122
  eagle_db "INSERT INTO observations (session_id, project, tool_name, files_read, files_modified)