From b745c54c3e640b7b4648a03ee166b6f2bd584259 Mon Sep 17 00:00:00 2001 From: SirKentut <81878031+SirKentut@users.noreply.github.com> Date: Thu, 18 Jun 2026 02:24:13 -0700 Subject: [PATCH] [pierre] chore: add watch-moves.sh for human-readable App Agent action log --- backend/watch-moves.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 backend/watch-moves.sh diff --git a/backend/watch-moves.sh b/backend/watch-moves.sh new file mode 100644 index 00000000..ad3d7589 --- /dev/null +++ b/backend/watch-moves.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# watch-moves.sh: human-readable, moves-only view of the App Agent. +# Shows just the actions it takes (clicks, keypresses, waits), one per line, +# plus task-start and bridge-missing milestones. Hides all the dispatch/result/ +# electron echo noise. Usage: bash backend/watch-moves.sh [logfile] +LOG="${1:-/tmp/openswarm.log}" +tail -f "$LOG" | awk ' + { gsub(/\033\[[0-9;]*m/, "") } # strip color codes + match($0, /[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/) { t = substr($0, RSTART, 8) } + /\[app-agent\] START loop/ { print ""; print "=== " t " TASK START ==="; next } + /BRIDGE MISSING/ { print t " !! bridge missing: app is NOT agent-operable, driving UI blind"; next } + /\[browser-action\]/ { + sub(/.*\[browser-action\] [A-Za-z]+: /, "") # drop everything up to the action + sub(/ *-> .*/, "") # drop the trailing browser_id + print t " > " $0 + next + } +'