Skip to content

Live Playwright driver feeding the computer-use recorder (closes #4)#8

Merged
abhay-codes07 merged 1 commit into
mainfrom
feat/computeruse-playwright-driver
Jul 12, 2026
Merged

Live Playwright driver feeding the computer-use recorder (closes #4)#8
abhay-codes07 merged 1 commit into
mainfrom
feat/computeruse-playwright-driver

Conversation

@abhay-codes07

Copy link
Copy Markdown
Owner

Closes #4.

Adds the live driver for computer-use record/replay (M31) — the analog of the MCP stdio adapter, the piece that was missing after the transport-free core.

What

  • PlaywrightDriver wraps a Playwright Page: each navigate / click / type performs the action on the real browser, hashes the screen before and after, and records an ActionEvent. The resulting recording replays deterministically offline via ComputerUseReplayServer, flagging any (action, screen) it never saw.
  • Duck-typed over a Page Protocol (screenshot/goto/click/fill) — the driver never imports playwright at the core, so a real page drives it in production and a fake page drives it in CI with no browser. playwright is an optional extra (volo-computeruse[playwright]).

Tests

4 new, no browser needed: actions recorded as cu.<kind> events, the pre-action screen is the recorded state, a full record -> replay roundtrip (every recorded step replays; an unseen screen flags), and a guard that importing the driver doesn't pull playwright. computeruse suite 12 passed; full suite 532 passed, mypy clean, ruff clean.

Docs updated with a live-driver usage snippet. Refs ADR-0034.

Adds PlaywrightDriver — the live transport for computer-use recording (M31),
the analog of the MCP stdio adapter. It wraps a Playwright Page, performs each
action (navigate/click/type) on the real browser, hashes the screen before and
after, and records an ActionEvent; the recording then replays deterministically
offline via ComputerUseReplayServer, flagging any (action, screen) it never saw.

The driver is duck-typed over a Page Protocol (screenshot/goto/click/fill) and
never imports playwright at the core, so a real page drives it in production and
a fake page drives it in CI with no browser. playwright is an optional extra
(volo-computeruse[playwright]). 4 tests (record-as-events, before-screen is the
pre-action state, full record->replay roundtrip + flag-on-unseen, no-import
guard). Closes #4.
Copilot AI review requested due to automatic review settings July 12, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

🛫 Volo reliability — ❌ NO-SHIP

Replayed 7 adversarial scenarios against the agent (threshold ≥ 0.90).

Metric Score
Trajectory determinism 1.000
Decision determinism 1.000
Faithfulness 0.000
Consistency under repetition 1.000

Cost — replayed deterministically at $0 (no live API calls).

baseline 1783871807410-c3a7d3a9-c515-4608-8d8a-4d8d5641832c • generated by Volo

@abhay-codes07 abhay-codes07 merged commit 6b9e8ea into main Jul 12, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live computer-use driver (Playwright) feeding the recorder

2 participants