eagle-mem 4.8.1 → 4.8.3

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 CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  Eagle Mem turns AI coding sessions into compounding project knowledge. It gives Claude Code and Codex the same local memory, labels which agent created each memory, blocks risky release commands until affected features are verified, and lets broad work split into durable worker lanes.
13
13
 
14
- **v4.8.1 ships the communication refresh for the new architecture:** cross-agent orchestration, compact Codex hook recall, enforced anti-regression checks, configurable RTK token guardrails, and a memory-sync fix for large memory files.
14
+ **v4.8.3 ships Codex output and communication polish:** Codex final replies now stay clean by default instead of printing large `<eagle-summary>` capture blocks, installer/update output uses clean-output wording, and the GitHub Pages homepage now has a clearer hero plus explicit installer/orchestrator sections.
15
15
 
16
16
  **Website:** [Product](https://eagleisbatman.github.io/eagle-mem/) |
17
17
  [Architecture](https://eagleisbatman.github.io/eagle-mem/architecture.html) |
@@ -149,6 +149,14 @@ Eagle Mem prevents Claude from repeating past mistakes:
149
149
  | `eagle-mem scan` | Scan codebase and generate overview |
150
150
  | `eagle-mem index` | Index source files for FTS5 code search |
151
151
 
152
+ ### v4.8.3 Patch
153
+
154
+ GitHub Pages now keeps hero text readable over the terminal background and the homepage explicitly explains installer-created/updated `CLAUDE.md` and `AGENTS.md` sections plus orchestrator/worker mode. Installer/update output also uses the new clean-output Codex wording instead of saying it added eagle-summary instructions.
155
+
156
+ ### v4.8.2 Patch
157
+
158
+ Codex no longer gets instructed to print large user-visible `<eagle-summary>` XML blocks. The installer/update path rewrites existing `~/.codex/AGENTS.md` Eagle Mem instructions to the clean-output contract, context-pressure nudges use normal prose, and Codex-oriented skills/worker prompts avoid raw capture templates.
159
+
152
160
  ### v4.8.1 Patch
153
161
 
154
162
  `eagle-mem memories sync` is now safe on large Claude Code/Codex memory files. The memory mirror parser no longer uses early-exit pipelines under `pipefail`, avoiding exit `141` during sync.
@@ -171,7 +171,7 @@ fi
171
171
  if [ "$agent" = "codex" ] && [ "${stat_with_summaries:-0}" -eq 0 ] 2>/dev/null; then
172
172
  context+="
173
173
  === Eagle Mem: Codex Capture Warming Up ===
174
- Codex hooks are active. End important turns with an <eagle-summary> block so future Claude Code and Codex sessions can recall decisions, gotchas, key files, and next steps from this project.
174
+ Codex hooks are active. Keep final replies clean; Eagle Mem will capture decisions, gotchas, key files, and next steps from the transcript automatically.
175
175
  "
176
176
  fi
177
177
 
@@ -439,7 +439,7 @@ fi
439
439
  if [ "$agent" = "codex" ]; then
440
440
  context+="
441
441
  === Eagle Mem: Active ===
442
- Memory active for '$project'. Emit <eagle-summary> in final responses with request, completed, learned, decisions, gotchas, next_steps, key_files, files_read, files_modified, affected_features, verified_features, and regression_risks.
442
+ Memory active for '$project'. Keep user-facing Codex replies clean: do not print Eagle Mem summary capture blocks, XML, JSON hook payloads, or internal templates unless the user explicitly asks. The Stop hook captures summaries from the transcript automatically.
443
443
  "
444
444
  elif [ "$source_type" = "compact" ] || [ "$source_type" = "clear" ]; then
445
445
  context+="
package/hooks/stop.sh CHANGED
@@ -238,7 +238,7 @@ if [ "$needs_enrichment" -eq 1 ]; then
238
238
  if [ "$provider" != "none" ] && [ -n "$text_content" ]; then
239
239
  excerpt=$(echo "$text_content" | tail -c 3000)
240
240
 
241
- enrich_prompt="Extract facts from this Claude Code session. Only include items with clear evidence in the session text. Do NOT invent or repeat example content.
241
+ enrich_prompt="Extract facts from this AI coding session. Only include items with clear evidence in the session text. Do NOT invent or repeat example content.
242
242
 
243
243
  Respond with EXACTLY these sections (omit sections with no evidence):
244
244
 
@@ -263,7 +263,7 @@ Each as: <filepath>
263
263
  SESSION TEXT:
264
264
  $excerpt"
265
265
 
266
- enrich_system="You extract structured facts from development sessions. Output format for decisions: '- Did X — why: Y'. Output format for gotchas: '- Gotcha description'. Be concise. Only include items with clear evidence in the session text. Never fabricate content."
266
+ enrich_system="You extract structured facts from Claude Code and Codex development sessions. Output format for decisions: '- Did X — why: Y'. Output format for gotchas: '- Gotcha description'. Be concise. Only include items with clear evidence in the session text. Never fabricate content."
267
267
  enrich_result=$(eagle_llm_call "$enrich_prompt" "$enrich_system" 768 2>/dev/null)
268
268
  llm_rc=$?
269
269
 
@@ -44,18 +44,32 @@ if [ -n "$session_id" ] && eagle_validate_session_id "$session_id"; then
44
44
  eagle_log "INFO" "UserPromptSubmit: turn=$turn_count session=$session_id"
45
45
 
46
46
  if [ "$turn_count" -ge 30 ]; then
47
- context+="
47
+ if [ "$codex_compact" -eq 1 ]; then
48
+ context+="
49
+ === Eagle Mem: Context Pressure Critical ($turn_count turns since compact) ===
50
+ Keep the next Codex reply user-clean. Do not print Eagle Mem summary capture blocks or other internals. Include a short normal handoff note if useful, then ask the user to run /compact.
51
+ "
52
+ else
53
+ context+="
48
54
  === Eagle Mem: Context Pressure Critical ($turn_count turns since compact) ===
49
55
  IMMEDIATELY emit a detailed <eagle-summary> covering ALL work this session.
50
56
  Tell the user to run /compact NOW to avoid losing context.
51
57
  "
58
+ fi
52
59
  echo "$turn_count" > "$EAGLE_MEM_DIR/.context-pressure"
53
60
  elif [ "$turn_count" -ge 20 ]; then
54
- context+="
61
+ if [ "$codex_compact" -eq 1 ]; then
62
+ context+="
63
+ === Eagle Mem: Context Pressure High ($turn_count turns since compact) ===
64
+ Keep the next Codex reply clean. Do not print Eagle Mem summary capture blocks or other internals. Summarize any durable decisions in normal prose only.
65
+ "
66
+ else
67
+ context+="
55
68
  === Eagle Mem: Context Pressure High ($turn_count turns since compact) ===
56
69
  Include a thorough <eagle-summary> in your next response — capture all decisions, gotchas, and learned context before compaction.
57
70
  Suggest the user run /compact to free context for continued work.
58
71
  "
72
+ fi
59
73
  echo "$turn_count" > "$EAGLE_MEM_DIR/.context-pressure"
60
74
  else
61
75
  rm -f "$EAGLE_MEM_DIR/.context-pressure" 2>/dev/null
package/lib/common.sh CHANGED
@@ -659,10 +659,7 @@ eagle_patch_claude_md() {
659
659
  skip && /^## / { skip=0 }
660
660
  !skip { print }
661
661
  ' "$claude_md" > "$tmp_md"
662
- # Remove trailing blank lines left by section removal
663
- sed -e :a -e '/^[[:space:]]*$/{ $d; N; ba; }' "$tmp_md" > "${tmp_md}.clean"
664
- mv "${tmp_md}.clean" "$claude_md"
665
- rm -f "$tmp_md"
662
+ mv "$tmp_md" "$claude_md"
666
663
  _eagle_claude_md_section >> "$claude_md"
667
664
  return 0
668
665
  fi
@@ -692,30 +689,13 @@ _eagle_codex_agents_section() {
692
689
 
693
690
  Eagle Mem hooks are active for Codex in this project. SessionStart and UserPromptSubmit inject project recall from the shared Eagle Mem database at `~/.eagle-mem/memory.db`. PostToolUse records observations and marks affected features for verification.
694
691
 
695
- **Rule:** Before your final response in every session, emit an `<eagle-summary>` block so the Stop hook can capture a rich summary.
696
-
697
- ```
698
- <eagle-summary>
699
- request: [what user asked]
700
- completed: [what shipped]
701
- learned: [non-obvious discoveries]
702
- decisions: [choice — why]
703
- gotchas: [what surprised]
704
- next_steps: [concrete actions]
705
- key_files: [path — role]
706
- files_read: [path, ...]
707
- files_modified: [path, ...]
708
- affected_features: [feature, ...]
709
- verified_features: [feature, ...]
710
- regression_risks: [risk, ...]
711
- </eagle-summary>
712
- ```
692
+ **User-visible output rule:** Keep Codex final answers clean. Do not print Eagle Mem summary capture blocks, XML, JSON hook payloads, or internal templates to the user unless the user explicitly asks for raw Eagle Mem internals. The Stop hook captures Codex summaries from the transcript automatically.
713
693
 
714
694
  **How to apply:**
715
695
  - Attribute recalled context as "Eagle Mem recalls:" when it is injected
716
696
  - Use the Eagle Mem skills when relevant: `eagle-mem-search`, `eagle-mem-overview`, `eagle-mem-memories`, `eagle-mem-tasks`, and `eagle-mem-orchestrate`
717
697
  - For broad multi-agent work, YOU run `eagle-mem orchestrate`; do not ask the user to run these commands
718
- - For important decisions, preferences, gotchas, or durable project facts, explicitly include them in the `<eagle-summary>` block so Codex-originated memories become available to future Claude Code and Codex sessions
698
+ - For important decisions, preferences, gotchas, or durable project facts, include them briefly in normal prose. Eagle Mem will extract them from the transcript.
719
699
  - Do not revert Eagle Mem-surfaced decisions without asking the user
720
700
  - If Eagle Mem reports pending feature verification, verify or waive it before push/PR/publish
721
701
  - Never put raw secrets in summaries
@@ -729,6 +709,23 @@ eagle_patch_codex_agents_md() {
729
709
  mkdir -p "$(dirname "$agents_md")"
730
710
 
731
711
  if [ -f "$agents_md" ] && grep -qF "$marker" "$agents_md" 2>/dev/null; then
712
+ if grep -qF 'emit an `<eagle-summary>` block' "$agents_md" 2>/dev/null \
713
+ || grep -qF 'emit an <eagle-summary> block' "$agents_md" 2>/dev/null \
714
+ || grep -qF 'explicitly include them in the `<eagle-summary>` block' "$agents_md" 2>/dev/null \
715
+ || grep -qF 'explicitly include them in the <eagle-summary> block' "$agents_md" 2>/dev/null \
716
+ || ! grep -qF 'Keep Codex final answers clean' "$agents_md" 2>/dev/null; then
717
+ local tmp_md
718
+ tmp_md=$(mktemp)
719
+ awk -v marker="$marker" '
720
+ $0 ~ marker { skip=1; next }
721
+ skip && /^---$/ { skip=0; next }
722
+ skip && /^## / { skip=0 }
723
+ !skip { print }
724
+ ' "$agents_md" > "$tmp_md"
725
+ mv "$tmp_md" "$agents_md"
726
+ _eagle_codex_agents_section >> "$agents_md"
727
+ return 0
728
+ fi
732
729
  if ! grep -qF 'eagle-mem orchestrate' "$agents_md" 2>/dev/null; then
733
730
  local tmp_md
734
731
  tmp_md=$(mktemp)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eagle-mem",
3
- "version": "4.8.1",
3
+ "version": "4.8.3",
4
4
  "description": "Shared memory, release guardrails, RTK token protection, and worker lanes for Claude Code and Codex",
5
5
  "bin": {
6
6
  "eagle-mem": "bin/eagle-mem"
@@ -328,7 +328,7 @@ fi
328
328
 
329
329
  if [ "$codex_found" = true ]; then
330
330
  if eagle_patch_codex_agents_md; then
331
- eagle_ok "AGENTS.md ${DIM}(Codex eagle-summary instructions added)${RESET}"
331
+ eagle_ok "AGENTS.md ${DIM}(Codex clean-output memory instructions added)${RESET}"
332
332
  else
333
333
  eagle_ok "AGENTS.md ${DIM}(already has Eagle Mem section)${RESET}"
334
334
  fi
@@ -301,7 +301,7 @@ Rules:
301
301
  - If blocked, run: eagle-mem orchestrate lane --project "$project" --name "$name" block "$lane_key" --notes "<concrete blocker>"
302
302
  - If you finish manually before the wrapper updates status, run: eagle-mem orchestrate lane --project "$project" --name "$name" complete "$lane_key" --notes "<validation result>"
303
303
  - Run the validation command when one is provided and it is safe for the lane.
304
- - Before final response, emit an <eagle-summary> with request, completed, learned, decisions, gotchas, next_steps, key_files, files_read, files_modified, affected_features, verified_features, and regression_risks.
304
+ - Keep user-facing final responses clean. Claude Code workers may emit an Eagle Mem summary block when their UI handles it cleanly; Codex workers should not print XML, JSON, or internal capture blocks unless the user explicitly asks. Eagle Mem Stop hooks capture Codex summaries from the transcript automatically.
305
305
  PROMPT
306
306
  }
307
307
 
package/scripts/update.sh CHANGED
@@ -162,7 +162,7 @@ fi
162
162
 
163
163
  if [ "$codex_found" = true ]; then
164
164
  if eagle_patch_codex_agents_md; then
165
- eagle_ok "AGENTS.md updated ${DIM}(Codex eagle-summary instructions added)${RESET}"
165
+ eagle_ok "AGENTS.md updated ${DIM}(Codex clean-output memory instructions updated)${RESET}"
166
166
  else
167
167
  eagle_ok "AGENTS.md up to date"
168
168
  fi
@@ -68,7 +68,7 @@ eagle-mem memories tasks show <file_path>
68
68
 
69
69
  Two paths feed the mirror:
70
70
 
71
- **Real-time hooks.** Claude Code memory/plan/task files are mirrored when written. Codex sessions are captured through SessionStart/UserPromptSubmit/PostToolUse/Stop hooks, and important durable facts should be placed in `<eagle-summary>` so they become shared recall.
71
+ **Real-time hooks.** Claude Code memory/plan/task files are mirrored when written. Codex sessions are captured through SessionStart/UserPromptSubmit/PostToolUse/Stop hooks. In Codex, keep user-facing replies clean and put important durable facts in normal prose; Eagle Mem extracts them from the transcript.
72
72
 
73
73
  **Backfill (sync command).** For memories, plans, and tasks that existed before Eagle Mem was installed, or that were written outside a hooked session:
74
74
  ```bash
@@ -129,8 +129,10 @@ ending a broad session.
129
129
  - Every lane should have a validation command when one is obvious.
130
130
  - If a lane is blocked, update the lane with a concrete note rather than
131
131
  silently stopping.
132
- - After completing a lane, emit an `<eagle-summary>` so Eagle Mem captures the
133
- decision and files touched.
132
+ - After completing a lane, keep the user-facing final response clean. Claude Code
133
+ may use the Eagle Mem summary block when that UI handles it cleanly; Codex
134
+ should record durable decisions in normal prose and let the Stop hook capture
135
+ the transcript.
134
136
 
135
137
  ## Reference
136
138
 
@@ -66,7 +66,7 @@ Mark the current task in progress (`TaskUpdate(in_progress)` in Claude Code, or
66
66
 
67
67
  ### 4. Complete — record what happened
68
68
 
69
- Mark the task completed (`TaskUpdate(completed)` in Claude Code, or `eagle-mem tasks complete <id> --agent codex` in Codex). Emit `<eagle-summary>` so Eagle Mem captures what was accomplished.
69
+ Mark the task completed (`TaskUpdate(completed)` in Claude Code, or `eagle-mem tasks complete <id> --agent codex` in Codex). In Claude Code, use the Eagle Mem summary block when that UI handles it cleanly. In Codex, keep the final reply clean and record durable decisions in normal prose; Eagle Mem captures the transcript automatically.
70
70
 
71
71
  If the task produced decisions that downstream tasks need, update those task descriptions now:
72
72
  ```