eagle-mem 1.4.4 → 1.4.5
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 +103 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
```
|
|
2
|
+
.~~~~-.
|
|
3
|
+
/ ,__`)
|
|
4
|
+
| \o/|'-.
|
|
5
|
+
| / ,\
|
|
6
|
+
| ('--./
|
|
7
|
+
/ \
|
|
8
|
+
/ , , , \
|
|
9
|
+
`--'--'--'--'
|
|
10
|
+
|
|
2
11
|
███████╗░█████╗░░██████╗░██╗░░░░░███████╗ ███╗░░░███╗███████╗███╗░░░███╗
|
|
3
12
|
██╔════╝██╔══██╗██╔════╝░██║░░░░░██╔════╝ ████╗░████║██╔════╝████╗░████║
|
|
4
13
|
█████╗░░███████║██║░░██╗░██║░░░░░█████╗░░ ██╔████╔██║█████╗░░██╔████╔██║
|
|
@@ -23,45 +32,62 @@ eagle-mem install
|
|
|
23
32
|
The installer checks prerequisites and offers to install missing ones:
|
|
24
33
|
|
|
25
34
|
```
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
.~~~~-.
|
|
36
|
+
/ ,__`)
|
|
37
|
+
| \o/|'-.
|
|
38
|
+
| / ,\
|
|
39
|
+
| ('--./
|
|
40
|
+
/ \
|
|
41
|
+
/ , , , \
|
|
42
|
+
`--'--'--'--'
|
|
43
|
+
|
|
44
|
+
Eagle Mem Install
|
|
45
|
+
─────────────────────────────────────
|
|
28
46
|
|
|
29
|
-
Checking prerequisites...
|
|
47
|
+
Checking prerequisites...
|
|
30
48
|
|
|
31
|
-
✓ sqlite3 (3.39.5)
|
|
32
|
-
✓ FTS5 support
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
→ Running: brew install jq
|
|
36
|
-
✓ jq installed (1.7.1)
|
|
37
|
-
✓ Claude Code (~/.claude/)
|
|
49
|
+
✓ sqlite3 (3.39.5)
|
|
50
|
+
✓ FTS5 support
|
|
51
|
+
✓ jq (1.7.1)
|
|
52
|
+
✓ Claude Code (~/.claude/)
|
|
38
53
|
|
|
39
|
-
Installing Eagle Mem...
|
|
54
|
+
Installing Eagle Mem...
|
|
40
55
|
|
|
41
|
-
✓ Files copied to ~/.eagle-mem
|
|
42
|
-
✓ Database ready
|
|
43
|
-
✓
|
|
44
|
-
✓
|
|
45
|
-
✓ PostToolUse hook
|
|
46
|
-
✓ SessionEnd hook
|
|
47
|
-
✓ UserPromptSubmit hook
|
|
48
|
-
✓ Skill: eagle-mem-overview
|
|
49
|
-
✓ Skill: eagle-mem-search
|
|
50
|
-
✓ Skill: eagle-mem-tasks
|
|
56
|
+
✓ Files copied to ~/.eagle-mem
|
|
57
|
+
✓ Database ready
|
|
58
|
+
✓ Hooks registered
|
|
59
|
+
✓ Skills installed
|
|
51
60
|
|
|
52
|
-
Eagle Mem installed successfully.
|
|
61
|
+
Eagle Mem installed successfully.
|
|
53
62
|
```
|
|
54
63
|
|
|
55
|
-
Start a new Claude Code session — Eagle Mem activates automatically
|
|
64
|
+
Start a new Claude Code session — Eagle Mem activates automatically and shows:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.~~~~-.
|
|
68
|
+
/ ,__`)
|
|
69
|
+
| \o/|'-. Eagle Mem loaded
|
|
70
|
+
| / ,\ Project: my-app
|
|
71
|
+
| ('--./ Sessions: 5 recent | Memories: 3 | Tasks: 2 pending
|
|
72
|
+
/ \ Last: Added auth middleware with JWT validation
|
|
73
|
+
/ , , , \
|
|
74
|
+
`--'--'--'--'
|
|
75
|
+
```
|
|
56
76
|
|
|
57
77
|
## Commands
|
|
58
78
|
|
|
59
79
|
| Command | What it does |
|
|
60
80
|
|---------|-------------|
|
|
61
81
|
| `eagle-mem install` | First-time setup: checks prerequisites, deploys hooks, creates database, installs skills |
|
|
62
|
-
| `eagle-mem update` | Re-deploys hooks/lib files
|
|
82
|
+
| `eagle-mem update` | Re-deploys hooks/lib files, runs pending migrations, backfills project names |
|
|
63
83
|
| `eagle-mem scan .` | Analyze a project and generate an overview (auto-injected at session start) |
|
|
64
84
|
| `eagle-mem index .` | Index source files into FTS5-searchable chunks (incremental via mtime) |
|
|
85
|
+
| `eagle-mem search <query>` | Full-text search across summaries, observations, and code chunks |
|
|
86
|
+
| `eagle-mem tasks` | List, filter, and manage tasks from the TaskAware Compact Loop |
|
|
87
|
+
| `eagle-mem overview` | View or regenerate project overviews |
|
|
88
|
+
| `eagle-mem memories` | List, search, and sync Claude Code auto-memories, plans, and tasks |
|
|
89
|
+
| `eagle-mem memories sync` | Backfill all Claude Code memories, plans, and tasks into Eagle Mem |
|
|
90
|
+
| `eagle-mem prune` | Clean up orphan code chunks and stale data |
|
|
65
91
|
| `eagle-mem uninstall` | Removes hooks from settings.json and optionally deletes data |
|
|
66
92
|
| `eagle-mem help` | Shows usage, commands, and available skills |
|
|
67
93
|
| `eagle-mem version` | Shows current version |
|
|
@@ -71,6 +97,9 @@ Start a new Claude Code session — Eagle Mem activates automatically.
|
|
|
71
97
|
Claude Code sessions lose context on `/compact` and between sessions. Eagle Mem solves this with:
|
|
72
98
|
|
|
73
99
|
- **Automatic session summaries** saved to a shared SQLite database
|
|
100
|
+
- **Claude Code memory mirror** — mirrors Claude's auto-memories, plans, and tasks into Eagle Mem's SQLite + FTS5
|
|
101
|
+
- **Session-start injection** — project overview, recent summaries, memories, plans, and in-progress tasks surfaced automatically
|
|
102
|
+
- **Compact-safe reload** — full context re-injects after compaction with trigger awareness
|
|
74
103
|
- **TaskAware Compact Loop** for breaking complex work into subtasks that survive compaction
|
|
75
104
|
- **FTS5 full-text search** across all sessions and projects
|
|
76
105
|
- **Contextual memory injection** — relevant past sessions surfaced when you ask related questions
|
|
@@ -80,6 +109,7 @@ Claude Code sessions lose context on `/compact` and between sessions. Eagle Mem
|
|
|
80
109
|
- **Concurrent-safe** WAL mode with busy timeout — runs fine across 4-5 simultaneous sessions
|
|
81
110
|
- **Codebase scanning** — auto-generates project overviews from structure analysis
|
|
82
111
|
- **Code indexing** — FTS5-searchable source chunks with incremental re-indexing
|
|
112
|
+
- **Stale data filtering** — noisy auto-captured summaries and 7-day-old tasks are excluded from injection
|
|
83
113
|
|
|
84
114
|
## How It Works
|
|
85
115
|
|
|
@@ -87,11 +117,31 @@ Claude Code sessions lose context on `/compact` and between sessions. Eagle Mem
|
|
|
87
117
|
|
|
88
118
|
| Hook | Fires When | What It Does |
|
|
89
119
|
|------|-----------|--------------|
|
|
90
|
-
| **SessionStart** | startup, resume, clear, compact | Queries DB for project overview, recent summaries, and
|
|
91
|
-
| **UserPromptSubmit** | user sends a message | Searches FTS5 for memories relevant to the user's prompt. Injects matching context. |
|
|
120
|
+
| **SessionStart** | startup, resume, clear, compact | Queries DB for project overview, recent summaries, memories, plans, and in-progress tasks. Injects context via stdout. Shows trigger type (startup/compact/clear/resume). |
|
|
121
|
+
| **UserPromptSubmit** | user sends a message | Searches FTS5 for memories relevant to the user's prompt. Injects matching context with ASCII eagle branding. |
|
|
92
122
|
| **Stop** | Claude's turn ends | Parses `<eagle-summary>` from transcript (strips `<private>` tags first). Heuristic fallback extracts user prompt + file paths. Saves summary to DB. |
|
|
93
|
-
| **PostToolUse** | after Read/Write/Edit/Bash | Captures lightweight observations with deduplication (5-second window). |
|
|
94
|
-
| **SessionEnd** | session closes |
|
|
123
|
+
| **PostToolUse** | after Read/Write/Edit/Bash/TaskCreate/TaskUpdate | Captures lightweight observations with deduplication (5-second window). Mirrors Claude Code auto-memory, plan, and task writes. |
|
|
124
|
+
| **SessionEnd** | session closes | Re-syncs all task files from `~/.claude/tasks/` to catch status changes, then marks session as completed. |
|
|
125
|
+
|
|
126
|
+
### Claude Code Memory Mirror
|
|
127
|
+
|
|
128
|
+
Eagle Mem intercepts Claude Code's built-in memory, plan, and task writes via the PostToolUse hook:
|
|
129
|
+
|
|
130
|
+
- **Memories** — when Claude writes to `~/.claude/projects/*/memory/*.md`, Eagle Mem mirrors the content with FTS5 indexing
|
|
131
|
+
- **Plans** — when Claude writes to `~/.claude/plans/*.md`, Eagle Mem captures the plan
|
|
132
|
+
- **Tasks** — when Claude calls `TaskCreate` or `TaskUpdate`, Eagle Mem captures the task JSON
|
|
133
|
+
|
|
134
|
+
These are injected at session start (top 5 memories, top 3 plans, in-progress tasks) and can be searched via CLI:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
eagle-mem memories # list all mirrored memories
|
|
138
|
+
eagle-mem memories search "auth" # full-text search
|
|
139
|
+
eagle-mem memories plans # list captured plans
|
|
140
|
+
eagle-mem memories tasks # list captured tasks
|
|
141
|
+
eagle-mem memories sync # backfill everything from Claude Code
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Task resync:** At session end, Eagle Mem re-reads all task JSON files to catch status changes that bypassed the PostToolUse hook (Claude Code can update tasks internally without tool calls).
|
|
95
145
|
|
|
96
146
|
### Summary Extraction
|
|
97
147
|
|
|
@@ -147,6 +197,9 @@ Single shared SQLite database at `~/.eagle-mem/memory.db` with a `project` colum
|
|
|
147
197
|
- **tasks** — Subtasks for the TaskAware Compact Loop with FTS5 search
|
|
148
198
|
- **overviews** — One rolling overview per project (injected at session start)
|
|
149
199
|
- **code_chunks** — FTS5-indexed source file chunks for code-level search
|
|
200
|
+
- **claude_memories** — Mirror of Claude Code auto-memories with FTS5 search
|
|
201
|
+
- **claude_plans** — Mirror of Claude Code plan files with FTS5 search
|
|
202
|
+
- **claude_tasks** — Mirror of Claude Code task JSON files with FTS5 search
|
|
150
203
|
|
|
151
204
|
### Key Design Choices
|
|
152
205
|
|
|
@@ -154,6 +207,8 @@ Single shared SQLite database at `~/.eagle-mem/memory.db` with a `project` colum
|
|
|
154
207
|
- **busy_timeout=5000** to retry on write contention instead of failing
|
|
155
208
|
- **FTS5 content-sync** with auto-triggers to keep search indexes in sync
|
|
156
209
|
- **trusted_schema=ON** required for FTS5 virtual tables
|
|
210
|
+
- **Project identification** via `git rev-parse --show-toplevel` (handles monorepo subdirectories correctly)
|
|
211
|
+
- **Backfill system** resolves project names from Claude Code transcript files at `~/.claude/projects/`
|
|
157
212
|
- PRAGMAs set on every connection (they're connection-scoped, not persistent)
|
|
158
213
|
|
|
159
214
|
## Skills
|
|
@@ -176,17 +231,24 @@ Package (npm) Runtime (~/.eagle-mem/)
|
|
|
176
231
|
│ ├── update.sh │ ├── stop.sh
|
|
177
232
|
│ ├── scan.sh │ ├── post-tool-use.sh
|
|
178
233
|
│ ├── index.sh │ └── session-end.sh
|
|
179
|
-
│
|
|
180
|
-
├──
|
|
181
|
-
├──
|
|
182
|
-
│ ├──
|
|
183
|
-
│
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
│ ├──
|
|
188
|
-
│ └──
|
|
234
|
+
│ ├── search.sh ├── lib/
|
|
235
|
+
│ ├── tasks.sh │ ├── common.sh
|
|
236
|
+
│ ├── overview.sh │ └── db.sh
|
|
237
|
+
│ ├── memories.sh └── db/
|
|
238
|
+
│ ├── prune.sh ├── migrate.sh
|
|
239
|
+
│ └── help.sh ├── schema.sql
|
|
240
|
+
├── hooks/ Source ├── 002_overviews.sql
|
|
241
|
+
├── lib/ Source ├── 003_code_chunks.sql
|
|
242
|
+
│ ├── common.sh ├── 004_observation_indexes.sql
|
|
243
|
+
│ └── db.sh ├── 005_claude_memories.sql
|
|
244
|
+
├── db/ Source ├── 006_claude_plans.sql
|
|
245
|
+
│ ├── migrate.sh └── 007_claude_tasks.sql
|
|
246
|
+
│ ├── schema.sql
|
|
247
|
+
│ └── migrations
|
|
189
248
|
└── skills/ Symlinked → ~/.claude/skills/
|
|
249
|
+
├── eagle-mem-search/
|
|
250
|
+
├── eagle-mem-tasks/
|
|
251
|
+
└── eagle-mem-overview/
|
|
190
252
|
```
|
|
191
253
|
|
|
192
254
|
## Uninstall
|
|
@@ -212,9 +274,10 @@ npm uninstall -g eagle-mem
|
|
|
212
274
|
## Roadmap
|
|
213
275
|
|
|
214
276
|
- [ ] **v2**: sqlite-vec embeddings for semantic code search
|
|
215
|
-
- [ ] Integration into [Eagle Skills](https://github.com/eagleisbatman/eagle-skills)
|
|
216
277
|
- [ ] Timeline report skill (narrative project history from pure SQL)
|
|
217
|
-
- [
|
|
278
|
+
- [x] ~~Claude Code memory/plan/task mirror~~
|
|
279
|
+
- [x] ~~ASCII eagle branding across hooks and CLI~~
|
|
280
|
+
- [x] ~~Compact-safe context reload~~
|
|
218
281
|
|
|
219
282
|
## License
|
|
220
283
|
|