eagle-mem 4.9.6 → 4.9.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/README.md +31 -4
- package/architecture.html +1791 -0
- package/bin/eagle-mem +1 -0
- package/db/migrate.sh +13 -2
- package/docs/visible-surface-ux-contract.md +53 -0
- package/hooks/post-tool-use.sh +2 -2
- package/hooks/pre-tool-use.sh +6 -6
- package/hooks/session-start.sh +216 -9
- package/hooks/user-prompt-submit.sh +72 -15
- package/lib/common.sh +485 -35
- package/lib/db-mirrors.sh +9 -18
- package/lib/db-sessions.sh +22 -15
- package/lib/db-summaries.sh +19 -7
- package/lib/hooks-posttool.sh +44 -10
- package/lib/updater.sh +12 -0
- package/package.json +4 -2
- package/scripts/doctor.sh +262 -0
- package/scripts/feature.sh +37 -11
- package/scripts/health.sh +10 -7
- package/scripts/help.sh +1 -0
- package/scripts/install.sh +9 -3
- package/scripts/memories.sh +258 -65
- package/scripts/orchestrate.sh +2 -2
- package/scripts/search.sh +240 -56
- package/scripts/statusline-em.sh +130 -26
- package/scripts/uninstall.sh +67 -0
- package/scripts/update.sh +8 -1
package/scripts/feature.sh
CHANGED
|
@@ -18,6 +18,7 @@ eagle_header "Features"
|
|
|
18
18
|
project=$(eagle_project_from_cwd "$(pwd)")
|
|
19
19
|
subcommand="${1:-list}"
|
|
20
20
|
shift 2>/dev/null || true
|
|
21
|
+
raw_output=false
|
|
21
22
|
|
|
22
23
|
case "$subcommand" in
|
|
23
24
|
list|ls)
|
|
@@ -73,28 +74,53 @@ case "$subcommand" in
|
|
|
73
74
|
;;
|
|
74
75
|
|
|
75
76
|
pending)
|
|
77
|
+
limit=50
|
|
78
|
+
while [ $# -gt 0 ]; do
|
|
79
|
+
case "$1" in
|
|
80
|
+
--raw|--debug) raw_output=true; shift ;;
|
|
81
|
+
--limit|-n) limit="$2"; shift 2 ;;
|
|
82
|
+
--project|-p) project="$2"; shift 2 ;;
|
|
83
|
+
*) shift ;;
|
|
84
|
+
esac
|
|
85
|
+
done
|
|
86
|
+
limit=$(eagle_sql_int "$limit")
|
|
87
|
+
[ "$limit" -eq 0 ] && limit=50
|
|
76
88
|
results=$(eagle_list_pending_feature_verifications "$project" 50)
|
|
77
89
|
if [ -z "$results" ]; then
|
|
78
90
|
eagle_ok "No pending feature verifications for '$project'"
|
|
79
91
|
exit 0
|
|
80
92
|
fi
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
echo -e " ${
|
|
94
|
+
pending_count=$(printf '%s\n' "$results" | sed '/^[[:space:]]*$/d' | wc -l | tr -d ' ')
|
|
95
|
+
echo -e " ${BOLD}Pending verification${RESET} ${DIM}($project)${RESET}"
|
|
96
|
+
echo -e " ${DIM}${pending_count} check(s) must be verified or waived before release-boundary commands.${RESET}"
|
|
97
|
+
echo ""
|
|
98
|
+
|
|
99
|
+
shown=0
|
|
84
100
|
while IFS='|' read -r id feat file reason trigger created smoke fingerprint; do
|
|
85
101
|
[ -z "$id" ] && continue
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[ -n "$
|
|
92
|
-
[
|
|
93
|
-
|
|
102
|
+
[ "$shown" -ge "$limit" ] && break
|
|
103
|
+
shown=$((shown + 1))
|
|
104
|
+
echo -e " ${BOLD}${shown}. ${feat}${RESET} ${DIM}#${id}${RESET}"
|
|
105
|
+
[ -n "$file" ] && echo -e " ${DIM}File:${RESET} $file"
|
|
106
|
+
[ -n "$reason" ] && echo -e " ${DIM}Why:${RESET} $reason"
|
|
107
|
+
[ -n "$smoke" ] && echo -e " ${CYAN}Smoke:${RESET} $smoke"
|
|
108
|
+
if [ "$raw_output" = true ]; then
|
|
109
|
+
[ -n "$trigger" ] && echo -e " ${DIM}Trigger:${RESET} $trigger"
|
|
110
|
+
[ -n "$fingerprint" ] && echo -e " ${DIM}Diff:${RESET} $fingerprint"
|
|
111
|
+
[ -n "$created" ] && echo -e " ${DIM}Created:${RESET} $created"
|
|
112
|
+
fi
|
|
113
|
+
echo ""
|
|
94
114
|
done <<< "$results"
|
|
95
|
-
|
|
115
|
+
if [ "$pending_count" -gt "$shown" ] 2>/dev/null; then
|
|
116
|
+
eagle_dim "$((pending_count - shown)) more pending; run with --limit $pending_count to show all."
|
|
117
|
+
echo ""
|
|
118
|
+
fi
|
|
96
119
|
eagle_info "Verify after testing: eagle-mem feature verify <name> --notes \"what passed\""
|
|
97
120
|
eagle_info "Waive intentionally: eagle-mem feature waive <id> --reason \"why safe\""
|
|
121
|
+
if [ "$raw_output" = false ]; then
|
|
122
|
+
eagle_dim "Run with --raw to show trigger, diff fingerprint, and created timestamp."
|
|
123
|
+
fi
|
|
98
124
|
;;
|
|
99
125
|
|
|
100
126
|
waive)
|
package/scripts/health.sh
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# ═══════════════════════════════════════════════════════════
|
|
3
3
|
# Eagle Mem — Health Check
|
|
4
4
|
# Diagnoses how well the self-learning pipeline is working
|
|
5
|
-
#
|
|
5
|
+
# ═══════════════════════════════════════════════════════════
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
|
|
8
8
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
@@ -51,7 +51,7 @@ score=0
|
|
|
51
51
|
max_score=0
|
|
52
52
|
issues=()
|
|
53
53
|
|
|
54
|
-
#
|
|
54
|
+
# ─── 1. Summary capture rate (25 pts) ───────────────────
|
|
55
55
|
|
|
56
56
|
max_score=$((max_score + 25))
|
|
57
57
|
|
|
@@ -263,10 +263,10 @@ else
|
|
|
263
263
|
issues+=("Run: eagle-mem curate --dry-run")
|
|
264
264
|
fi
|
|
265
265
|
|
|
266
|
-
# ─── Score
|
|
266
|
+
# ─── Score ────────────────────────────────────────────────
|
|
267
267
|
|
|
268
268
|
echo ""
|
|
269
|
-
echo -e " ${DIM}
|
|
269
|
+
echo -e " ${DIM}─────────────────────────────────────${RESET}"
|
|
270
270
|
|
|
271
271
|
pct=$((score * 100 / max_score))
|
|
272
272
|
if [ "$pct" -ge 80 ]; then
|
|
@@ -280,14 +280,17 @@ else
|
|
|
280
280
|
grade="Unhealthy"
|
|
281
281
|
fi
|
|
282
282
|
|
|
283
|
-
echo -e " ${BOLD}
|
|
283
|
+
echo -e " ${BOLD}Overall:${RESET} ${color}${grade}${RESET} ${DIM}${score}/${max_score} (${pct}%)${RESET}"
|
|
284
284
|
|
|
285
285
|
if [ ${#issues[@]} -gt 0 ]; then
|
|
286
286
|
echo ""
|
|
287
|
-
echo -e " ${BOLD}
|
|
287
|
+
echo -e " ${BOLD}Next:${RESET}"
|
|
288
288
|
for issue in "${issues[@]}"; do
|
|
289
289
|
echo -e " ${YELLOW}!${RESET} $issue"
|
|
290
290
|
done
|
|
291
|
+
else
|
|
292
|
+
echo ""
|
|
293
|
+
eagle_ok "No immediate action needed."
|
|
291
294
|
fi
|
|
292
295
|
|
|
293
296
|
eagle_footer "Health check complete."
|
package/scripts/help.sh
CHANGED
|
@@ -22,6 +22,7 @@ echo -e " ${CYAN}update${RESET} Re-deploy hooks and run migrations"
|
|
|
22
22
|
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
|
+
echo -e " ${CYAN}doctor${RESET} Show install footprint, hooks, SQLite, manifest, and runtime drift"
|
|
25
26
|
echo -e " ${CYAN}updates${RESET} Auto-update status and policy"
|
|
26
27
|
echo -e " ${CYAN}overview${RESET} Build or view project overview"
|
|
27
28
|
echo -e " ${CYAN}session${RESET} Save a manual session summary"
|
package/scripts/install.sh
CHANGED
|
@@ -180,6 +180,8 @@ if [ "$prereqs_ok" = false ]; then
|
|
|
180
180
|
exit 1
|
|
181
181
|
fi
|
|
182
182
|
|
|
183
|
+
eagle_runtime_change_plan "install" "$PACKAGE_DIR" "$claude_found" "$codex_found"
|
|
184
|
+
|
|
183
185
|
echo ""
|
|
184
186
|
|
|
185
187
|
# ─── Copy files to ~/.eagle-mem/ ───────────────────────────
|
|
@@ -334,8 +336,7 @@ WRAPPER
|
|
|
334
336
|
eagle_dim " # ── Eagle Mem ──"
|
|
335
337
|
eagle_dim " em_section=\"\""
|
|
336
338
|
eagle_dim " if [ -f \"\$HOME/.eagle-mem/scripts/statusline-em.sh\" ]; then"
|
|
337
|
-
eagle_dim "
|
|
338
|
-
eagle_dim " em_section=\$(eagle_mem_statusline \"\$project_dir\" \"\$session_id\" \"\$input\")"
|
|
339
|
+
eagle_dim " em_section=\$(printf '%s' \"\$input\" | bash \"\$HOME/.eagle-mem/scripts/statusline-em.sh\" --hud)"
|
|
339
340
|
eagle_dim " fi"
|
|
340
341
|
echo ""
|
|
341
342
|
eagle_ok "Statusline ${DIM}(manual patch needed — instructions above)${RESET}"
|
|
@@ -365,7 +366,7 @@ eagle_ok "Auto-updates ${DIM}(mode=$(eagle_update_config_mode), allow=$(eagle_up
|
|
|
365
366
|
|
|
366
367
|
if [ "$claude_found" = true ]; then
|
|
367
368
|
if eagle_patch_claude_md; then
|
|
368
|
-
|
|
369
|
+
eagle_ok "CLAUDE.md ${DIM}(Eagle Mem guidance added)${RESET}"
|
|
369
370
|
else
|
|
370
371
|
eagle_ok "CLAUDE.md ${DIM}(already has Eagle Mem section)${RESET}"
|
|
371
372
|
fi
|
|
@@ -384,6 +385,11 @@ fi
|
|
|
384
385
|
version=$(jq -r .version "$PACKAGE_DIR/package.json" 2>/dev/null || echo "unknown")
|
|
385
386
|
echo "$version" > "$EAGLE_MEM_DIR/.version"
|
|
386
387
|
echo "$version" > "$EAGLE_MEM_DIR/.latest-version"
|
|
388
|
+
if eagle_runtime_manifest_write "$PACKAGE_DIR" "install"; then
|
|
389
|
+
eagle_ok "Install manifest written"
|
|
390
|
+
else
|
|
391
|
+
eagle_warn "Install manifest could not be written"
|
|
392
|
+
fi
|
|
387
393
|
|
|
388
394
|
# ─── Summary ───────────────────────────────────────────────
|
|
389
395
|
|