CDP Worker — turn this machine into a browser for AI Browser Agent
=====================================================================

What this is
-------------
A small standalone script that launches a real, visible Chrome window on
THIS machine and connects it to http://127.0.0.1:5050 so AI Browser Agent test runs
can drive a real browser here instead of a headless one on the server.
No account, no install beyond what's listed below — nothing in this ZIP
talks to anything except http://127.0.0.1:5050.

If you'd rather not do this by hand: you can hand this entire ZIP (unzipped)
to an AI coding assistant (e.g. Claude Code, ChatGPT, Cursor) and just say
"set this up and run it" — the steps below are simple enough for it to
follow directly.

Requirements
------------
- Python 3.9 or newer (https://python.org/downloads)
- Google Chrome installed (or it'll try to find/reuse a cached Chromium)

Setup
-----
1. Unzip this file anywhere.
2. Open a terminal in that folder.
3. Install the one dependency:

       pip install -r requirements.txt

4. Run the worker:

       python main.py --server http://127.0.0.1:5050 --secret S7-YLz50g20VI8xaKkiQaX41Eee-UMON5FSDaf7m9pE

That's it. Once it prints "Registered as ..." it will show up in the
AI Browser Agent dashboard's "Run on" dropdown at:

    http://127.0.0.1:5050/ai-browser-agent

Leave the terminal window (and the Chrome window it opens) running while
you want this machine available for test runs. Closing the terminal stops
it; just re-run the same command to reconnect. It will keep retrying
on its own if the connection drops, and reconnects automatically once
the network/server is back.

Optional flags
---------------
    --label "my-laptop"     Friendly name shown in the dashboard picker
                             (defaults to this computer's hostname)
    --chrome-path "C:\...\chrome.exe"
                             Point at a specific Chrome/Chromium install
                             if auto-detection doesn't find one
    --port 9333              Local Chrome remote-debugging port
    --whoami-port 9334       Local-only port used by the dashboard to
                             auto-detect "is a worker running on the
                             machine I'm viewing this page from"

Security note
--------------
The --secret value above is a shared credential for this specific
deployment — anyone who runs this worker with it can appear as a
CDP Worker in the dashboard. Don't post this ZIP or README publicly.
