eagle-mem 1.4.1 → 1.4.2
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/hooks/session-end.sh +14 -0
- package/hooks/session-start.sh +1 -0
- package/lib/db.sh +1 -0
- package/package.json +1 -1
package/hooks/session-end.sh
CHANGED
|
@@ -19,6 +19,20 @@ session_id=$(echo "$input" | jq -r '.session_id // empty')
|
|
|
19
19
|
[ -z "$session_id" ] && exit 0
|
|
20
20
|
[ ! -f "$EAGLE_MEM_DB" ] && exit 0
|
|
21
21
|
|
|
22
|
+
cwd=$(echo "$input" | jq -r '.cwd // empty')
|
|
23
|
+
project=$(eagle_project_from_cwd "$cwd")
|
|
24
|
+
|
|
25
|
+
# Final sweep: re-capture all task files to catch status changes
|
|
26
|
+
# Claude Code may update task status without triggering PostToolUse
|
|
27
|
+
task_dir="$HOME/.claude/tasks/$session_id"
|
|
28
|
+
if [ -d "$task_dir" ]; then
|
|
29
|
+
for task_file in "$task_dir"/*.json; do
|
|
30
|
+
[ ! -f "$task_file" ] && continue
|
|
31
|
+
eagle_capture_claude_task "$task_file" "$session_id" "$project"
|
|
32
|
+
done
|
|
33
|
+
eagle_log "INFO" "SessionEnd: re-synced tasks from $task_dir"
|
|
34
|
+
fi
|
|
35
|
+
|
|
22
36
|
eagle_end_session "$session_id"
|
|
23
37
|
eagle_log "INFO" "SessionEnd: session=$session_id marked completed"
|
|
24
38
|
|
package/hooks/session-start.sh
CHANGED
|
@@ -163,6 +163,7 @@ fi
|
|
|
163
163
|
synced_tasks=$(eagle_db "SELECT subject, status FROM claude_tasks
|
|
164
164
|
WHERE project = '$(eagle_sql_escape "$project")'
|
|
165
165
|
AND status IN ('in_progress', 'pending', 'todo', 'open')
|
|
166
|
+
AND updated_at > datetime('now', '-7 days')
|
|
166
167
|
ORDER BY updated_at DESC LIMIT 5;")
|
|
167
168
|
if [ -n "$synced_tasks" ]; then
|
|
168
169
|
context+="
|
package/lib/db.sh
CHANGED
|
@@ -101,6 +101,7 @@ eagle_get_recent_summaries() {
|
|
|
101
101
|
eagle_db "SELECT s.request, s.completed, s.learned, s.next_steps, s.created_at
|
|
102
102
|
FROM summaries s
|
|
103
103
|
WHERE s.project = '$project'
|
|
104
|
+
AND s.request NOT LIKE '%<local-command-caveat>%'
|
|
104
105
|
ORDER BY s.created_at DESC
|
|
105
106
|
LIMIT $limit;"
|
|
106
107
|
}
|