eagle-mem 4.6.2 → 4.7.0

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  # ═══════════════════════════════════════════════════════════
3
3
  # Eagle Mem — Install
4
- # Sets up hooks, database, and skills for Claude Code
4
+ # Sets up hooks, database, and skills for Claude Code and Codex
5
5
  # ═══════════════════════════════════════════════════════════
6
6
  set -euo pipefail
7
7
 
@@ -12,6 +12,7 @@ LIB_DIR="$SCRIPTS_DIR/../lib"
12
12
  . "$SCRIPTS_DIR/style.sh"
13
13
  . "$LIB_DIR/common.sh"
14
14
  . "$LIB_DIR/hooks.sh"
15
+ . "$LIB_DIR/codex-hooks.sh"
15
16
 
16
17
  SETTINGS="$EAGLE_SETTINGS"
17
18
 
@@ -110,15 +111,33 @@ else
110
111
  fi
111
112
  fi
112
113
 
113
- # Claude Code
114
+ # Claude Code / Codex
115
+ claude_found=false
116
+ codex_found=false
117
+
114
118
  if [ -d "$HOME/.claude" ]; then
115
119
  eagle_ok "Claude Code ${DIM}(~/.claude/)${RESET}"
116
120
  else
117
- eagle_fail "Claude Code not found (~/.claude/ does not exist)"
121
+ eagle_warn "Claude Code not found ${DIM}(~/.claude/ does not exist)${RESET}"
122
+ fi
123
+
124
+ if [ -d "$HOME/.claude" ]; then
125
+ claude_found=true
126
+ fi
127
+
128
+ if [ -d "$EAGLE_CODEX_DIR" ] || command -v codex &>/dev/null; then
129
+ codex_found=true
130
+ eagle_ok "Codex ${DIM}($EAGLE_CODEX_DIR/)${RESET}"
131
+ else
132
+ eagle_warn "Codex not found ${DIM}(~/.codex/ missing and codex not on PATH)${RESET}"
133
+ fi
134
+
135
+ if [ "$claude_found" = false ] && [ "$codex_found" = false ]; then
136
+ eagle_fail "No supported agent install found"
118
137
  echo ""
119
- eagle_dim "Install Claude Code first:"
138
+ eagle_dim "Install Claude Code or Codex first, then re-run:"
120
139
  eagle_dim " npm install -g @anthropic-ai/claude-code"
121
- eagle_dim " https://docs.anthropic.com/en/docs/claude-code"
140
+ eagle_dim " npm install -g @openai/codex"
122
141
  echo ""
123
142
  exit 1
124
143
  fi
@@ -160,57 +179,67 @@ eagle_ok "Database ready"
160
179
 
161
180
  # ─── Patch settings.json ───────────────────────────────────
162
181
 
163
- if [ ! -f "$SETTINGS" ]; then
164
- echo '{}' > "$SETTINGS"
165
- fi
182
+ if [ "$claude_found" = true ]; then
183
+ if [ ! -f "$SETTINGS" ]; then
184
+ echo '{}' > "$SETTINGS"
185
+ fi
166
186
 
167
- eagle_patch_hook "$SETTINGS" "SessionStart" "" \
168
- "$EAGLE_MEM_DIR/hooks/session-start.sh" \
169
- "SessionStart hook"
187
+ eagle_patch_hook "$SETTINGS" "SessionStart" "" \
188
+ "$EAGLE_MEM_DIR/hooks/session-start.sh" \
189
+ "SessionStart hook"
170
190
 
171
- eagle_patch_hook "$SETTINGS" "Stop" "" \
172
- "$EAGLE_MEM_DIR/hooks/stop.sh" \
173
- "Stop hook"
191
+ eagle_patch_hook "$SETTINGS" "Stop" "" \
192
+ "$EAGLE_MEM_DIR/hooks/stop.sh" \
193
+ "Stop hook"
174
194
 
175
- eagle_patch_hook "$SETTINGS" "PostToolUse" "Read|Write|Edit|Bash|TaskCreate|TaskUpdate" \
176
- "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
177
- "PostToolUse hook"
195
+ eagle_patch_hook "$SETTINGS" "PostToolUse" "Read|Write|Edit|Bash|TaskCreate|TaskUpdate" \
196
+ "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
197
+ "PostToolUse hook"
178
198
 
179
- eagle_patch_hook "$SETTINGS" "TaskCreated" "" \
180
- "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
181
- "TaskCreated hook"
199
+ eagle_patch_hook "$SETTINGS" "TaskCreated" "" \
200
+ "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
201
+ "TaskCreated hook"
182
202
 
183
- eagle_patch_hook "$SETTINGS" "TaskCompleted" "" \
184
- "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
185
- "TaskCompleted hook"
203
+ eagle_patch_hook "$SETTINGS" "TaskCompleted" "" \
204
+ "$EAGLE_MEM_DIR/hooks/post-tool-use.sh" \
205
+ "TaskCompleted hook"
186
206
 
187
- eagle_patch_hook "$SETTINGS" "SessionEnd" "" \
188
- "$EAGLE_MEM_DIR/hooks/session-end.sh" \
189
- "SessionEnd hook"
207
+ eagle_patch_hook "$SETTINGS" "SessionEnd" "" \
208
+ "$EAGLE_MEM_DIR/hooks/session-end.sh" \
209
+ "SessionEnd hook"
190
210
 
191
- eagle_patch_hook "$SETTINGS" "UserPromptSubmit" "" \
192
- "$EAGLE_MEM_DIR/hooks/user-prompt-submit.sh" \
193
- "UserPromptSubmit hook"
211
+ eagle_patch_hook "$SETTINGS" "UserPromptSubmit" "" \
212
+ "$EAGLE_MEM_DIR/hooks/user-prompt-submit.sh" \
213
+ "UserPromptSubmit hook"
194
214
 
195
- eagle_patch_hook "$SETTINGS" "PreToolUse" "Bash" \
196
- "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
197
- "PreToolUse hook (Bash)"
215
+ eagle_patch_hook "$SETTINGS" "PreToolUse" "Bash" \
216
+ "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
217
+ "PreToolUse hook (Bash)"
198
218
 
199
- eagle_patch_hook "$SETTINGS" "PreToolUse" "Read" \
200
- "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
201
- "PreToolUse hook (Read)"
219
+ eagle_patch_hook "$SETTINGS" "PreToolUse" "Read" \
220
+ "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
221
+ "PreToolUse hook (Read)"
202
222
 
203
- eagle_patch_hook "$SETTINGS" "PreToolUse" "Edit" \
204
- "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
205
- "PreToolUse hook (Edit)"
223
+ eagle_patch_hook "$SETTINGS" "PreToolUse" "Edit" \
224
+ "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
225
+ "PreToolUse hook (Edit)"
226
+
227
+ eagle_patch_hook "$SETTINGS" "PreToolUse" "Write" \
228
+ "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
229
+ "PreToolUse hook (Write)"
230
+ else
231
+ eagle_info "Claude hooks skipped ${DIM}(Claude Code not detected)${RESET}"
232
+ fi
206
233
 
207
- eagle_patch_hook "$SETTINGS" "PreToolUse" "Write" \
208
- "$EAGLE_MEM_DIR/hooks/pre-tool-use.sh" \
209
- "PreToolUse hook (Write)"
234
+ if [ "$codex_found" = true ]; then
235
+ eagle_register_codex_hooks
236
+ else
237
+ eagle_info "Codex hooks skipped ${DIM}(Codex not detected)${RESET}"
238
+ fi
210
239
 
211
240
  # ─── Install skills ────────────────────────────────────────
212
241
 
213
- if [ -d "$PACKAGE_DIR/skills" ]; then
242
+ if [ "$claude_found" = true ] && [ -d "$PACKAGE_DIR/skills" ]; then
214
243
  mkdir -p "$EAGLE_SKILLS_DIR"
215
244
  for skill_dir in "$PACKAGE_DIR"/skills/*/; do
216
245
  [ ! -d "$skill_dir" ] && continue
@@ -224,42 +253,44 @@ fi
224
253
 
225
254
  # ─── Statusline integration ───────────────────────────────
226
255
 
227
- EM_STATUSLINE="$EAGLE_MEM_DIR/scripts/statusline-em.sh"
228
- existing_sl=$(jq -r '.statusLine.command // empty' "$SETTINGS" 2>/dev/null)
256
+ if [ "$claude_found" = true ]; then
257
+ EM_STATUSLINE="$EAGLE_MEM_DIR/scripts/statusline-em.sh"
258
+ existing_sl=$(jq -r '.statusLine.command // empty' "$SETTINGS" 2>/dev/null)
229
259
 
230
- if [ -z "$existing_sl" ]; then
231
- # No statusline configured — set up a minimal one that shows Eagle Mem
232
- wrapper="$EAGLE_MEM_DIR/scripts/statusline-wrapper.sh"
233
- cat > "$wrapper" << 'WRAPPER'
260
+ if [ -z "$existing_sl" ]; then
261
+ # No statusline configured — set up a minimal one that shows Eagle Mem
262
+ wrapper="$EAGLE_MEM_DIR/scripts/statusline-wrapper.sh"
263
+ cat > "$wrapper" << 'WRAPPER'
234
264
  #!/usr/bin/env bash
235
265
  input=$(cat)
236
266
  project_dir=$(echo "$input" | jq -r '.workspace.project_dir // .workspace.current_dir // .cwd // ""' 2>/dev/null)
237
267
  source "$HOME/.eagle-mem/scripts/statusline-em.sh"
238
268
  eagle_mem_statusline "$project_dir"
239
269
  WRAPPER
240
- chmod +x "$wrapper"
241
- tmp=$(mktemp)
242
- jq --arg cmd "sh $wrapper" '.statusLine = {"type": "command", "command": $cmd, "refreshInterval": 30}' "$SETTINGS" > "$tmp" && mv "$tmp" "$SETTINGS"
243
- eagle_ok "Statusline ${DIM}(new — Eagle Mem indicator)${RESET}"
244
- elif echo "$existing_sl" | grep -q "eagle-mem"; then
245
- eagle_ok "Statusline ${DIM}(already has Eagle Mem)${RESET}"
246
- else
247
- # Existing statusline — check if it's a .sh file we can patch
248
- sl_file=$(echo "$existing_sl" | sed 's/^sh //')
249
- if [ -f "$sl_file" ] && ! grep -q "eagle-mem" "$sl_file"; then
250
- eagle_dim " Statusline detected: $sl_file"
251
- eagle_dim " To add Eagle Mem, add this snippet before your ASSEMBLE section:"
252
- echo ""
253
- eagle_dim " # ── Eagle Mem ──"
254
- eagle_dim " em_section=\"\""
255
- eagle_dim " if [ -f \"\$HOME/.eagle-mem/scripts/statusline-em.sh\" ]; then"
256
- eagle_dim " source \"\$HOME/.eagle-mem/scripts/statusline-em.sh\""
257
- eagle_dim " em_section=\$(eagle_mem_statusline \"\$project_dir\")"
258
- eagle_dim " fi"
259
- echo ""
260
- eagle_ok "Statusline ${DIM}(manual patch needed — instructions above)${RESET}"
270
+ chmod +x "$wrapper"
271
+ tmp=$(mktemp)
272
+ jq --arg cmd "sh $wrapper" '.statusLine = {"type": "command", "command": $cmd, "refreshInterval": 30}' "$SETTINGS" > "$tmp" && mv "$tmp" "$SETTINGS"
273
+ eagle_ok "Statusline ${DIM}(new — Eagle Mem indicator)${RESET}"
274
+ elif echo "$existing_sl" | grep -q "eagle-mem"; then
275
+ eagle_ok "Statusline ${DIM}(already has Eagle Mem)${RESET}"
261
276
  else
262
- eagle_ok "Statusline ${DIM}(existingcannot auto-patch; add Eagle Mem manually)${RESET}"
277
+ # Existing statuslinecheck if it's a .sh file we can patch
278
+ sl_file=$(echo "$existing_sl" | sed 's/^sh //')
279
+ if [ -f "$sl_file" ] && ! grep -q "eagle-mem" "$sl_file"; then
280
+ eagle_dim " Statusline detected: $sl_file"
281
+ eagle_dim " To add Eagle Mem, add this snippet before your ASSEMBLE section:"
282
+ echo ""
283
+ eagle_dim " # ── Eagle Mem ──"
284
+ eagle_dim " em_section=\"\""
285
+ eagle_dim " if [ -f \"\$HOME/.eagle-mem/scripts/statusline-em.sh\" ]; then"
286
+ eagle_dim " source \"\$HOME/.eagle-mem/scripts/statusline-em.sh\""
287
+ eagle_dim " em_section=\$(eagle_mem_statusline \"\$project_dir\")"
288
+ eagle_dim " fi"
289
+ echo ""
290
+ eagle_ok "Statusline ${DIM}(manual patch needed — instructions above)${RESET}"
291
+ else
292
+ eagle_ok "Statusline ${DIM}(existing — cannot auto-patch; add Eagle Mem manually)${RESET}"
293
+ fi
263
294
  fi
264
295
  fi
265
296
 
@@ -275,10 +306,20 @@ fi
275
306
 
276
307
  # ─── Patch CLAUDE.md with Eagle Mem instructions ─────────
277
308
 
278
- if eagle_patch_claude_md; then
279
- eagle_ok "CLAUDE.md ${DIM}(eagle-summary instructions added)${RESET}"
280
- else
281
- eagle_ok "CLAUDE.md ${DIM}(already has Eagle Mem section)${RESET}"
309
+ if [ "$claude_found" = true ]; then
310
+ if eagle_patch_claude_md; then
311
+ eagle_ok "CLAUDE.md ${DIM}(eagle-summary instructions added)${RESET}"
312
+ else
313
+ eagle_ok "CLAUDE.md ${DIM}(already has Eagle Mem section)${RESET}"
314
+ fi
315
+ fi
316
+
317
+ if [ "$codex_found" = true ]; then
318
+ if eagle_patch_codex_agents_md; then
319
+ eagle_ok "AGENTS.md ${DIM}(Codex eagle-summary instructions added)${RESET}"
320
+ else
321
+ eagle_ok "AGENTS.md ${DIM}(already has Eagle Mem section)${RESET}"
322
+ fi
282
323
  fi
283
324
 
284
325
  # ─── Save installed version ───────────────────────────────
@@ -292,8 +333,9 @@ eagle_footer "Eagle Mem installed successfully."
292
333
 
293
334
  eagle_kv "Database:" "$EAGLE_MEM_DIR/memory.db"
294
335
  eagle_kv "Hooks:" "$EAGLE_MEM_DIR/hooks/"
295
- eagle_kv "Settings:" "$SETTINGS"
336
+ [ "$claude_found" = true ] && eagle_kv "Claude settings:" "$SETTINGS"
337
+ [ "$codex_found" = true ] && eagle_kv "Codex hooks:" "$EAGLE_CODEX_HOOKS"
296
338
 
297
339
  echo ""
298
- eagle_dim "Start a new Claude Code session — Eagle Mem will activate automatically."
340
+ eagle_dim "Start a new Claude Code or Codex session — Eagle Mem will activate automatically."
299
341
  echo ""
@@ -104,7 +104,7 @@ memories_list() {
104
104
  fi
105
105
 
106
106
  local count=0
107
- while IFS='|' read -r name mtype desc _fp updated; do
107
+ while IFS='|' read -r name mtype desc _fp updated origin_agent; do
108
108
  [ -z "$name" ] && continue
109
109
  count=$((count + 1))
110
110
 
@@ -116,7 +116,7 @@ memories_list() {
116
116
  reference) type_color="$BLUE" ;;
117
117
  esac
118
118
 
119
- echo -e " ${BOLD}${name}${RESET} ${type_color}[${mtype}]${RESET}"
119
+ echo -e " ${BOLD}${name}${RESET} ${type_color}[${mtype}]${RESET} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
120
120
  [ -n "$desc" ] && echo -e " ${DIM}${desc}${RESET}"
121
121
  echo -e " ${DIM}updated: ${updated}${RESET}"
122
122
  echo ""
@@ -146,7 +146,7 @@ memories_search() {
146
146
  fi
147
147
 
148
148
  local count=0
149
- while IFS='|' read -r name mtype desc content _fp updated; do
149
+ while IFS='|' read -r name mtype desc content _fp updated origin_agent; do
150
150
  [ -z "$name" ] && continue
151
151
  count=$((count + 1))
152
152
 
@@ -158,7 +158,7 @@ memories_search() {
158
158
  reference) type_color="$BLUE" ;;
159
159
  esac
160
160
 
161
- echo -e " ${BOLD}${name}${RESET} ${type_color}[${mtype}]${RESET}"
161
+ echo -e " ${BOLD}${name}${RESET} ${type_color}[${mtype}]${RESET} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
162
162
  [ -n "$desc" ] && echo -e " ${DIM}${desc}${RESET}"
163
163
  local snippet
164
164
  snippet=$(printf '%s' "$content" | head -c 200)
@@ -178,7 +178,7 @@ memories_show() {
178
178
  fi
179
179
 
180
180
  local meta
181
- meta=$(eagle_db "SELECT memory_name, memory_type, description, file_path, updated_at, origin_session_id
181
+ meta=$(eagle_db "SELECT memory_name, memory_type, description, file_path, updated_at, origin_session_id, origin_agent
182
182
  FROM claude_memories WHERE file_path = '$(eagle_sql_escape "$query")';")
183
183
 
184
184
  if [ -z "$meta" ]; then
@@ -186,7 +186,7 @@ memories_show() {
186
186
  exit 1
187
187
  fi
188
188
 
189
- IFS='|' read -r name mtype desc fp updated origin <<< "$meta"
189
+ IFS='|' read -r name mtype desc fp updated origin origin_agent <<< "$meta"
190
190
 
191
191
  eagle_header "Memory Detail"
192
192
 
@@ -194,6 +194,7 @@ memories_show() {
194
194
  eagle_kv "Type:" "$mtype"
195
195
  eagle_kv "File:" "$fp"
196
196
  eagle_kv "Updated:" "$updated"
197
+ eagle_kv "Source:" "$(eagle_agent_label "$origin_agent")"
197
198
  [ -n "$origin" ] && eagle_kv "Session:" "$origin"
198
199
  echo ""
199
200
 
@@ -227,14 +228,14 @@ plans_list() {
227
228
  fi
228
229
 
229
230
  local count=0
230
- while IFS='|' read -r title proj _fp updated; do
231
+ while IFS='|' read -r title proj _fp updated origin_agent; do
231
232
  [ -z "$title" ] && continue
232
233
  count=$((count + 1))
233
234
 
234
235
  local proj_label=""
235
236
  [ -n "$proj" ] && proj_label=" ${DIM}[${proj}]${RESET}"
236
237
 
237
- echo -e " ${BOLD}${title}${RESET}${proj_label}"
238
+ echo -e " ${BOLD}${title}${RESET}${proj_label} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
238
239
  echo -e " ${DIM}updated: ${updated}${RESET}"
239
240
  echo ""
240
241
  done <<< "$result"
@@ -263,14 +264,14 @@ plans_search() {
263
264
  fi
264
265
 
265
266
  local count=0
266
- while IFS='|' read -r title proj snippet _fp updated; do
267
+ while IFS='|' read -r title proj snippet _fp updated origin_agent; do
267
268
  [ -z "$title" ] && continue
268
269
  count=$((count + 1))
269
270
 
270
271
  local proj_label=""
271
272
  [ -n "$proj" ] && proj_label=" ${DIM}[${proj}]${RESET}"
272
273
 
273
- echo -e " ${BOLD}${title}${RESET}${proj_label}"
274
+ echo -e " ${BOLD}${title}${RESET}${proj_label} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
274
275
  [ -n "$snippet" ] && echo -e " ${snippet}"
275
276
  echo -e " ${DIM}updated: ${updated}${RESET}"
276
277
  echo ""
@@ -287,7 +288,7 @@ plans_show() {
287
288
  fi
288
289
 
289
290
  local meta
290
- meta=$(eagle_db "SELECT title, project, file_path, updated_at, origin_session_id
291
+ meta=$(eagle_db "SELECT title, project, file_path, updated_at, origin_session_id, origin_agent
291
292
  FROM claude_plans WHERE file_path = '$(eagle_sql_escape "$query")';")
292
293
 
293
294
  if [ -z "$meta" ]; then
@@ -295,7 +296,7 @@ plans_show() {
295
296
  exit 1
296
297
  fi
297
298
 
298
- IFS='|' read -r title proj fp updated origin <<< "$meta"
299
+ IFS='|' read -r title proj fp updated origin origin_agent <<< "$meta"
299
300
 
300
301
  eagle_header "Plan Detail"
301
302
 
@@ -303,6 +304,7 @@ plans_show() {
303
304
  [ -n "$proj" ] && eagle_kv "Project:" "$proj"
304
305
  eagle_kv "File:" "$fp"
305
306
  eagle_kv "Updated:" "$updated"
307
+ eagle_kv "Source:" "$(eagle_agent_label "$origin_agent")"
306
308
  [ -n "$origin" ] && eagle_kv "Session:" "$origin"
307
309
  echo ""
308
310
 
@@ -333,7 +335,7 @@ tasks_list() {
333
335
  fi
334
336
 
335
337
  local count=0
336
- while IFS='|' read -r subject status sid tid updated; do
338
+ while IFS='|' read -r subject status sid tid updated origin_agent; do
337
339
  [ -z "$subject" ] && continue
338
340
  count=$((count + 1))
339
341
 
@@ -344,7 +346,7 @@ tasks_list() {
344
346
  completed) status_color="$GREEN" ;;
345
347
  esac
346
348
 
347
- echo -e " ${BOLD}${subject}${RESET} ${status_color}[${status}]${RESET}"
349
+ echo -e " ${BOLD}${subject}${RESET} ${status_color}[${status}]${RESET} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
348
350
  echo -e " ${DIM}session: ${sid:0:8}… task: #${tid} updated: ${updated}${RESET}"
349
351
  echo ""
350
352
  done <<< "$result"
@@ -373,7 +375,7 @@ tasks_search() {
373
375
  fi
374
376
 
375
377
  local count=0
376
- while IFS='|' read -r subject status desc sid tid updated; do
378
+ while IFS='|' read -r subject status desc sid tid updated origin_agent; do
377
379
  [ -z "$subject" ] && continue
378
380
  count=$((count + 1))
379
381
 
@@ -384,7 +386,7 @@ tasks_search() {
384
386
  completed) status_color="$GREEN" ;;
385
387
  esac
386
388
 
387
- echo -e " ${BOLD}${subject}${RESET} ${status_color}[${status}]${RESET}"
389
+ echo -e " ${BOLD}${subject}${RESET} ${status_color}[${status}]${RESET} ${DIM}[$(eagle_agent_label "$origin_agent")]${RESET}"
388
390
  [ -n "$desc" ] && echo -e " ${desc}"
389
391
  echo -e " ${DIM}session: ${sid:0:8}… task: #${tid} updated: ${updated}${RESET}"
390
392
  echo ""
@@ -401,7 +403,7 @@ tasks_show() {
401
403
  fi
402
404
 
403
405
  local meta
404
- meta=$(eagle_db "SELECT subject, status, description, active_form, source_session_id, source_task_id, file_path, updated_at
406
+ meta=$(eagle_db "SELECT subject, status, description, active_form, source_session_id, source_task_id, file_path, updated_at, origin_agent
405
407
  FROM claude_tasks WHERE file_path = '$(eagle_sql_escape "$query")';")
406
408
 
407
409
  if [ -z "$meta" ]; then
@@ -409,7 +411,7 @@ tasks_show() {
409
411
  exit 1
410
412
  fi
411
413
 
412
- IFS='|' read -r subject status desc af sid tid fp updated <<< "$meta"
414
+ IFS='|' read -r subject status desc af sid tid fp updated origin_agent <<< "$meta"
413
415
 
414
416
  eagle_header "Task Detail"
415
417
 
@@ -419,6 +421,7 @@ tasks_show() {
419
421
  eagle_kv "Session:" "$sid"
420
422
  eagle_kv "File:" "$fp"
421
423
  eagle_kv "Updated:" "$updated"
424
+ eagle_kv "Source:" "$(eagle_agent_label "$origin_agent")"
422
425
  echo ""
423
426
 
424
427
  [ -n "$desc" ] && echo -e " ${BOLD}Description:${RESET} $desc" && echo ""