eagle-mem 4.6.0 → 4.6.1
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 +11 -4
- package/hooks/pre-tool-use.sh +12 -12
- package/hooks/session-start.sh +15 -12
- package/hooks/user-prompt-submit.sh +5 -5
- package/lib/hooks-posttool.sh +4 -4
- package/package.json +2 -2
- package/scripts/help.sh +1 -1
- package/scripts/install.sh +4 -10
- package/scripts/style.sh +7 -4
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
```
|
|
2
2
|
======================================
|
|
3
3
|
Eagle Mem
|
|
4
|
+
context that survives /compact
|
|
4
5
|
======================================
|
|
5
6
|
```
|
|
6
7
|
|
|
7
8
|
# Eagle Mem
|
|
8
9
|
|
|
10
|
+
**Context that survives `/compact`.**
|
|
11
|
+
|
|
9
12
|
## The Problem
|
|
10
13
|
|
|
11
14
|
Claude Code starts every session with amnesia. It doesn't remember what you built yesterday, what decisions you made, what files matter, or what broke last time. Every `/compact` wipes context. Every new session is a cold start. You waste tokens re-explaining your project, re-reading files, and watching Claude repeat mistakes you already corrected.
|
|
@@ -14,13 +17,13 @@ The longer you work with Claude Code, the worse this gets. Projects accumulate h
|
|
|
14
17
|
|
|
15
18
|
## The Solution
|
|
16
19
|
|
|
17
|
-
Eagle Mem
|
|
20
|
+
Eagle Mem is a recall layer for Claude Code. Every session starts with context from previous sessions — summaries, decisions, memories, tasks, project overviews, and relevant code — injected automatically via hooks. No commands to run, no prompts to write. It just works.
|
|
18
21
|
|
|
19
22
|
**Zero per-instance overhead.** No daemon, no vector DB, no MCP server. Just bash scripts, sqlite3 (WAL mode, FTS5 full-text search), and jq.
|
|
20
23
|
|
|
21
24
|
```
|
|
22
25
|
======================================
|
|
23
|
-
Eagle Mem
|
|
26
|
+
Eagle Mem Recall Ready
|
|
24
27
|
======================================
|
|
25
28
|
Project | my-app
|
|
26
29
|
Sessions | 42 (18 with summaries)
|
|
@@ -57,7 +60,7 @@ Six hooks fire automatically at different points in Claude Code's lifecycle:
|
|
|
57
60
|
| **SessionStart** | startup, resume, clear, compact | Injects overview, summaries, memories, tasks, core files, working set. Auto-provisions new projects (scan, index). |
|
|
58
61
|
| **PreToolUse** | before Bash, Read, Edit, Write | Surfaces guardrails and decisions before edits. Rewrites noisy commands (learned rules). Detects redundant reads, nudges co-edit partners, detects stuck loops. |
|
|
59
62
|
| **UserPromptSubmit** | user sends a message | FTS5 search across past sessions and indexed code for relevant context |
|
|
60
|
-
| **PostToolUse** | after tool calls | Records file touches, mirrors memory/plan/task writes, surfaces decision history on reads |
|
|
63
|
+
| **PostToolUse** | after tool calls | Records file touches, mirrors memory/plan/task writes, surfaces decision history and feature impacts on reads, stale memory warnings on edits |
|
|
61
64
|
| **Stop** | Claude's turn ends | Extracts `<eagle-summary>` blocks for rich session summaries |
|
|
62
65
|
| **SessionEnd** | session closes | Re-syncs tasks, marks session completed |
|
|
63
66
|
|
|
@@ -91,6 +94,7 @@ Eagle Mem prevents Claude from repeating past mistakes:
|
|
|
91
94
|
- **Guardrails** — file-level rules (manual or curator-discovered) that fire before every Edit/Write
|
|
92
95
|
- **Feature verification** — tracks features with smoke tests and dependencies; reminds you to verify on `git push`
|
|
93
96
|
- **Gotcha surfacing** — past surprises and gotchas are surfaced when editing related files
|
|
97
|
+
- **Stale memory detection** — warns when edits may contradict stored memories
|
|
94
98
|
|
|
95
99
|
## Commands
|
|
96
100
|
|
|
@@ -148,7 +152,10 @@ Single SQLite database at `~/.eagle-mem/memory.db` (WAL mode, FTS5 full-text sea
|
|
|
148
152
|
| `command_rules` | Curator-learned command output rules |
|
|
149
153
|
| `file_hints` | Curator-learned file access patterns (co-edit pairs, hot files) |
|
|
150
154
|
| `guardrails` | File-level regression rules (manual or curator-discovered) |
|
|
151
|
-
| `features` | Feature tracking with
|
|
155
|
+
| `features` | Feature tracking with names and descriptions |
|
|
156
|
+
| `feature_files` | Files belonging to each feature |
|
|
157
|
+
| `feature_dependencies` | Inter-feature dependency relationships |
|
|
158
|
+
| `feature_smoke_tests` | Smoke test definitions for feature verification |
|
|
152
159
|
| `eagle_meta` | Internal metadata (last scan, last curate, etc.) |
|
|
153
160
|
| `claude_memories` | Mirror of Claude Code auto-memories |
|
|
154
161
|
| `claude_plans` | Mirror of Claude Code plans |
|
package/hooks/pre-tool-use.sh
CHANGED
|
@@ -80,7 +80,7 @@ Bash)
|
|
|
80
80
|
done <<< "$changed_files"
|
|
81
81
|
|
|
82
82
|
if [ -n "$context" ]; then
|
|
83
|
-
context="=== Eagle Mem ===
|
|
83
|
+
context="=== Eagle Mem: Feature Guardrail ===
|
|
84
84
|
This push affects the following features. After deploy, verify each works and run 'eagle-mem feature verify <name>'.
|
|
85
85
|
${context}================"
|
|
86
86
|
fi
|
|
@@ -101,19 +101,19 @@ ${context}================"
|
|
|
101
101
|
if [ -n "$max_lines" ] && [ "$max_lines" -gt 0 ] 2>/dev/null; then
|
|
102
102
|
case "$cmd" in
|
|
103
103
|
*"&&"*|*"||"*|*";"*)
|
|
104
|
-
context+="Eagle Mem: '${base_cmd}' produces long output (${reason}). Consider: | head -${max_lines}"
|
|
104
|
+
context+="Eagle Mem command rule: '${base_cmd}' produces long output (${reason}). Consider: | head -${max_lines}"
|
|
105
105
|
;;
|
|
106
106
|
*"| head"*|*"| tail"*|*"| wc"*|*"| grep"*|*">"*|*">>"*)
|
|
107
107
|
;;
|
|
108
108
|
*)
|
|
109
109
|
updated_input=$(echo "$input" | jq --arg cmd "${cmd} | head -${max_lines}" '.tool_input + {"command":$cmd}')
|
|
110
|
-
context+="Eagle Mem: '${base_cmd}' output is typically long (${reason}). Piped through head -${max_lines}."
|
|
110
|
+
context+="Eagle Mem command rule: '${base_cmd}' output is typically long (${reason}). Piped through head -${max_lines}."
|
|
111
111
|
;;
|
|
112
112
|
esac
|
|
113
113
|
fi
|
|
114
114
|
;;
|
|
115
115
|
summary)
|
|
116
|
-
context+="Eagle Mem: '${base_cmd}' is typically noisy (${reason}). Consider piping through tail or checking exit code only."
|
|
116
|
+
context+="Eagle Mem command rule: '${base_cmd}' is typically noisy (${reason}). Consider piping through tail or checking exit code only."
|
|
117
117
|
;;
|
|
118
118
|
esac
|
|
119
119
|
fi
|
|
@@ -147,12 +147,12 @@ Edit|Write)
|
|
|
147
147
|
while IFS= read -r ctx_line; do
|
|
148
148
|
case "$ctx_line" in
|
|
149
149
|
GR:*) gr_block+=" - ${ctx_line#GR:}"$'\n' ;;
|
|
150
|
-
DEC:*) context+="=== Eagle Mem ==="$'\n'"
|
|
151
|
-
GOT:*) context+="=== Eagle Mem ==="$'\n'"
|
|
150
|
+
DEC:*) context+="=== Eagle Mem: Decision Recall ==="$'\n'"${fname}: ${ctx_line#DEC:} — Do not revert without asking."$'\n'"================"$'\n' ;;
|
|
151
|
+
GOT:*) context+="=== Eagle Mem: Gotcha Recall ==="$'\n'"${fname}: ${ctx_line#GOT:}"$'\n'"================"$'\n' ;;
|
|
152
152
|
esac
|
|
153
153
|
done <<< "$edit_ctx"
|
|
154
154
|
if [ -n "$gr_block" ]; then
|
|
155
|
-
context+="=== Eagle Mem ==="$'\n'"
|
|
155
|
+
context+="=== Eagle Mem: Guardrail ==="$'\n'"${fname}:"$'\n'"${gr_block}================"$'\n'
|
|
156
156
|
fi
|
|
157
157
|
fi
|
|
158
158
|
;;
|
|
@@ -165,9 +165,9 @@ Edit|Write)
|
|
|
165
165
|
edit_count=$(grep -cFx -- "$fp" "$edit_tracker" 2>/dev/null)
|
|
166
166
|
edit_count=${edit_count:-0}
|
|
167
167
|
if [ "$edit_count" -ge 8 ]; then
|
|
168
|
-
context+="Eagle Mem: '$(basename "$fp")' has been edited ${edit_count} times this session. You may be stuck — consider stepping back to rethink your approach before making more changes. "
|
|
168
|
+
context+="Eagle Mem warning: '$(basename "$fp")' has been edited ${edit_count} times this session. You may be stuck — consider stepping back to rethink your approach before making more changes. "
|
|
169
169
|
elif [ "$edit_count" -ge 5 ]; then
|
|
170
|
-
context+="Eagle Mem: '$(basename "$fp")' has been edited ${edit_count} times this session. If the changes aren't converging, consider a different approach. "
|
|
170
|
+
context+="Eagle Mem warning: '$(basename "$fp")' has been edited ${edit_count} times this session. If the changes aren't converging, consider a different approach. "
|
|
171
171
|
fi
|
|
172
172
|
fi
|
|
173
173
|
fi
|
|
@@ -186,7 +186,7 @@ Edit|Write)
|
|
|
186
186
|
[ -n "$co_file" ] && partners+="$(basename "$co_file"), "
|
|
187
187
|
done
|
|
188
188
|
partners=${partners%, }
|
|
189
|
-
context+="Eagle Mem:
|
|
189
|
+
context+="Eagle Mem recall: when you change '$(basename "$fp")' you usually also touch: $partners"
|
|
190
190
|
fi
|
|
191
191
|
fi
|
|
192
192
|
;;
|
|
@@ -198,7 +198,7 @@ Read)
|
|
|
198
198
|
# ─── Read-after-modify detection ──────────────────────
|
|
199
199
|
mod_file="$EAGLE_MEM_DIR/mod-tracker/${session_id}"
|
|
200
200
|
if [ -f "$mod_file" ] && grep -qFx -- "$fp" "$mod_file" 2>/dev/null; then
|
|
201
|
-
context+="Eagle Mem: '$(basename "$fp")' was just edited/written — the diff is already in context from the tool output. "
|
|
201
|
+
context+="Eagle Mem recall: '$(basename "$fp")' was just edited/written — the diff is already in context from the tool output. "
|
|
202
202
|
fi
|
|
203
203
|
|
|
204
204
|
# ─── Read dedup tracker (soft nudge) ──────────────────
|
|
@@ -209,7 +209,7 @@ Read)
|
|
|
209
209
|
read_count=$(grep -cFx -- "$fp" "$tracker_file" 2>/dev/null)
|
|
210
210
|
read_count=${read_count:-0}
|
|
211
211
|
if [ "$read_count" -ge 3 ]; then
|
|
212
|
-
context+="Eagle Mem: '$(basename "$fp")' has been read ${read_count} times this session. Its contents are likely already in context."
|
|
212
|
+
context+="Eagle Mem recall: '$(basename "$fp")' has been read ${read_count} times this session. Its contents are likely already in context."
|
|
213
213
|
fi
|
|
214
214
|
fi
|
|
215
215
|
;;
|
package/hooks/session-start.sh
CHANGED
|
@@ -129,7 +129,7 @@ stat_last_display="${stat_last_summary:0:60}"
|
|
|
129
129
|
[ ${#stat_last_summary} -gt 60 ] && stat_last_display+="..."
|
|
130
130
|
|
|
131
131
|
eagle_banner="======================================
|
|
132
|
-
Eagle Mem
|
|
132
|
+
Eagle Mem Recall Ready
|
|
133
133
|
======================================
|
|
134
134
|
Project | $project
|
|
135
135
|
Sessions | $stat_sessions ($stat_with_summaries with summaries)"
|
|
@@ -151,7 +151,8 @@ context="$eagle_banner
|
|
|
151
151
|
|
|
152
152
|
if [ -n "$update_notice" ]; then
|
|
153
153
|
context+="
|
|
154
|
-
===
|
|
154
|
+
=== Eagle Mem: Update Available ===
|
|
155
|
+
$update_notice
|
|
155
156
|
"
|
|
156
157
|
fi
|
|
157
158
|
|
|
@@ -163,12 +164,12 @@ if [ -n "$overview" ]; then
|
|
|
163
164
|
overview="${overview:0:497}..."
|
|
164
165
|
fi
|
|
165
166
|
context+="
|
|
166
|
-
=== Overview ===
|
|
167
|
+
=== Eagle Mem: Project Overview ===
|
|
167
168
|
$overview
|
|
168
169
|
"
|
|
169
170
|
else
|
|
170
171
|
context+="
|
|
171
|
-
=== New Project ===
|
|
172
|
+
=== Eagle Mem: New Project ===
|
|
172
173
|
No overview yet — auto-scan is running. Run /eagle-mem-overview for a richer briefing.
|
|
173
174
|
"
|
|
174
175
|
fi
|
|
@@ -185,7 +186,7 @@ recent=$(eagle_get_recent_summaries "$project" "$_summary_limit")
|
|
|
185
186
|
|
|
186
187
|
if [ -n "$recent" ]; then
|
|
187
188
|
context+="
|
|
188
|
-
=== Recent
|
|
189
|
+
=== Eagle Mem: Recent Recall ===
|
|
189
190
|
"
|
|
190
191
|
while IFS='|' read -r request completed learned next_steps created_at decisions gotchas key_files; do
|
|
191
192
|
[ -z "$request" ] && [ -z "$completed" ] && continue
|
|
@@ -220,7 +221,7 @@ memories=$(eagle_db "SELECT memory_name, memory_type, description, file_path, up
|
|
|
220
221
|
LIMIT 5;")
|
|
221
222
|
if [ -n "$memories" ]; then
|
|
222
223
|
context+="
|
|
223
|
-
=== Memories ===
|
|
224
|
+
=== Eagle Mem: Stored Memories ===
|
|
224
225
|
"
|
|
225
226
|
while IFS='|' read -r mname mtype mdesc _fpath _updated days_ago; do
|
|
226
227
|
[ -z "$mname" ] && continue
|
|
@@ -244,7 +245,7 @@ fi
|
|
|
244
245
|
plans=$(eagle_list_claude_plans "$project" 3)
|
|
245
246
|
if [ -n "$plans" ]; then
|
|
246
247
|
context+="
|
|
247
|
-
=== Plans ===
|
|
248
|
+
=== Eagle Mem: Plans ===
|
|
248
249
|
"
|
|
249
250
|
while IFS='|' read -r ptitle _pproj _fpath _updated; do
|
|
250
251
|
[ -z "$ptitle" ] && continue
|
|
@@ -265,7 +266,7 @@ synced_tasks=$(eagle_db "SELECT subject, status, blocked_by FROM claude_tasks
|
|
|
265
266
|
LIMIT 10;")
|
|
266
267
|
if [ -n "$synced_tasks" ]; then
|
|
267
268
|
context+="
|
|
268
|
-
=== Tasks ===
|
|
269
|
+
=== Eagle Mem: Tasks ===
|
|
269
270
|
"
|
|
270
271
|
while IFS='|' read -r tsubject tstatus tblocked; do
|
|
271
272
|
[ -z "$tsubject" ] && continue
|
|
@@ -283,7 +284,8 @@ fi
|
|
|
283
284
|
hot_files=$(eagle_get_hot_files "$project")
|
|
284
285
|
if [ -n "$hot_files" ]; then
|
|
285
286
|
context+="
|
|
286
|
-
=== Core Files
|
|
287
|
+
=== Eagle Mem: Core Files ===
|
|
288
|
+
Frequently read — re-read sparingly if unchanged.
|
|
287
289
|
"
|
|
288
290
|
IFS=',' read -ra hf_arr <<< "$hot_files"
|
|
289
291
|
for hf in "${hf_arr[@]}"; do
|
|
@@ -298,7 +300,8 @@ if [ "$source_type" = "compact" ] || [ "$source_type" = "clear" ]; then
|
|
|
298
300
|
working_set=$(eagle_get_working_set "$session_id")
|
|
299
301
|
if [ -n "$working_set" ]; then
|
|
300
302
|
context+="
|
|
301
|
-
=== Working Set
|
|
303
|
+
=== Eagle Mem: Working Set ===
|
|
304
|
+
Files you were modifying before compact.
|
|
302
305
|
"
|
|
303
306
|
while IFS='|' read -r ws_path ws_edits; do
|
|
304
307
|
[ -z "$ws_path" ] && continue
|
|
@@ -312,12 +315,12 @@ fi
|
|
|
312
315
|
|
|
313
316
|
if [ "$source_type" = "compact" ] || [ "$source_type" = "clear" ]; then
|
|
314
317
|
context+="
|
|
315
|
-
=== Eagle Mem ===
|
|
318
|
+
=== Eagle Mem: Active ===
|
|
316
319
|
Memory active. Attribute recalled context to Eagle Mem. Do not revert PostToolUse-surfaced decisions without asking. Emit <eagle-summary> before final response.
|
|
317
320
|
"
|
|
318
321
|
else
|
|
319
322
|
context+="
|
|
320
|
-
=== Eagle Mem ===
|
|
323
|
+
=== Eagle Mem: Active ===
|
|
321
324
|
Memory active for '$project'. Scan, index, prune, and self-learning run automatically — never ask the user to run these. Attribute recalled context: \"Eagle Mem recalls:\" Do not revert PostToolUse-surfaced decisions without user request. No raw secrets in summaries. If you contradict a loaded memory, update the memory file.
|
|
322
325
|
|
|
323
326
|
Before your final response, emit:
|
|
@@ -41,14 +41,14 @@ if [ -n "$session_id" ] && eagle_validate_session_id "$session_id"; then
|
|
|
41
41
|
|
|
42
42
|
if [ "$turn_count" -ge 30 ]; then
|
|
43
43
|
context+="
|
|
44
|
-
===
|
|
44
|
+
=== Eagle Mem: Context Pressure Critical ($turn_count turns since compact) ===
|
|
45
45
|
IMMEDIATELY emit a detailed <eagle-summary> covering ALL work this session.
|
|
46
46
|
Tell the user to run /compact NOW to avoid losing context.
|
|
47
47
|
"
|
|
48
48
|
echo "$turn_count" > "$EAGLE_MEM_DIR/.context-pressure"
|
|
49
49
|
elif [ "$turn_count" -ge 20 ]; then
|
|
50
50
|
context+="
|
|
51
|
-
===
|
|
51
|
+
=== Eagle Mem: Context Pressure High ($turn_count turns since compact) ===
|
|
52
52
|
Include a thorough <eagle-summary> in your next response — capture all decisions, gotchas, and learned context before compaction.
|
|
53
53
|
Suggest the user run /compact to free context for continued work.
|
|
54
54
|
"
|
|
@@ -81,7 +81,7 @@ fts_query=$(echo "$user_prompt" | tr -cs '[:alnum:]' ' ' | tr '[:upper:]' '[:low
|
|
|
81
81
|
results=$(eagle_search_summaries "$fts_query" "$project" 3)
|
|
82
82
|
|
|
83
83
|
if [ -n "$results" ]; then
|
|
84
|
-
context+="=== Eagle Mem
|
|
84
|
+
context+="=== Eagle Mem: Relevant Recall ===
|
|
85
85
|
"
|
|
86
86
|
while IFS='|' read -r req completed learned _next_steps created_at _proj decisions gotchas key_files; do
|
|
87
87
|
[ -z "$req" ] && [ -z "$completed" ] && continue
|
|
@@ -106,7 +106,7 @@ if [ "${has_chunks:-0}" -gt 0 ]; then
|
|
|
106
106
|
code_results=$(eagle_search_code_chunks "$fts_query" "$project" 5)
|
|
107
107
|
|
|
108
108
|
if [ -n "$code_results" ]; then
|
|
109
|
-
context+="=== Eagle Mem
|
|
109
|
+
context+="=== Eagle Mem: Relevant Code ===
|
|
110
110
|
"
|
|
111
111
|
while IFS='|' read -r fpath sline eline lang; do
|
|
112
112
|
[ -z "$fpath" ] && continue
|
|
@@ -123,7 +123,7 @@ fi
|
|
|
123
123
|
context+="
|
|
124
124
|
IMPORTANT: When Eagle Mem finds relevant memories or code for the user's prompt, briefly mention it at the start of your response: \"Eagle Mem recalled N relevant sessions\" or \"Eagle Mem found related code in [files]\". One line max — then proceed with the answer.
|
|
125
125
|
|
|
126
|
-
=== Eagle Mem
|
|
126
|
+
=== Eagle Mem: Persistent Memory ===
|
|
127
127
|
"
|
|
128
128
|
|
|
129
129
|
echo "$context"
|
package/lib/hooks-posttool.sh
CHANGED
|
@@ -75,7 +75,7 @@ eagle_posttool_stale_hint() {
|
|
|
75
75
|
local stale_hit
|
|
76
76
|
stale_hit=$(eagle_search_stale_memories "$project" "$fts_query")
|
|
77
77
|
if [ -n "$stale_hit" ]; then
|
|
78
|
-
local stale_msg="=== Eagle Mem ===
|
|
78
|
+
local stale_msg="=== Eagle Mem: Memory Check ===
|
|
79
79
|
Memory '${stale_hit}' may reference '${fname}'. If your edit contradicts it, update the memory.
|
|
80
80
|
================"
|
|
81
81
|
jq -nc --arg ctx "$stale_msg" '{"hookSpecificOutput":{"hookEventName":"PostToolUse","additionalContext":$ctx}}'
|
|
@@ -108,8 +108,8 @@ eagle_posttool_decision_surface() {
|
|
|
108
108
|
local decision_hit
|
|
109
109
|
decision_hit=$(eagle_search_decisions_for_file "$project" "$fts_query")
|
|
110
110
|
if [ -n "$decision_hit" ]; then
|
|
111
|
-
read_context+="=== Eagle Mem ===
|
|
112
|
-
|
|
111
|
+
read_context+="=== Eagle Mem: Decision Recall ===
|
|
112
|
+
${fname}: ${decision_hit} — Do not revert without explicit user request.
|
|
113
113
|
================
|
|
114
114
|
"
|
|
115
115
|
fi
|
|
@@ -121,7 +121,7 @@ Decision history for '${fname}': ${decision_hit} — Do not revert without expli
|
|
|
121
121
|
if [ -n "$feature_hit" ]; then
|
|
122
122
|
while IFS='|' read -r feat_name feat_desc feat_verified _role feat_deps feat_other_files feat_smoke; do
|
|
123
123
|
[ -z "$feat_name" ] && continue
|
|
124
|
-
read_context+="=== Eagle Mem ===
|
|
124
|
+
read_context+="=== Eagle Mem: Feature Guardrail ===
|
|
125
125
|
'${fname}' is part of feature '${feat_name}'"
|
|
126
126
|
[ -n "$feat_desc" ] && read_context+=" ($feat_desc)"
|
|
127
127
|
read_context+="."
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eagle-mem",
|
|
3
|
-
"version": "4.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.6.1",
|
|
4
|
+
"description": "Context that survives /compact for Claude Code — SQLite + FTS5, no daemon, no bloat",
|
|
5
5
|
"bin": {
|
|
6
6
|
"eagle-mem": "bin/eagle-mem"
|
|
7
7
|
},
|
package/scripts/help.sh
CHANGED
|
@@ -13,7 +13,7 @@ version=$(jq -r .version "$PACKAGE_DIR/package.json" 2>/dev/null || echo "unknow
|
|
|
13
13
|
eagle_banner
|
|
14
14
|
|
|
15
15
|
echo -e " ${BOLD}Eagle Mem${RESET} ${DIM}v${version}${RESET}"
|
|
16
|
-
echo -e " ${DIM}
|
|
16
|
+
echo -e " ${DIM}Context that survives /compact for Claude Code${RESET}"
|
|
17
17
|
echo ""
|
|
18
18
|
echo -e " ${BOLD}Commands:${RESET}"
|
|
19
19
|
echo -e " ${CYAN}install${RESET} First-time setup: hooks, database, skills"
|
package/scripts/install.sh
CHANGED
|
@@ -250,17 +250,11 @@ else
|
|
|
250
250
|
eagle_dim " Statusline detected: $sl_file"
|
|
251
251
|
eagle_dim " To add Eagle Mem, add this snippet before your ASSEMBLE section:"
|
|
252
252
|
echo ""
|
|
253
|
-
eagle_dim " # ──
|
|
253
|
+
eagle_dim " # ── Eagle Mem ──"
|
|
254
254
|
eagle_dim " em_section=\"\""
|
|
255
|
-
eagle_dim "
|
|
256
|
-
eagle_dim "
|
|
257
|
-
eagle_dim "
|
|
258
|
-
eagle_dim " em_cnt=\$(echo \".headers off"
|
|
259
|
-
eagle_dim " SELECT COUNT(*) FROM sessions WHERE project = '\${em_proj}';\" | sqlite3 \"\$em_db\" 2>/dev/null | tr -d '[:space:]')"
|
|
260
|
-
eagle_dim " em_mem=\$(echo \".headers off"
|
|
261
|
-
eagle_dim " SELECT COUNT(*) FROM claude_memories WHERE project = '\${em_proj}';\" | sqlite3 \"\$em_db\" 2>/dev/null | tr -d '[:space:]')"
|
|
262
|
-
eagle_dim " em_cnt=\${em_cnt:-0}; em_mem=\${em_mem:-0}"
|
|
263
|
-
eagle_dim " em_section=\$(printf \"%bEagle Mem%b %b%s%b ses %b%s%b mem\" \"\$CYAN\" \"\$R\" \"\$WHT\" \"\$em_cnt\" \"\$DIM\" \"\$WHT\" \"\$em_mem\" \"\$R\")"
|
|
255
|
+
eagle_dim " if [ -f \"\$HOME/.eagle-mem/scripts/statusline-em.sh\" ]; then"
|
|
256
|
+
eagle_dim " source \"\$HOME/.eagle-mem/scripts/statusline-em.sh\""
|
|
257
|
+
eagle_dim " em_section=\$(eagle_mem_statusline \"\$project_dir\")"
|
|
264
258
|
eagle_dim " fi"
|
|
265
259
|
echo ""
|
|
266
260
|
eagle_ok "Statusline ${DIM}(manual patch needed — instructions above)${RESET}"
|
package/scripts/style.sh
CHANGED
|
@@ -17,11 +17,13 @@ TICK="${GREEN}✓${RESET}"
|
|
|
17
17
|
CROSS="${RED}✗${RESET}"
|
|
18
18
|
ARROW="${CYAN}→${RESET}"
|
|
19
19
|
DOT="${DIM}·${RESET}"
|
|
20
|
+
EAGLE_RULE="======================================"
|
|
21
|
+
EAGLE_TAGLINE="context that survives /compact"
|
|
20
22
|
|
|
21
23
|
eagle_header() {
|
|
22
24
|
echo ""
|
|
23
|
-
echo -e " ${BOLD}Eagle Mem${RESET} ${DIM}$1${RESET}"
|
|
24
|
-
echo -e " ${
|
|
25
|
+
echo -e " ${CYAN}${BOLD}Eagle Mem${RESET} ${DIM}$1${RESET}"
|
|
26
|
+
echo -e " ${CYAN}${EAGLE_RULE}${RESET}"
|
|
25
27
|
echo ""
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -43,9 +45,10 @@ eagle_footer() {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
eagle_banner() {
|
|
46
|
-
echo -e " ${CYAN}
|
|
48
|
+
echo -e " ${CYAN}${EAGLE_RULE}${RESET}"
|
|
47
49
|
echo -e " ${CYAN}${BOLD} Eagle Mem${RESET}"
|
|
48
|
-
echo -e " ${
|
|
50
|
+
echo -e " ${DIM} ${EAGLE_TAGLINE}${RESET}"
|
|
51
|
+
echo -e " ${CYAN}${EAGLE_RULE}${RESET}"
|
|
49
52
|
echo ""
|
|
50
53
|
}
|
|
51
54
|
|