# robotsix-browser Interactive headless-browser / form-filling HTTP service for the robotsix fleet. The chat agent already has a read-only `render_url` tool (screenshot + accessibility tree). **robotsix-browser** goes further: it wraps **Playwright headless Chromium** behind a small, session-scoped HTTP API so an agent can *drive* a real browser — navigate, inspect, and fill web forms. > ⚠️ **HUMAN SUBMIT-GATE (hard rule).** This service **never auto-submits a > consequential form.** The final submit / confirm action is exposed as a > *separate* endpoint (`POST /sessions/{id}/submit`) that must be invoked > explicitly, so an operator can gate the consequential action > in-conversation. No other endpoint submits a form. See > [Human submit-gate](#human-submit-gate) below. ## Status / scope This repository is the **implementation home** for the interactive-browser capability. This first ticket bootstraps the deployable service: app skeleton, Dockerfile, CI, and tests. **Out of scope** (separate, dependent follow-on tickets): 1. Roster registration + chat-skill doc in `robotsix-central-deploy`. 2. 2FA handling / operator-pause-for-code. 3. The live OVH CS16584956 submission. Scoped Vaultwarden credential injection **is** implemented — see [Credential injection](#credential-injection-vaultwarden) below. Non-secret values to fill are still passed in by the caller (`type`, `select`, …). ## Running ```bash uv sync uv run playwright install --with-deps chromium uv run robotsix-browser # serves on 0.0.0.0:8000 ``` Or with Docker (installs Chromium into the image): ```bash docker build -t robotsix-browser . docker run -p 8000:8000 robotsix-browser ``` ### Configuration Configuration lives in a single JSON file located by the `ROBOTSIX_CONFIG_FILE` environment variable (default: `config/config.json`). There is **no** environment overlay — the file (plus model defaults) is the sole source of truth. Secrets use pydantic `SecretStr` and are masked in repr / logs. When any required `bw_*` value is blank the credential-fill endpoint responds `503` (not configured). Every field, its default and an example `config.json` are listed in the [configuration reference](docs/configuration.md). Bind location (`ROBOTSIX_BROWSER_HOST` / `ROBOTSIX_BROWSER_PORT`) is set via environment variables for uvicorn — these are **not** config values. ## Configuration changes **Rule:** When adding or changing a field on the `Settings` model in `src/robotsix_browser/config.py`, regenerate the committed `config/config.schema.json` **in the same commit** via: ```bash uv run python -c "from robotsix_browser.config import Settings; from robotsix_config import config_schema_json; open('config/config.schema.json','w').write(config_schema_json(Settings))" ``` The CI gate (`.github/workflows/ci.yml`) fails otherwise. ## API All interactions are **session-scoped**: each session is an isolated Playwright browser context (its own cookies / storage). | Method & path | Description | | --------------------------------- | -------------------------------------------------- | | `POST /sessions` | Open a new session, or reuse `session_id`. | | `DELETE /sessions/{id}` | Close a session. | | `POST /sessions/{id}/navigate` | Navigate to a URL (`http`/`https`/`data`/`about`). | | `GET /sessions/{id}/state` | ARIA accessibility tree + full-page screenshot. | | `POST /sessions/{id}/click` | Click by ARIA role (+ name) or CSS selector. Returns a clean `404` if nothing matches. | | `POST /sessions/{id}/type` | Fill a text field. | | `POST /sessions/{id}/select` | Choose a `