1. LOCKED SCREEN. With CGSSessionScreenIsLocked=Yes, every AppleScript window/tab query hangs ~2 min and returns -1712 "AppleEvent timed out". This is NOT a browser bug — with m3ultra locked, `count of windows` hung identically for Chrome, Brave, Finder AND System Events, while app-level properties (name/version/running) answered instantly. launch.sh now checks the lock first and exits 0 with an instruction, so the 10-min tick retries instead of leaving two osascript processes wedged. 2. `open location "$URL"` is Standard Additions: it hands the URL to the DEFAULT browser, never to $BROWSER. m3ultra's default is Brave while the extension lives in Chrome, so the fresh-open path would have opened the wrong browser entirely. Now makes the tab inside the target app. 3. Wrapped the tell block in `with timeout of 30 seconds` so a wedged app can't hold the job. Verified: detector reports unlocked on ultra / LOCKED on m3ultra; after the fix m3ultra logs the instruction and exits with no hung osascript, ultra still logs "focused on Flow". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| banks | ||
| .gitignore | ||
| background.js | ||
| content.js | ||
| flowclient.py | ||
| games.monsterrobot.flowrinse.plist | ||
| install.sh | ||
| launch.sh | ||
| local_server_example.py | ||
| manifest.json | ||
| popup.css | ||
| popup.html | ||
| popup.js | ||
| queue.jsonl | ||
| README.md | ||
| requeue.py | ||
| test_prompt_echo.mjs | ||
Flow Auto-Pilot
A Brave extension + local queue that drains a prompt bank through Google Labs Flow (Nano Banana 2 images, Veo videos) on the webui-only credits you can't reach via API. The extension types prompts into the Flow agent box with trusted CDP input (Flow ignores synthetic DOM events), waits for the media grid to grow, harvests the new asset URLs, and downloads them with the page's session cookies.
Not headless: Brave must be running and logged into the Flow account. But once the tab is open with Auto-start ticked, it runs unattended.
Parts
| File | Role |
|---|---|
manifest.json, background.js, content.js, popup.* |
the Brave MV3 extension |
local_server_example.py |
queue server on :8017 — queue.jsonl in, results.jsonl out |
queue.jsonl |
the prompt bank (one task per line) |
flowclient.py |
enqueue() / wait_for() so a game project can request assets |
launch.sh |
start server + keep Mac awake + open/focus one Flow tab |
install.sh + games.monsterrobot.flowrinse.plist |
self-healing launchd agent |
Run it by hand
./launch.sh https://labs.google/fx/tools/flow/project/<PROJECT_ID>
Server comes up (under caffeinate), Brave focuses the Flow tab, and with
Auto-start ticked the rinse begins. Files land in
~/Downloads/flowrinse/<category>/.
Run it unattended (launchd)
./install.sh
Fires launch.sh at login and every 10 min. Because launch.sh is idempotent
(port check + tab reuse), the repeat runs are no-ops that self-heal a dead
server or a closed tab.
macOS TCC gotcha (same as the vault-backup job): launchd can't execute
scripts inside ~/Documents, so install.sh runs a copy at
~/Library/Application Support/flowrinse/. That copy owns the live
queue.jsonl / results.jsonl / downloads/ once the agent is running.
Re-run ./install.sh after editing launch.sh or local_server_example.py
to resync the copy. First run pops one Automation prompt (allow control of
Brave) — click Allow on the rig's screen.
launchctl kickstart -k gui/$(id -u)/games.monsterrobot.flowrinse # run now
launchctl bootout gui/$(id -u)/games.monsterrobot.flowrinse # stop it
Enqueue from another project
from flowclient import enqueue
enqueue("Sierra EGA record-store back room, 160x168, 16-color",
kind="image", category="morp2_bg")
Or over the wire: POST http://localhost:8017/enqueue with
{"prompt","kind","model","category","dest"}.