eagle-mem 4.10.1 → 4.10.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/CHANGELOG.md +130 -0
- package/README.md +20 -99
- package/architecture.html +40 -19
- package/hooks/pre-tool-use.sh +2 -6
- package/integrations/__pycache__/google_antigravity_hook.cpython-314.pyc +0 -0
- package/integrations/google_antigravity_hook.py +416 -0
- package/lib/codex-hooks.sh +17 -0
- package/lib/common.sh +8 -1
- package/lib/hooks-posttool.sh +10 -0
- package/lib/hooks.sh +17 -0
- package/package.json +5 -3
- package/scripts/grok-bootstrap.sh +26 -4
- package/scripts/install.sh +9 -1
- package/scripts/memories.sh +79 -1
- package/scripts/session.sh +2 -1
- package/scripts/uninstall.sh +7 -0
package/scripts/memories.sh
CHANGED
|
@@ -636,7 +636,7 @@ memories_sync() {
|
|
|
636
636
|
|
|
637
637
|
if [ "$existing_hash" = "$new_hash" ] && { [ -z "$mem_project" ] || [ "$existing_project" = "$mem_project" ]; }; then
|
|
638
638
|
mem_skipped=$((mem_skipped + 1))
|
|
639
|
-
|
|
639
|
+
return 0
|
|
640
640
|
fi
|
|
641
641
|
|
|
642
642
|
eagle_capture_agent_memory "$memfile" "" "$mem_project" "claude-code"
|
|
@@ -762,6 +762,84 @@ EOF
|
|
|
762
762
|
eagle_kv "Tasks:" "$task_synced synced, $task_skipped unchanged"
|
|
763
763
|
echo ""
|
|
764
764
|
|
|
765
|
+
# ─── Sync brain planning artifacts ───────────────────
|
|
766
|
+
eagle_info "Scanning for agent brain planning artifacts..."
|
|
767
|
+
echo ""
|
|
768
|
+
|
|
769
|
+
local artifact_synced=0
|
|
770
|
+
local artifact_skipped=0
|
|
771
|
+
|
|
772
|
+
# Determine brain paths to scan
|
|
773
|
+
local brain_paths=(
|
|
774
|
+
"$HOME/.claude/brain"
|
|
775
|
+
"$HOME/.codex/brain"
|
|
776
|
+
"$HOME/.gemini/antigravity/brain"
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
for bdir in "${brain_paths[@]}"; do
|
|
780
|
+
[ ! -d "$bdir" ] && continue
|
|
781
|
+
|
|
782
|
+
# 1. Sync plans (implementation_plan.md)
|
|
783
|
+
while IFS= read -r -d '' planfile; do
|
|
784
|
+
[ ! -f "$planfile" ] && continue
|
|
785
|
+
|
|
786
|
+
local existing_hash
|
|
787
|
+
existing_hash=$(eagle_db "SELECT content_hash FROM agent_plans WHERE file_path = '$(eagle_sql_escape "$planfile")';")
|
|
788
|
+
local new_hash
|
|
789
|
+
new_hash=$(shasum -a 256 "$planfile" | awk '{print $1}')
|
|
790
|
+
|
|
791
|
+
if [ "$existing_hash" = "$new_hash" ]; then
|
|
792
|
+
artifact_skipped=$((artifact_skipped + 1))
|
|
793
|
+
continue
|
|
794
|
+
fi
|
|
795
|
+
|
|
796
|
+
# Determine agent name based on brain folder path
|
|
797
|
+
local origin_agent="claude-code"
|
|
798
|
+
[[ "$planfile" == *".codex"* ]] && origin_agent="codex"
|
|
799
|
+
[[ "$planfile" == *"antigravity"* ]] && origin_agent="antigravity"
|
|
800
|
+
|
|
801
|
+
local artifact_project="$project"
|
|
802
|
+
[ -z "$artifact_project" ] && artifact_project=$(eagle_project_from_cwd "$(pwd)")
|
|
803
|
+
|
|
804
|
+
eagle_capture_agent_plan "$planfile" "" "$artifact_project" "$origin_agent"
|
|
805
|
+
artifact_synced=$((artifact_synced + 1))
|
|
806
|
+
local ptitle
|
|
807
|
+
ptitle=$(awk '/^# /{print; exit}' "$planfile" | sed 's/^# //')
|
|
808
|
+
[ -z "$ptitle" ] && ptitle="Implementation Plan"
|
|
809
|
+
eagle_ok "Mirrored plan [$(eagle_agent_label "$origin_agent")]: $ptitle"
|
|
810
|
+
done < <(find "$bdir" -name "implementation_plan.md" -print0 2>/dev/null)
|
|
811
|
+
|
|
812
|
+
# 2. Sync tasks and walkthroughs (task.md, walkthrough.md)
|
|
813
|
+
while IFS= read -r -d '' memfile; do
|
|
814
|
+
[ ! -f "$memfile" ] && continue
|
|
815
|
+
|
|
816
|
+
local existing_hash
|
|
817
|
+
existing_hash=$(eagle_db "SELECT content_hash FROM agent_memories WHERE file_path = '$(eagle_sql_escape "$memfile")';")
|
|
818
|
+
local new_hash
|
|
819
|
+
new_hash=$(shasum -a 256 "$memfile" | awk '{print $1}')
|
|
820
|
+
|
|
821
|
+
if [ "$existing_hash" = "$new_hash" ]; then
|
|
822
|
+
artifact_skipped=$((artifact_skipped + 1))
|
|
823
|
+
continue
|
|
824
|
+
fi
|
|
825
|
+
|
|
826
|
+
# Determine agent name based on brain folder path
|
|
827
|
+
local origin_agent="claude-code"
|
|
828
|
+
[[ "$memfile" == *".codex"* ]] && origin_agent="codex"
|
|
829
|
+
[[ "$memfile" == *"antigravity"* ]] && origin_agent="antigravity"
|
|
830
|
+
|
|
831
|
+
local artifact_project="$project"
|
|
832
|
+
[ -z "$artifact_project" ] && artifact_project=$(eagle_project_from_cwd "$(pwd)")
|
|
833
|
+
|
|
834
|
+
eagle_capture_agent_memory "$memfile" "" "$artifact_project" "$origin_agent"
|
|
835
|
+
artifact_synced=$((artifact_synced + 1))
|
|
836
|
+
eagle_ok "Mirrored $(basename "$memfile") [$(eagle_agent_label "$origin_agent")]"
|
|
837
|
+
done < <(find "$bdir" \( -name "task.md" -o -name "walkthrough.md" \) -print0 2>/dev/null)
|
|
838
|
+
done
|
|
839
|
+
|
|
840
|
+
eagle_kv "Brain Artifacts:" "$artifact_synced synced, $artifact_skipped unchanged"
|
|
841
|
+
echo ""
|
|
842
|
+
|
|
765
843
|
# ─── Backfill project names ──────────────────────────
|
|
766
844
|
eagle_info "Resolving project names from agent transcripts..."
|
|
767
845
|
|
package/scripts/session.sh
CHANGED
|
@@ -164,8 +164,9 @@ save_session() {
|
|
|
164
164
|
case "$agent" in
|
|
165
165
|
codex|openai-codex) agent="codex" ;;
|
|
166
166
|
claude|claude-code|cloud-code) agent="claude-code" ;;
|
|
167
|
+
antigravity*|google-antigravity*|google_antigravity*) agent="antigravity" ;;
|
|
167
168
|
*)
|
|
168
|
-
eagle_err "--agent must be codex
|
|
169
|
+
eagle_err "--agent must be codex, claude-code, or antigravity"
|
|
169
170
|
exit 1
|
|
170
171
|
;;
|
|
171
172
|
esac
|
package/scripts/uninstall.sh
CHANGED
|
@@ -99,6 +99,13 @@ else
|
|
|
99
99
|
eagle_info "Statusline integration not present or not auto-removable"
|
|
100
100
|
fi
|
|
101
101
|
|
|
102
|
+
# ─── Remove integration files ─────────────────────────────
|
|
103
|
+
|
|
104
|
+
if [ -d "$EAGLE_MEM_DIR/integrations" ]; then
|
|
105
|
+
rm -rf "$EAGLE_MEM_DIR/integrations"
|
|
106
|
+
eagle_ok "Antigravity integration files removed"
|
|
107
|
+
fi
|
|
108
|
+
|
|
102
109
|
# ─── Remove skill symlinks ────────────────────────────────
|
|
103
110
|
|
|
104
111
|
if [ -d "$EAGLE_SKILLS_DIR" ]; then
|