From ea466775a6b12dce67b789aa98d2c40a9c913a97 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 24 Nov 2025 13:59:34 -0500 Subject: Simplify agent command I think the cd'ing and stuff was messing with the direnv assumptions. --- Omni/Agent/monitor.sh | 75 --------------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100755 Omni/Agent/monitor.sh (limited to 'Omni/Agent/monitor.sh') diff --git a/Omni/Agent/monitor.sh b/Omni/Agent/monitor.sh deleted file mode 100755 index e57611f..0000000 --- a/Omni/Agent/monitor.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash -# Omni/Agent/monitor.sh -# Monitor the logs of a worker agent -# Usage: ./Omni/Agent/monitor.sh [--raw] [worker-name] - -set -e - -RAW_MODE=false -WORKER="omni-worker-1" - -# Parse arguments -while [[ "$#" -gt 0 ]]; do - case $1 in - --raw) RAW_MODE=true ;; - *) WORKER="$1" ;; - esac - shift -done - -REPO_ROOT="$(git rev-parse --show-toplevel)" -WORKER_DIR="$REPO_ROOT/../$WORKER" -LOG_FILE="$WORKER_DIR/_/llm/amp.log" - -if [ ! -d "$WORKER_DIR" ]; then - echo "Error: Worker directory '$WORKER_DIR' not found." - echo "Usage: $0 [--raw] [worker-name]" - exit 1 -fi - -echo "Monitoring worker: $WORKER" -echo "Watching log: $LOG_FILE" -if [ "$RAW_MODE" = true ]; then - echo "Mode: RAW output" -else - echo "Mode: FORMATTED output" -fi -echo "---------------------------------------------------" - -# Wait for log file to appear -if [ ! -f "$LOG_FILE" ]; then - echo "Waiting for log file at $LOG_FILE..." - while [ ! -f "$LOG_FILE" ]; do - sleep 1 - done -fi - -if [ "$RAW_MODE" = true ]; then - tail -f "$LOG_FILE" -else - # Tail the log and use jq to parse/filter relevant events - tail -f "$LOG_FILE" | grep --line-buffered "^{" | jq -R -r ' - try ( - fromjson | - if .message == "executing 1 tools in 1 batch(es)" then - "🤖 THOUGHT: Planning tool execution (" + (.batches[0][0] // "unknown") + ")" - elif .message == "Tool Bash - checking permissions" then - empty - elif .message == "Tool Bash permitted - action: allow" then - "🔧 TOOL: Bash command executed" - elif .toolName != null and .message == "Processing tool completion for ledger" then - "✅ TOOL: " + .toolName + " completed" - elif .message == "ide-fs" and .method == "readFile" then - "📂 READ: " + .path - elif .message == "System prompt build complete (no changes)" then - "🧠 THINKING..." - elif .message == "System prompt build complete (first build)" then - "🚀 STARTING new task context" - elif .level == "error" then - "❌ ERROR: " + .message - else - empty - end - ) catch empty - ' -fi -- cgit v1.2.3