eagle-mem 4.8.5 → 4.8.6
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 +6 -0
- package/bin/eagle-mem +2 -0
- package/package.json +1 -1
- package/scripts/help.sh +2 -0
- package/scripts/session.sh +220 -0
package/README.md
CHANGED
|
@@ -140,6 +140,7 @@ Eagle Mem prevents Claude from repeating past mistakes:
|
|
|
140
140
|
| `eagle-mem config` | View or change LLM provider and token-guard settings |
|
|
141
141
|
| `eagle-mem guard` | Manage regression guardrails for files |
|
|
142
142
|
| `eagle-mem overview` | Build or view project overview |
|
|
143
|
+
| `eagle-mem session` | Save a manual fallback session summary |
|
|
143
144
|
| `eagle-mem memories` | View/sync agent memories |
|
|
144
145
|
| `eagle-mem tasks` | View mirrored tasks |
|
|
145
146
|
| `eagle-mem orchestrate` | Coordinate durable worker lanes across agents |
|
|
@@ -149,6 +150,10 @@ Eagle Mem prevents Claude from repeating past mistakes:
|
|
|
149
150
|
| `eagle-mem scan` | Scan codebase and generate overview |
|
|
150
151
|
| `eagle-mem index` | Index source files for FTS5 code search |
|
|
151
152
|
|
|
153
|
+
### v4.8.6 Patch
|
|
154
|
+
|
|
155
|
+
`eagle-mem session save --summary "..."` now exists as a clean manual fallback for agents that need to persist an explicit session note. It writes through the same `sessions` and `summaries` tables used by Stop hooks, keeps Claude Code/Codex source attribution, and is immediately searchable through normal recall.
|
|
156
|
+
|
|
152
157
|
### v4.8.5 Patch
|
|
153
158
|
|
|
154
159
|
First-run configuration no longer exits silently when Ollama is not listening on `localhost:11434`; Eagle Mem falls through to the installed Codex/Claude CLI provider or API-key providers. SQLite/FTS5 failures are now surfaced before DB-backed commands run, including the exact `sqlite3` binary being used and PATH guidance for common macOS Android SDK shadowing. Worker worktree paths are also canonicalized back to the main project key so backfill cannot move feature guardrails into disposable orchestration worktrees.
|
|
@@ -180,6 +185,7 @@ eagle-mem search --tasks # in-flight tasks (pending/in-progress)
|
|
|
180
185
|
eagle-mem search --files # most frequently modified files
|
|
181
186
|
eagle-mem search --stats # project statistics
|
|
182
187
|
eagle-mem search --session <id> # full observation trail for one session
|
|
188
|
+
eagle-mem session save --summary "fixed auth flow" # manual fallback capture
|
|
183
189
|
```
|
|
184
190
|
|
|
185
191
|
### Feature Verification
|
package/bin/eagle-mem
CHANGED
|
@@ -24,6 +24,8 @@ case "$command" in
|
|
|
24
24
|
config) bash "$SCRIPTS_DIR/config.sh" "$@" ;;
|
|
25
25
|
guard) bash "$SCRIPTS_DIR/guard.sh" "$@" ;;
|
|
26
26
|
overview) bash "$SCRIPTS_DIR/overview.sh" "$@" ;;
|
|
27
|
+
session|sessions)
|
|
28
|
+
bash "$SCRIPTS_DIR/session.sh" "$@" ;;
|
|
27
29
|
memories) bash "$SCRIPTS_DIR/memories.sh" "$@" ;;
|
|
28
30
|
tasks) bash "$SCRIPTS_DIR/tasks.sh" "$@" ;;
|
|
29
31
|
orchestrate) bash "$SCRIPTS_DIR/orchestrate.sh" "$@" ;;
|
package/package.json
CHANGED
package/scripts/help.sh
CHANGED
|
@@ -23,6 +23,7 @@ echo -e " ${CYAN}uninstall${RESET} Remove hooks and optionally delete data"
|
|
|
23
23
|
echo -e " ${CYAN}search${RESET} Search past sessions, memories, and code"
|
|
24
24
|
echo -e " ${CYAN}health${RESET} Diagnose pipeline health and background automation"
|
|
25
25
|
echo -e " ${CYAN}overview${RESET} Build or view project overview"
|
|
26
|
+
echo -e " ${CYAN}session${RESET} Save a manual session summary"
|
|
26
27
|
echo -e " ${CYAN}memories${RESET} View/sync agent memories"
|
|
27
28
|
echo -e " ${CYAN}tasks${RESET} View mirrored tasks"
|
|
28
29
|
echo ""
|
|
@@ -50,6 +51,7 @@ echo -e " ${DIM}\$${RESET} eagle-mem search --memories ${DIM}# mirrored m
|
|
|
50
51
|
echo -e " ${DIM}\$${RESET} eagle-mem search --tasks ${DIM}# in-flight tasks${RESET}"
|
|
51
52
|
echo -e " ${DIM}\$${RESET} eagle-mem search --files ${DIM}# hot files${RESET}"
|
|
52
53
|
echo -e " ${DIM}\$${RESET} eagle-mem search --stats ${DIM}# project stats${RESET}"
|
|
54
|
+
echo -e " ${DIM}\$${RESET} eagle-mem session save --summary \"fixed auth\""
|
|
53
55
|
echo ""
|
|
54
56
|
echo -e " ${BOLD}Anti-regression:${RESET}"
|
|
55
57
|
echo -e " ${DIM}\$${RESET} eagle-mem feature pending ${DIM}# pending release blockers${RESET}"
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ═══════════════════════════════════════════════════════════
|
|
3
|
+
# Eagle Mem — Manual session capture
|
|
4
|
+
# ═══════════════════════════════════════════════════════════
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
+
LIB_DIR="$SCRIPTS_DIR/../lib"
|
|
9
|
+
|
|
10
|
+
. "$SCRIPTS_DIR/style.sh"
|
|
11
|
+
. "$LIB_DIR/common.sh"
|
|
12
|
+
. "$LIB_DIR/db.sh"
|
|
13
|
+
|
|
14
|
+
show_help() {
|
|
15
|
+
echo -e " ${BOLD}eagle-mem session${RESET} — Save or inspect session records"
|
|
16
|
+
echo ""
|
|
17
|
+
echo -e " ${BOLD}Usage:${RESET}"
|
|
18
|
+
echo -e " eagle-mem session ${CYAN}save --summary <text>${RESET}"
|
|
19
|
+
echo -e " eagle-mem session ${CYAN}save <text>${RESET}"
|
|
20
|
+
echo ""
|
|
21
|
+
echo -e " ${BOLD}Options for save:${RESET}"
|
|
22
|
+
echo -e " ${CYAN}--summary${RESET} <text> Summary to store"
|
|
23
|
+
echo -e " ${CYAN}--request${RESET} <text> User request that caused the work"
|
|
24
|
+
echo -e " ${CYAN}--learned${RESET} <text> Non-obvious discoveries"
|
|
25
|
+
echo -e " ${CYAN}--decisions${RESET} <text> Decisions and why"
|
|
26
|
+
echo -e " ${CYAN}--gotchas${RESET} <text> Surprises or pitfalls"
|
|
27
|
+
echo -e " ${CYAN}--next-steps${RESET} <text> Follow-up work"
|
|
28
|
+
echo -e " ${CYAN}--key-files${RESET} <text> Important files"
|
|
29
|
+
echo -e " ${CYAN}--notes${RESET} <text> Extra notes"
|
|
30
|
+
echo -e " ${CYAN}-p, --project${RESET} <name> Project name (default: current git root)"
|
|
31
|
+
echo -e " ${CYAN}--agent${RESET} <name> Source agent: codex or claude-code"
|
|
32
|
+
echo -e " ${CYAN}--cwd${RESET} <path> Working directory for project detection"
|
|
33
|
+
echo -e " ${CYAN}--json${RESET} Output JSON"
|
|
34
|
+
echo ""
|
|
35
|
+
echo -e " ${DIM}This command is mainly for agent fallbacks. Normal sessions are captured${RESET}"
|
|
36
|
+
echo -e " ${DIM}automatically by hooks when Claude Code or Codex stops a turn.${RESET}"
|
|
37
|
+
echo ""
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
require_value() {
|
|
41
|
+
local flag="$1"
|
|
42
|
+
if [ $# -lt 2 ] || [ -z "${2:-}" ]; then
|
|
43
|
+
eagle_err "$flag requires a value"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
json_string() {
|
|
49
|
+
jq -Rn --arg v "${1:-}" '$v'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
save_session() {
|
|
53
|
+
local summary=""
|
|
54
|
+
local request="Manual session save"
|
|
55
|
+
local learned=""
|
|
56
|
+
local decisions=""
|
|
57
|
+
local gotchas=""
|
|
58
|
+
local next_steps=""
|
|
59
|
+
local key_files=""
|
|
60
|
+
local notes=""
|
|
61
|
+
local project=""
|
|
62
|
+
local cwd
|
|
63
|
+
cwd="$(pwd)"
|
|
64
|
+
local agent=""
|
|
65
|
+
local json_output=false
|
|
66
|
+
|
|
67
|
+
while [ $# -gt 0 ]; do
|
|
68
|
+
case "$1" in
|
|
69
|
+
--summary)
|
|
70
|
+
require_value "$1" "${2:-}"
|
|
71
|
+
summary="$2"
|
|
72
|
+
shift 2
|
|
73
|
+
;;
|
|
74
|
+
--request)
|
|
75
|
+
require_value "$1" "${2:-}"
|
|
76
|
+
request="$2"
|
|
77
|
+
shift 2
|
|
78
|
+
;;
|
|
79
|
+
--learned)
|
|
80
|
+
require_value "$1" "${2:-}"
|
|
81
|
+
learned="$2"
|
|
82
|
+
shift 2
|
|
83
|
+
;;
|
|
84
|
+
--decisions)
|
|
85
|
+
require_value "$1" "${2:-}"
|
|
86
|
+
decisions="$2"
|
|
87
|
+
shift 2
|
|
88
|
+
;;
|
|
89
|
+
--gotchas)
|
|
90
|
+
require_value "$1" "${2:-}"
|
|
91
|
+
gotchas="$2"
|
|
92
|
+
shift 2
|
|
93
|
+
;;
|
|
94
|
+
--next-steps)
|
|
95
|
+
require_value "$1" "${2:-}"
|
|
96
|
+
next_steps="$2"
|
|
97
|
+
shift 2
|
|
98
|
+
;;
|
|
99
|
+
--key-files)
|
|
100
|
+
require_value "$1" "${2:-}"
|
|
101
|
+
key_files="$2"
|
|
102
|
+
shift 2
|
|
103
|
+
;;
|
|
104
|
+
--notes)
|
|
105
|
+
require_value "$1" "${2:-}"
|
|
106
|
+
notes="$2"
|
|
107
|
+
shift 2
|
|
108
|
+
;;
|
|
109
|
+
--project|-p)
|
|
110
|
+
require_value "$1" "${2:-}"
|
|
111
|
+
project="$2"
|
|
112
|
+
shift 2
|
|
113
|
+
;;
|
|
114
|
+
--cwd)
|
|
115
|
+
require_value "$1" "${2:-}"
|
|
116
|
+
cwd="$2"
|
|
117
|
+
shift 2
|
|
118
|
+
;;
|
|
119
|
+
--agent)
|
|
120
|
+
require_value "$1" "${2:-}"
|
|
121
|
+
agent="$2"
|
|
122
|
+
shift 2
|
|
123
|
+
;;
|
|
124
|
+
--json|-j)
|
|
125
|
+
json_output=true
|
|
126
|
+
shift
|
|
127
|
+
;;
|
|
128
|
+
--help|-h)
|
|
129
|
+
show_help
|
|
130
|
+
exit 0
|
|
131
|
+
;;
|
|
132
|
+
--)
|
|
133
|
+
shift
|
|
134
|
+
if [ $# -gt 0 ]; then
|
|
135
|
+
summary="${summary}${summary:+ }$*"
|
|
136
|
+
shift $#
|
|
137
|
+
fi
|
|
138
|
+
;;
|
|
139
|
+
-*)
|
|
140
|
+
eagle_err "Unknown option for session save: $1"
|
|
141
|
+
exit 1
|
|
142
|
+
;;
|
|
143
|
+
*)
|
|
144
|
+
summary="${summary}${summary:+ }$1"
|
|
145
|
+
shift
|
|
146
|
+
;;
|
|
147
|
+
esac
|
|
148
|
+
done
|
|
149
|
+
|
|
150
|
+
if [ -z "$summary" ]; then
|
|
151
|
+
eagle_err "Nothing to save. Pass --summary <text>."
|
|
152
|
+
exit 1
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
[ -z "$project" ] && project=$(eagle_project_from_cwd "$cwd")
|
|
156
|
+
if [ -z "$project" ]; then
|
|
157
|
+
eagle_err "Could not determine project. Re-run with --project <name>."
|
|
158
|
+
exit 1
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
if [ -z "$agent" ]; then
|
|
162
|
+
agent=$(eagle_agent_source)
|
|
163
|
+
else
|
|
164
|
+
case "$agent" in
|
|
165
|
+
codex|openai-codex) agent="codex" ;;
|
|
166
|
+
claude|claude-code|cloud-code) agent="claude-code" ;;
|
|
167
|
+
*)
|
|
168
|
+
eagle_err "--agent must be codex or claude-code"
|
|
169
|
+
exit 1
|
|
170
|
+
;;
|
|
171
|
+
esac
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
summary=$(printf '%s' "$summary" | eagle_redact)
|
|
175
|
+
request=$(printf '%s' "$request" | eagle_redact)
|
|
176
|
+
learned=$(printf '%s' "$learned" | eagle_redact)
|
|
177
|
+
decisions=$(printf '%s' "$decisions" | eagle_redact)
|
|
178
|
+
gotchas=$(printf '%s' "$gotchas" | eagle_redact)
|
|
179
|
+
next_steps=$(printf '%s' "$next_steps" | eagle_redact)
|
|
180
|
+
key_files=$(printf '%s' "$key_files" | eagle_redact)
|
|
181
|
+
notes=$(printf '%s' "$notes" | eagle_redact)
|
|
182
|
+
|
|
183
|
+
eagle_ensure_db
|
|
184
|
+
|
|
185
|
+
local stamp session_id
|
|
186
|
+
stamp=$(date -u +%Y%m%dT%H%M%SZ)
|
|
187
|
+
session_id="manual-${stamp}-$$-${RANDOM:-0}"
|
|
188
|
+
|
|
189
|
+
eagle_upsert_session "$session_id" "$project" "$cwd" "" "manual" "$agent"
|
|
190
|
+
eagle_insert_summary "$session_id" "$project" "$request" "" "$learned" "$summary" "$next_steps" "[]" "[]" "$notes" "$decisions" "$gotchas" "$key_files" "$agent"
|
|
191
|
+
eagle_end_session "$session_id"
|
|
192
|
+
|
|
193
|
+
if [ "$json_output" = true ]; then
|
|
194
|
+
printf '{'
|
|
195
|
+
printf '"session_id":%s,' "$(json_string "$session_id")"
|
|
196
|
+
printf '"project":%s,' "$(json_string "$project")"
|
|
197
|
+
printf '"agent":%s,' "$(json_string "$agent")"
|
|
198
|
+
printf '"summary":%s' "$(json_string "$summary")"
|
|
199
|
+
printf '}\n'
|
|
200
|
+
else
|
|
201
|
+
eagle_ok "Session summary saved"
|
|
202
|
+
eagle_kv "Project:" "$project"
|
|
203
|
+
eagle_kv "Source:" "$(eagle_agent_label "$agent")"
|
|
204
|
+
eagle_kv "Session:" "$session_id"
|
|
205
|
+
fi
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
command="${1:-help}"
|
|
209
|
+
shift 2>/dev/null || true
|
|
210
|
+
|
|
211
|
+
case "$command" in
|
|
212
|
+
save) save_session "$@" ;;
|
|
213
|
+
help|--help|-h) show_help ;;
|
|
214
|
+
*)
|
|
215
|
+
eagle_err "Unknown session command: $command"
|
|
216
|
+
echo ""
|
|
217
|
+
show_help
|
|
218
|
+
exit 1
|
|
219
|
+
;;
|
|
220
|
+
esac
|