eagle-mem 4.8.3 → 4.8.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 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.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.
14
+ **v4.8.5 hardens first-run setup:** `eagle-mem config init` now falls through cleanly when Ollama is not running, and DB-backed commands fail loudly when the active `sqlite3` lacks FTS5 support.
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.5 Patch
153
+
154
+ First-run configuration no longer exits silently when Ollama is not listening on `localhost:11434`; Eagle Mem falls through to the installed Codex/Claude CLI provider or API-key providers. SQLite/FTS5 failures are now surfaced before DB-backed commands run, including the exact `sqlite3` binary being used and PATH guidance for common macOS Android SDK shadowing. Worker worktree paths are also canonicalized back to the main project key so backfill cannot move feature guardrails into disposable orchestration worktrees.
155
+
156
+ ### v4.8.4 Patch
157
+
158
+ The orchestration handoff path is now Bash 3.2-safe, so `eagle-mem orchestrate handoff` works even when no lane options are present. This patch was verified with a real Codex coordinator -> Claude Code worker proof lane using `claude-opus-4-7` at `xhigh`; the completed lane is visible through `eagle-mem orchestrate --json`, `eagle-mem tasks completed`, and the generated handoff output. Release-boundary detection also ignores Eagle Mem's own `feature verify`/`waive` commands, so verification notes can mention dry-run checks without blocking themselves.
159
+
152
160
  ### v4.8.3 Patch
153
161
 
154
162
  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.
package/db/migrate.sh CHANGED
@@ -9,6 +9,20 @@ EAGLE_MEM_DIR="${EAGLE_MEM_DIR:-$HOME/.eagle-mem}"
9
9
  DB="$EAGLE_MEM_DIR/memory.db"
10
10
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
11
11
 
12
+ COMMON_SH="$SCRIPT_DIR/../lib/common.sh"
13
+ if [ -f "$COMMON_SH" ]; then
14
+ . "$COMMON_SH"
15
+ eagle_require_sqlite_fts5 || exit 1
16
+ else
17
+ sqlite_path=$(command -v sqlite3 2>/dev/null || true)
18
+ if [ -z "$sqlite_path" ] || ! sqlite3 :memory: "CREATE VIRTUAL TABLE eagle_mem_fts5_probe USING fts5(value);" >/dev/null 2>&1; then
19
+ echo "Eagle Mem requires SQLite FTS5, but the active sqlite3 does not support it." >&2
20
+ [ -n "$sqlite_path" ] && echo "Detected sqlite3: $sqlite_path" >&2
21
+ echo "Fix PATH so an FTS5-capable sqlite3 is first, then re-run the command." >&2
22
+ exit 1
23
+ fi
24
+ fi
25
+
12
26
  # Restrict permissions: DB and config contain session data and may contain
13
27
  # residual secrets despite redaction. Owner-only access (700 dir, 600 files).
14
28
  umask 077
package/lib/common.sh CHANGED
@@ -20,6 +20,47 @@ EAGLE_CODEX_SKILLS_DIR="${EAGLE_CODEX_SKILLS_DIR:-$EAGLE_CODEX_DIR/skills}"
20
20
  EAGLE_CODEX_MEMORIES_DIR="${EAGLE_CODEX_MEMORIES_DIR:-$EAGLE_CODEX_DIR/memories}"
21
21
  EAGLE_RAW_BASH_UNLOCK="${EAGLE_RAW_BASH_UNLOCK:-/tmp/eagle-mem-raw-bash-unlock}"
22
22
 
23
+ eagle_sqlite_path() {
24
+ command -v sqlite3 2>/dev/null || true
25
+ }
26
+
27
+ eagle_sqlite_version() {
28
+ sqlite3 --version 2>/dev/null | awk '{print $1}'
29
+ }
30
+
31
+ eagle_sqlite_supports_fts5() {
32
+ command -v sqlite3 >/dev/null 2>&1 || return 1
33
+ sqlite3 :memory: "CREATE VIRTUAL TABLE eagle_mem_fts5_probe USING fts5(value);" >/dev/null 2>&1
34
+ }
35
+
36
+ eagle_print_sqlite_fts5_error() {
37
+ local sqlite_path sqlite_version probe_error
38
+ sqlite_path=$(eagle_sqlite_path)
39
+ sqlite_version=$(eagle_sqlite_version)
40
+ probe_error=$(sqlite3 :memory: "CREATE VIRTUAL TABLE eagle_mem_fts5_probe USING fts5(value);" 2>&1 >/dev/null || true)
41
+
42
+ printf '%s\n' "Eagle Mem requires SQLite FTS5, but the active sqlite3 does not support it." >&2
43
+ if [ -n "$sqlite_path" ]; then
44
+ printf '%s\n' "Detected sqlite3: $sqlite_path" >&2
45
+ else
46
+ printf '%s\n' "Detected sqlite3: not found on PATH" >&2
47
+ fi
48
+ [ -n "$sqlite_version" ] && printf '%s\n' "SQLite version: $sqlite_version" >&2
49
+ [ -n "$probe_error" ] && printf '%s\n' "SQLite error: $probe_error" >&2
50
+ printf '%s\n' "Fix: put an FTS5-capable sqlite3 earlier in PATH, then re-run the command." >&2
51
+ printf '%s\n' "macOS: check 'command -v sqlite3'; /usr/bin/sqlite3 usually has FTS5. If Android SDK platform-tools is first, move it later in PATH." >&2
52
+ printf '%s\n' "Homebrew: install sqlite and prepend its bin directory, for example: export PATH=\"/opt/homebrew/opt/sqlite/bin:\$PATH\"" >&2
53
+ printf '%s\n' "Linux: install a sqlite3 package compiled with ENABLE_FTS5." >&2
54
+ }
55
+
56
+ eagle_require_sqlite_fts5() {
57
+ if eagle_sqlite_supports_fts5; then
58
+ return 0
59
+ fi
60
+ eagle_print_sqlite_fts5_error
61
+ return 1
62
+ }
63
+
23
64
  eagle_log() {
24
65
  local level="$1"
25
66
  shift
@@ -51,6 +92,23 @@ eagle_project_from_cwd() {
51
92
  "$HOME/Desktop"|"$HOME/Desktop/"*) echo ""; return ;;
52
93
  esac
53
94
 
95
+ # Eagle Mem worker lanes run in sibling git worktrees under
96
+ # <parent>/.eagle-worktrees/<repo>/<lane>. Keep their observations attached
97
+ # to the real project, not to the disposable worktree path.
98
+ case "$resolved" in
99
+ "$HOME"/*/.eagle-worktrees/*)
100
+ local worktree_parent worktree_tail worktree_repo worktree_project
101
+ worktree_parent="${resolved%%/.eagle-worktrees/*}"
102
+ worktree_tail="${resolved#"$worktree_parent/.eagle-worktrees/"}"
103
+ worktree_repo="${worktree_tail%%/*}"
104
+ worktree_project="$worktree_parent/$worktree_repo"
105
+ if [ -n "$worktree_repo" ] && [ -d "$worktree_project" ]; then
106
+ echo "${worktree_project#$HOME/}"
107
+ return
108
+ fi
109
+ ;;
110
+ esac
111
+
54
112
  local target_dir
55
113
  local git_root
56
114
  git_root=$(git -C "$cwd" rev-parse --show-toplevel 2>/dev/null)
@@ -378,6 +436,10 @@ eagle_is_release_boundary_command() {
378
436
  function has_dry_run_flag(line) {
379
437
  return line ~ /(^|[[:space:]])--dry-run([[:space:]]|$|=([Tt][Rr][Uu][Ee]|1|[Yy][Ee][Ss])([[:space:]]|$))/
380
438
  }
439
+ function is_eagle_feature_command(line) {
440
+ return line ~ /(^|[[:space:]])([^[:space:]]*\/)?eagle-mem[[:space:]]+feature[[:space:]]+(verify|waive|pending|list)([[:space:]]|$)/
441
+ }
442
+ is_eagle_feature_command($0) { next }
381
443
  /(^|[[:space:]])gh[[:space:]]+pr[[:space:]]+create([[:space:]]|$)/ ||
382
444
  /(^|[[:space:]])npm[[:space:]]+publish([[:space:]]|$)/ ||
383
445
  /(^|[[:space:]])pnpm[[:space:]]+publish([[:space:]]|$)/ ||
@@ -399,6 +461,10 @@ eagle_is_release_boundary_command() {
399
461
  function has_dry_run_flag(line) {
400
462
  return line ~ /(^|[[:space:]])--dry-run([[:space:]]|$|=([Tt][Rr][Uu][Ee]|1|[Yy][Ee][Ss])([[:space:]]|$))/
401
463
  }
464
+ function is_eagle_feature_command(line) {
465
+ return line ~ /(^|[[:space:]])([^[:space:]]*\/)?eagle-mem[[:space:]]+feature[[:space:]]+(verify|waive|pending|list)([[:space:]]|$)/
466
+ }
467
+ is_eagle_feature_command($0) { next }
402
468
  /(^|[[:space:]])git[[:space:]]+push([[:space:]]|$)/ {
403
469
  if (!has_dry_run_flag($0)) found = 1
404
470
  }
package/lib/db-core.sh CHANGED
@@ -57,6 +57,8 @@ eagle_db_json() {
57
57
  }
58
58
 
59
59
  eagle_ensure_db() {
60
+ eagle_require_sqlite_fts5 || return 1
61
+
60
62
  if [ ! -f "$EAGLE_MEM_DB" ]; then
61
63
  local script_dir
62
64
  script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../db" && pwd)"
package/lib/provider.sh CHANGED
@@ -124,10 +124,10 @@ eagle_config_init() {
124
124
  local ollama_model="mistral"
125
125
 
126
126
  local ollama_response
127
- ollama_response=$(eagle_detect_ollama "$ollama_url")
127
+ ollama_response=$(eagle_detect_ollama "$ollama_url" || true)
128
128
  if [ -n "$ollama_response" ]; then
129
129
  provider="ollama"
130
- model=$(eagle_ollama_best_model "$ollama_url")
130
+ model=$(eagle_ollama_best_model "$ollama_url" || true)
131
131
  ollama_model="$model"
132
132
  elif command -v codex &>/dev/null || command -v claude &>/dev/null; then
133
133
  provider="agent_cli"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eagle-mem",
3
- "version": "4.8.3",
3
+ "version": "4.8.5",
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"
@@ -81,12 +81,19 @@ fi
81
81
 
82
82
  # FTS5 support
83
83
  if command -v sqlite3 &>/dev/null; then
84
- if sqlite3 :memory: "SELECT sqlite_compileoption_used('ENABLE_FTS5');" 2>/dev/null | grep -q "1"; then
85
- eagle_ok "FTS5 support"
84
+ sqlite_path=$(eagle_sqlite_path)
85
+ if eagle_sqlite_supports_fts5; then
86
+ eagle_ok "FTS5 support ${DIM}($sqlite_path)${RESET}"
86
87
  else
87
88
  eagle_fail "SQLite was compiled without FTS5 support"
88
- eagle_dim "On macOS: brew install sqlite3 (system sqlite3 includes FTS5)"
89
- eagle_dim "On Linux: install libsqlite3-dev or rebuild with --enable-fts5"
89
+ eagle_dim "Detected sqlite3: $sqlite_path"
90
+ sqlite_version=$(eagle_sqlite_version)
91
+ [ -n "$sqlite_version" ] && eagle_dim "SQLite version: $sqlite_version"
92
+ eagle_dim "Run: command -v sqlite3"
93
+ eagle_dim "Fix PATH so an FTS5-capable sqlite3 is first."
94
+ eagle_dim "macOS: /usr/bin/sqlite3 usually has FTS5; move Android SDK platform-tools later if it shadows sqlite3."
95
+ eagle_dim "Homebrew: brew install sqlite, then prepend /opt/homebrew/opt/sqlite/bin or /usr/local/opt/sqlite/bin."
96
+ eagle_dim "Linux: install a sqlite3 package compiled with ENABLE_FTS5."
90
97
  prereqs_ok=false
91
98
  fi
92
99
  fi
@@ -452,7 +452,11 @@ parse_lane_options() {
452
452
  esac
453
453
  i=$((i + 1))
454
454
  done
455
- args=("${parsed[@]}")
455
+ if [ "${#parsed[@]}" -gt 0 ]; then
456
+ args=("${parsed[@]}")
457
+ else
458
+ args=()
459
+ fi
456
460
  }
457
461
 
458
462
  lane_add() {
@@ -758,7 +762,11 @@ parse_spawn_options() {
758
762
  esac
759
763
  i=$((i + 1))
760
764
  done
761
- args=("${parsed[@]}")
765
+ if [ "${#parsed[@]}" -gt 0 ]; then
766
+ args=("${parsed[@]}")
767
+ else
768
+ args=()
769
+ fi
762
770
  }
763
771
 
764
772
  orchestrate_worker_run_script() {