aether-colony 3.1.16 → 3.1.17
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/.claude/commands/ant/archaeology.md +1 -1
- package/.claude/commands/ant/build.md +2 -2
- package/.claude/commands/ant/chaos.md +1 -1
- package/.claude/commands/ant/continue.md +1 -1
- package/.claude/commands/ant/council.md +1 -1
- package/.claude/commands/ant/init.md +1 -1
- package/.claude/commands/ant/lay-eggs.md +1 -1
- package/.claude/commands/ant/pause-colony.md +1 -1
- package/.claude/commands/ant/plan.md +1 -1
- package/.claude/commands/ant/resume-colony.md +1 -1
- package/.claude/commands/ant/seal.md +1 -1
- package/package.json +1 -1
- package/runtime/aether-utils.sh +271 -0
|
@@ -211,7 +211,7 @@ Synthesize findings into patterns:
|
|
|
211
211
|
arch_id="archaeology-$(date +%s)"
|
|
212
212
|
bash .aether/aether-utils.sh swarm-display-init "$arch_id"
|
|
213
213
|
bash .aether/aether-utils.sh swarm-display-update "Archaeologist" "archaeologist" "completed" "Excavation complete" "Colony" '{"read":10,"grep":3,"edit":0,"bash":5}' 100 "fungus_garden" 100
|
|
214
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
214
|
+
bash .aether/aether-utils.sh swarm-display-inline "$arch_id"
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
Display the full report:
|
|
@@ -528,7 +528,7 @@ bash .aether/aether-utils.sh context-update worker-complete "{ant_name}" "comple
|
|
|
528
528
|
**Visual Mode: Render live display (if enabled):**
|
|
529
529
|
If `visual_mode` is true, render the swarm display after all workers complete:
|
|
530
530
|
```bash
|
|
531
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
531
|
+
bash .aether/aether-utils.sh swarm-display-inline "$build_id"
|
|
532
532
|
```
|
|
533
533
|
|
|
534
534
|
### Step 5.3: Spawn Wave 2+ Workers (Sequential Waves)
|
|
@@ -933,7 +933,7 @@ Also update safe-to-clear status:
|
|
|
933
933
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase {id} complete" "Colony" '{"read":10,"grep":5,"edit":5,"bash":2}' 100 "fungus_garden" 100
|
|
934
934
|
|
|
935
935
|
# Render the final swarm display
|
|
936
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
936
|
+
bash .aether/aether-utils.sh swarm-display-inline "$build_id"
|
|
937
937
|
```
|
|
938
938
|
|
|
939
939
|
The swarm display will show:
|
|
@@ -225,7 +225,7 @@ For each scenario, produce a finding in this format. Display each to the termina
|
|
|
225
225
|
**If visual_mode is true, render final swarm display:**
|
|
226
226
|
```bash
|
|
227
227
|
bash .aether/aether-utils.sh swarm-display-update "Chaos Ant" "chaos" "completed" "Resilience test complete" "Colony" '{"read":8,"grep":4,"edit":0,"bash":3}' 100 "fungus_garden" 100
|
|
228
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
228
|
+
bash .aether/aether-utils.sh swarm-display-inline "$chaos_id"
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
After all 5 scenarios, compile the structured report:
|
|
@@ -983,7 +983,7 @@ Runs ONLY when all phases complete.
|
|
|
983
983
|
**If visual_mode is true, render final swarm display:**
|
|
984
984
|
```bash
|
|
985
985
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Phase advanced" "Colony" '{"read":5,"grep":2,"edit":3,"bash":2}' 100 "fungus_garden" 100
|
|
986
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
986
|
+
bash .aether/aether-utils.sh swarm-display-inline "$continue_id"
|
|
987
987
|
```
|
|
988
988
|
|
|
989
989
|
Output:
|
|
@@ -242,7 +242,7 @@ Keep max 100 events.
|
|
|
242
242
|
**If visual_mode is true, render final swarm display:**
|
|
243
243
|
```bash
|
|
244
244
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Council adjourned" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
245
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
245
|
+
bash .aether/aether-utils.sh swarm-display-inline "$council_id"
|
|
246
246
|
```
|
|
247
247
|
|
|
248
248
|
```
|
|
@@ -263,7 +263,7 @@ If either command fails, proceed silently. These are optional bookkeeping.
|
|
|
263
263
|
**If visual_mode is true, render final swarm display:**
|
|
264
264
|
```bash
|
|
265
265
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony initialized" "Colony" '{"read":5,"grep":2,"edit":3,"bash":2}' 100 "fungus_garden" 100
|
|
266
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
266
|
+
bash .aether/aether-utils.sh swarm-display-inline "$init_id"
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
Output this header:
|
|
@@ -123,7 +123,7 @@ Write `.aether/data/constraints.json`:
|
|
|
123
123
|
**If visual_mode is true, render final swarm display:**
|
|
124
124
|
```bash
|
|
125
125
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "First eggs laid" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "nursery" 100
|
|
126
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
126
|
+
bash .aether/aether-utils.sh swarm-display-inline "$layeggs_id"
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
```
|
|
@@ -194,7 +194,7 @@ bash .aether/aether-utils.sh context-update safe-to-clear "YES" "Colony paused
|
|
|
194
194
|
**If visual_mode is true, render final swarm display:**
|
|
195
195
|
```bash
|
|
196
196
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony paused" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
197
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
197
|
+
bash .aether/aether-utils.sh swarm-display-inline "$pause_id"
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
Output header:
|
|
@@ -454,7 +454,7 @@ bash .aether/aether-utils.sh session-update "/ant:plan" "/ant:build 1" "Plan gen
|
|
|
454
454
|
**If visual_mode is true, render final swarm display:**
|
|
455
455
|
```bash
|
|
456
456
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Plan generated" "Colony" '{"read":8,"grep":4,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
457
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
457
|
+
bash .aether/aether-utils.sh swarm-display-inline "$plan_id"
|
|
458
458
|
```
|
|
459
459
|
|
|
460
460
|
Read `plan.phases` from COLONY_STATE.json and display:
|
|
@@ -96,7 +96,7 @@ NEXT ACTIONS
|
|
|
96
96
|
**If visual_mode is true, render final swarm display:**
|
|
97
97
|
```bash
|
|
98
98
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony resumed" "Colony" '{"read":3,"grep":0,"edit":2,"bash":1}' 100 "fungus_garden" 100
|
|
99
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
99
|
+
bash .aether/aether-utils.sh swarm-display-inline "$resume_id"
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Route to next action based on state:
|
|
@@ -283,7 +283,7 @@ This handoff serves as the final record of the completed colony.
|
|
|
283
283
|
**If visual_mode is true, render final swarm display:**
|
|
284
284
|
```bash
|
|
285
285
|
bash .aether/aether-utils.sh swarm-display-update "Queen" "prime" "completed" "Colony sealed" "Colony" '{"read":3,"grep":0,"edit":2,"bash":3}' 100 "fungus_garden" 100
|
|
286
|
-
bash .aether/aether-utils.sh swarm-display-
|
|
286
|
+
bash .aether/aether-utils.sh swarm-display-inline "$seal_id"
|
|
287
287
|
```
|
|
288
288
|
|
|
289
289
|
Output:
|
package/package.json
CHANGED
package/runtime/aether-utils.sh
CHANGED
|
@@ -2426,6 +2426,277 @@ NODESCRIPT
|
|
|
2426
2426
|
fi
|
|
2427
2427
|
;;
|
|
2428
2428
|
|
|
2429
|
+
swarm-display-inline)
|
|
2430
|
+
# Inline swarm display for Claude Code (no loop, no clear)
|
|
2431
|
+
# Usage: swarm-display-inline [swarm_id]
|
|
2432
|
+
swarm_id="${1:-default-swarm}"
|
|
2433
|
+
display_file="$DATA_DIR/swarm-display.json"
|
|
2434
|
+
|
|
2435
|
+
# ANSI colors
|
|
2436
|
+
BLUE='\033[34m'
|
|
2437
|
+
GREEN='\033[32m'
|
|
2438
|
+
YELLOW='\033[33m'
|
|
2439
|
+
RED='\033[31m'
|
|
2440
|
+
MAGENTA='\033[35m'
|
|
2441
|
+
BOLD='\033[1m'
|
|
2442
|
+
DIM='\033[2m'
|
|
2443
|
+
RESET='\033[0m'
|
|
2444
|
+
|
|
2445
|
+
# Caste colors
|
|
2446
|
+
get_caste_color() {
|
|
2447
|
+
case "$1" in
|
|
2448
|
+
builder) echo "$BLUE" ;;
|
|
2449
|
+
watcher) echo "$GREEN" ;;
|
|
2450
|
+
scout) echo "$YELLOW" ;;
|
|
2451
|
+
chaos) echo "$RED" ;;
|
|
2452
|
+
prime) echo "$MAGENTA" ;;
|
|
2453
|
+
oracle) echo "$MAGENTA" ;;
|
|
2454
|
+
route_setter) echo "$MAGENTA" ;;
|
|
2455
|
+
*) echo "$RESET" ;;
|
|
2456
|
+
esac
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
# Caste emojis with ant
|
|
2460
|
+
get_caste_emoji() {
|
|
2461
|
+
case "$1" in
|
|
2462
|
+
builder) echo "🔨🐜" ;;
|
|
2463
|
+
watcher) echo "👁️🐜" ;;
|
|
2464
|
+
scout) echo "🔍🐜" ;;
|
|
2465
|
+
chaos) echo "🎲🐜" ;;
|
|
2466
|
+
prime) echo "👑🐜" ;;
|
|
2467
|
+
oracle) echo "🔮🐜" ;;
|
|
2468
|
+
route_setter) echo "🧭🐜" ;;
|
|
2469
|
+
archaeologist) echo "🏺🐜" ;;
|
|
2470
|
+
chronicler) echo "📝🐜" ;;
|
|
2471
|
+
gatekeeper) echo "📦🐜" ;;
|
|
2472
|
+
guardian) echo "🛡️🐜" ;;
|
|
2473
|
+
includer) echo "♿🐜" ;;
|
|
2474
|
+
keeper) echo "📚🐜" ;;
|
|
2475
|
+
measurer) echo "⚡🐜" ;;
|
|
2476
|
+
probe) echo "🧪🐜" ;;
|
|
2477
|
+
sage) echo "📜🐜" ;;
|
|
2478
|
+
tracker) echo "🐛🐜" ;;
|
|
2479
|
+
weaver) echo "🔄🐜" ;;
|
|
2480
|
+
colonizer) echo "🌱🐜" ;;
|
|
2481
|
+
dreamer) echo "💭🐜" ;;
|
|
2482
|
+
*) echo "🐜" ;;
|
|
2483
|
+
esac
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
# Status phrases
|
|
2487
|
+
get_status_phrase() {
|
|
2488
|
+
case "$1" in
|
|
2489
|
+
builder) echo "excavating..." ;;
|
|
2490
|
+
watcher) echo "observing..." ;;
|
|
2491
|
+
scout) echo "exploring..." ;;
|
|
2492
|
+
chaos) echo "testing..." ;;
|
|
2493
|
+
prime) echo "coordinating..." ;;
|
|
2494
|
+
oracle) echo "researching..." ;;
|
|
2495
|
+
route_setter) echo "planning..." ;;
|
|
2496
|
+
*) echo "working..." ;;
|
|
2497
|
+
esac
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
# Excavation phrase based on progress
|
|
2501
|
+
get_excavation_phrase() {
|
|
2502
|
+
local progress="${1:-0}"
|
|
2503
|
+
if [[ "$progress" -lt 25 ]]; then
|
|
2504
|
+
echo "🚧 Starting excavation..."
|
|
2505
|
+
elif [[ "$progress" -lt 50 ]]; then
|
|
2506
|
+
echo "⛏️ Digging deeper..."
|
|
2507
|
+
elif [[ "$progress" -lt 75 ]]; then
|
|
2508
|
+
echo "🪨 Moving earth..."
|
|
2509
|
+
elif [[ "$progress" -lt 100 ]]; then
|
|
2510
|
+
echo "🏗️ Almost there..."
|
|
2511
|
+
else
|
|
2512
|
+
echo "✅ Excavation complete!"
|
|
2513
|
+
fi
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
# Format tools: "📖5 🔍3 ✏️2 ⚡1"
|
|
2517
|
+
format_tools() {
|
|
2518
|
+
local read="${1:-0}"
|
|
2519
|
+
local grep="${2:-0}"
|
|
2520
|
+
local edit="${3:-0}"
|
|
2521
|
+
local bash="${4:-0}"
|
|
2522
|
+
local result=""
|
|
2523
|
+
[[ "$read" -gt 0 ]] && result="${result}📖${read} "
|
|
2524
|
+
[[ "$grep" -gt 0 ]] && result="${result}🔍${grep} "
|
|
2525
|
+
[[ "$edit" -gt 0 ]] && result="${result}✏️${edit} "
|
|
2526
|
+
[[ "$bash" -gt 0 ]] && result="${result}⚡${bash}"
|
|
2527
|
+
echo "$result"
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
# Render progress bar (green when working)
|
|
2531
|
+
render_progress_bar() {
|
|
2532
|
+
local percent="${1:-0}"
|
|
2533
|
+
local width="${2:-20}"
|
|
2534
|
+
[[ "$percent" -lt 0 ]] && percent=0
|
|
2535
|
+
[[ "$percent" -gt 100 ]] && percent=100
|
|
2536
|
+
local filled=$((percent * width / 100))
|
|
2537
|
+
local empty=$((width - filled))
|
|
2538
|
+
local bar=""
|
|
2539
|
+
for ((i=0; i<filled; i++)); do bar+="█"; done
|
|
2540
|
+
for ((i=0; i<empty; i++)); do bar+="░"; done
|
|
2541
|
+
echo -e "${GREEN}[$bar]${RESET} ${percent}%"
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
# Format duration
|
|
2545
|
+
format_duration() {
|
|
2546
|
+
local seconds="${1:-0}"
|
|
2547
|
+
if [[ "$seconds" -lt 60 ]]; then
|
|
2548
|
+
echo "${seconds}s"
|
|
2549
|
+
else
|
|
2550
|
+
local mins=$((seconds / 60))
|
|
2551
|
+
local secs=$((seconds % 60))
|
|
2552
|
+
echo "${mins}m${secs}s"
|
|
2553
|
+
fi
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
# Check for display file
|
|
2557
|
+
if [[ ! -f "$display_file" ]]; then
|
|
2558
|
+
echo -e "${DIM}🐜 No active swarm data${RESET}"
|
|
2559
|
+
json_ok '{"displayed":false,"reason":"no_data"}'
|
|
2560
|
+
exit 0
|
|
2561
|
+
fi
|
|
2562
|
+
|
|
2563
|
+
# Check for jq
|
|
2564
|
+
if ! command -v jq >/dev/null 2>&1; then
|
|
2565
|
+
echo -e "${DIM}🐜 Swarm active (jq not available for details)${RESET}"
|
|
2566
|
+
json_ok '{"displayed":true,"warning":"jq_missing"}'
|
|
2567
|
+
exit 0
|
|
2568
|
+
fi
|
|
2569
|
+
|
|
2570
|
+
# Read swarm data
|
|
2571
|
+
total_active=$(jq -r '.summary.total_active // 0' "$display_file" 2>/dev/null || echo "0")
|
|
2572
|
+
|
|
2573
|
+
if [[ "$total_active" -eq 0 ]]; then
|
|
2574
|
+
echo -e "${DIM}🐜 Colony idle${RESET}"
|
|
2575
|
+
json_ok '{"displayed":true,"ants":0}'
|
|
2576
|
+
exit 0
|
|
2577
|
+
fi
|
|
2578
|
+
|
|
2579
|
+
# Render header with ant logo
|
|
2580
|
+
echo ""
|
|
2581
|
+
cat << 'ANTLOGO'
|
|
2582
|
+
|
|
2583
|
+
|
|
2584
|
+
▁▐▖ ▁
|
|
2585
|
+
▗▇▇███▆▇▃▅████▆▇▆▅▟██▛▇
|
|
2586
|
+
▝▜▅▛██████████████▜▅██
|
|
2587
|
+
▁▂▀▇▆██▙▜██████████▛▟███▛▁▃▁
|
|
2588
|
+
▕▂▁▉▅████▙▞██████▜█▚▟████▅▊ ▐
|
|
2589
|
+
▗▁▐█▀▜████▛▃▝▁████▍▘▟▜████▛▀█▂ ▖
|
|
2590
|
+
▁▎▝█▁▝▍▆▜████▊▐▀▏▀▍▂▂▝▀▕▀▌█████▀▅▐▚ █▏▁▁
|
|
2591
|
+
▂▚▃▇▙█▟████▛▏ ▝▜▐▛▀▍▛▘ ▕█████▆▊▐▂▃▞▂▔
|
|
2592
|
+
▚▔█▛██████▙▟▍▜▍▜▃▃▖▟▛▐██████▛▛▜▔▔▞
|
|
2593
|
+
▋▖▍▊▖██████▇▃▁▝██▘▝▃████▜█▜ ▋▐▐▗
|
|
2594
|
+
▍▌▇█▅▂▜██████████████████▉▃▄▋▖ ▝
|
|
2595
|
+
▁▎▍▁▜▟███▀▀▜████████████▛▀▀███▆▂ ▁▁
|
|
2596
|
+
██ ▆▇▌▁▕▚▅▆███▛████████▜███▆▄▞▁▁▐▅▎ █▉
|
|
2597
|
+
▆█████▛▃▟█▀████████████████▛█▙▙▜▉▟▛▜█▌▗
|
|
2598
|
+
▅▆▋ ▁▁▁▔▕▁▁▁▇█████▛▀▀▀▁▜▇▇▁▁▁▁▁▁▁▁ ▐▊▗
|
|
2599
|
+
▗▆▃▃▃▔███▖▔██▀▀▝▀██▀▍█▛▁▐█▏█▛▀▀▏█▛▀▜█▆▃▃▆▖
|
|
2600
|
+
▝▗▖ ▟█▟█▙ █▛▀▘ █▊ ▕█▛▀▜█▏█▛▀▘ █▋▆█▛ ▗▖
|
|
2601
|
+
▘ ▘ ▟▛ ▝▀▘▀▀▀▀▘ ▀▀▂▂█▙▂▐▀▏▀▀▀▀▘▀▘ ▝▀▅▂▝ ▕▏
|
|
2602
|
+
▕▕ ▃▗▄▔▗▄▄▗▗▗▔▄▄▄▄▗▄▄▗▔▃▃▃▗▄▂▄▃▗▄▂▖▖ ▏▁
|
|
2603
|
+
▝▘▏ ▔▔ ▁▔▁▔▔▁▔▔▔▔▔▔▔▁▁ ▔▔ ▔▔▔▔
|
|
2604
|
+
▀ ▀▝▘▀▀▔▘▘▀▝▕▀▀▝▝▀▔▀ ▀▔▘
|
|
2605
|
+
▘ ▗▅▁▝▚▃▀▆▟██▙▆▝▃ ▘ ▁▗▌
|
|
2606
|
+
▔▀▔▝ ▔▀▟▜▛▛▀▔ ▀
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
ANTLOGO
|
|
2610
|
+
echo -e "${BOLD}AETHER COLONY :: Colony Activity${RESET}"
|
|
2611
|
+
echo -e "${DIM}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
2612
|
+
echo ""
|
|
2613
|
+
|
|
2614
|
+
# Render each active ant (limit to 5)
|
|
2615
|
+
jq -r '.active_ants[0:5][] | "\(.name)|\(.caste)|\(.status // "")|\(.task // "")|\(.tools.read // 0)|\(.tools.grep // 0)|\(.tools.edit // 0)|\(.tools.bash // 0)|\(.tokens // 0)|\(.started_at // "")|\(.parent // "Queen")|\(.progress // 0)"' "$display_file" 2>/dev/null | while IFS='|' read -r ant_name ant_caste ant_status ant_task read_ct grep_ct edit_ct bash_ct tokens started_at parent progress; do
|
|
2616
|
+
color=$(get_caste_color "$ant_caste")
|
|
2617
|
+
emoji=$(get_caste_emoji "$ant_caste")
|
|
2618
|
+
phrase=$(get_status_phrase "$ant_caste")
|
|
2619
|
+
|
|
2620
|
+
# Format tools
|
|
2621
|
+
tools_str=$(format_tools "$read_ct" "$grep_ct" "$edit_ct" "$bash_ct")
|
|
2622
|
+
|
|
2623
|
+
# Truncate task if too long
|
|
2624
|
+
display_task="$ant_task"
|
|
2625
|
+
[[ ${#display_task} -gt 35 ]] && display_task="${display_task:0:32}..."
|
|
2626
|
+
|
|
2627
|
+
# Calculate elapsed time
|
|
2628
|
+
elapsed_str=""
|
|
2629
|
+
started_ts="${started_at:-}"
|
|
2630
|
+
if [[ -n "$started_ts" ]] && [[ "$started_ts" != "null" ]]; then
|
|
2631
|
+
started_ts=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$started_ts" +%s 2>/dev/null)
|
|
2632
|
+
if [[ -z "$started_ts" ]] || [[ "$started_ts" == "null" ]]; then
|
|
2633
|
+
started_ts=$(date -d "$started_ts" +%s 2>/dev/null) || started_ts=0
|
|
2634
|
+
fi
|
|
2635
|
+
now_ts=$(date +%s)
|
|
2636
|
+
elapsed=0
|
|
2637
|
+
if [[ -n "$started_ts" ]] && [[ "$started_ts" -gt 0 ]] 2>/dev/null; then
|
|
2638
|
+
elapsed=$((now_ts - started_ts))
|
|
2639
|
+
fi
|
|
2640
|
+
if [[ ${elapsed:-0} -gt 0 ]]; then
|
|
2641
|
+
elapsed_str="($(format_duration $elapsed))"
|
|
2642
|
+
fi
|
|
2643
|
+
fi
|
|
2644
|
+
|
|
2645
|
+
# Token indicator
|
|
2646
|
+
token_str=""
|
|
2647
|
+
if [[ -n "$tokens" ]] && [[ "$tokens" -gt 0 ]]; then
|
|
2648
|
+
token_str="🍯${tokens}"
|
|
2649
|
+
fi
|
|
2650
|
+
|
|
2651
|
+
# Output ant line: "🐜 Builder: excavating... Implement auth 📖5 🔍3 (2m3s) 🍯1250"
|
|
2652
|
+
echo -e "${color}${emoji} ${BOLD}${ant_name}${RESET}${color}: ${phrase}${RESET} ${display_task}"
|
|
2653
|
+
echo -e " ${tools_str} ${DIM}${elapsed_str}${RESET} ${token_str}"
|
|
2654
|
+
|
|
2655
|
+
# Show progress bar if progress > 0
|
|
2656
|
+
if [[ -n "$progress" ]] && [[ "$progress" -gt 0 ]]; then
|
|
2657
|
+
progress_bar=$(render_progress_bar "$progress" 15)
|
|
2658
|
+
excavation_phrase=$(get_excavation_phrase "$progress")
|
|
2659
|
+
echo -e " ${DIM}${progress_bar}${RESET}"
|
|
2660
|
+
echo -e " ${DIM}${excavation_phrase}${RESET}"
|
|
2661
|
+
fi
|
|
2662
|
+
|
|
2663
|
+
echo ""
|
|
2664
|
+
done
|
|
2665
|
+
|
|
2666
|
+
# Chamber activity map
|
|
2667
|
+
echo -e "${DIM}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"
|
|
2668
|
+
echo ""
|
|
2669
|
+
echo -e "${BOLD}Chamber Activity:${RESET}"
|
|
2670
|
+
|
|
2671
|
+
# Show active chambers with fire intensity
|
|
2672
|
+
has_chamber_activity=0
|
|
2673
|
+
jq -r '.chambers | to_entries[] | "\(.key)|\(.value.activity)|\(.value.icon)"' "$display_file" 2>/dev/null | \
|
|
2674
|
+
while IFS='|' read -r chamber activity icon; do
|
|
2675
|
+
if [[ -n "$activity" ]] && [[ "$activity" -gt 0 ]]; then
|
|
2676
|
+
has_chamber_activity=1
|
|
2677
|
+
if [[ "$activity" -ge 5 ]]; then
|
|
2678
|
+
fires="🔥🔥🔥"
|
|
2679
|
+
elif [[ "$activity" -ge 3 ]]; then
|
|
2680
|
+
fires="🔥🔥"
|
|
2681
|
+
else
|
|
2682
|
+
fires="🔥"
|
|
2683
|
+
fi
|
|
2684
|
+
chamber_name="${chamber//_/ }"
|
|
2685
|
+
echo -e " ${icon} ${chamber_name} ${fires} (${activity} ants)"
|
|
2686
|
+
fi
|
|
2687
|
+
done
|
|
2688
|
+
|
|
2689
|
+
if [[ "$has_chamber_activity" -eq 0 ]]; then
|
|
2690
|
+
echo -e "${DIM} (no chamber activity)${RESET}"
|
|
2691
|
+
fi
|
|
2692
|
+
|
|
2693
|
+
# Summary
|
|
2694
|
+
echo ""
|
|
2695
|
+
echo -e "${DIM}${total_active} forager$([[ "$total_active" -eq 1 ]] || echo "s") excavating...${RESET}"
|
|
2696
|
+
|
|
2697
|
+
json_ok "{\"displayed\":true,\"ants\":$total_active}"
|
|
2698
|
+
;;
|
|
2699
|
+
|
|
2429
2700
|
swarm-timing-start)
|
|
2430
2701
|
# Record start time for an ant
|
|
2431
2702
|
# Usage: swarm-timing-start <ant_name>
|