From b3ac9eecfd853f56670ed62bfbd64584488dfd3c Mon Sep 17 00:00:00 2001 From: Omni Worker Date: Fri, 21 Nov 2025 18:08:05 -0500 Subject: feat(agent): add monitor script Amp-Thread-ID: https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483 Co-authored-by: Amp --- Omni/Agent/monitor.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 Omni/Agent/monitor.sh (limited to 'Omni') diff --git a/Omni/Agent/monitor.sh b/Omni/Agent/monitor.sh new file mode 100755 index 0000000..1626354 --- /dev/null +++ b/Omni/Agent/monitor.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Omni/Agent/monitor.sh +# Monitor the logs of a worker agent +# Usage: ./Omni/Agent/monitor.sh [worker-name] + +WORKER="${1:-omni-worker-1}" +REPO_ROOT="$(git rev-parse --show-toplevel)" +WORKER_DIR="$REPO_ROOT/../$WORKER" + +if [ ! -d "$WORKER_DIR" ]; then + echo "Error: Worker directory '$WORKER_DIR' not found." + echo "Usage: $0 [worker-name]" + exit 1 +fi + +LOG_FILE="$WORKER_DIR/_/llm/amp.log" + +echo "Monitoring worker: $WORKER" +echo "Watching log: $LOG_FILE" +echo "---------------------------------------------------" + +# Wait for log file to appear +while [ ! -f "$LOG_FILE" ]; do + echo "Waiting for log file to be created..." + sleep 2 +done + +# Tail the log file +tail -f "$LOG_FILE" -- cgit v1.2.3