Live Playwright driver feeding the computer-use recorder (closes #4)#8
Merged
Merged
Conversation
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.
🛫 Volo reliability — ❌ NO-SHIPReplayed 7 adversarial scenarios against the agent (threshold ≥ 0.90).
Cost — replayed deterministically at $0 (no live API calls). baseline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PlaywrightDriverwraps a PlaywrightPage: eachnavigate/click/typeperforms the action on the real browser, hashes the screen before and after, and records anActionEvent. The resulting recording replays deterministically offline viaComputerUseReplayServer, flagging any (action, screen) it never saw.PageProtocol (screenshot/goto/click/fill) — the driver never importsplaywrightat the core, so a real page drives it in production and a fake page drives it in CI with no browser.playwrightis 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 pullplaywright. computeruse suite 12 passed; full suite 532 passed, mypy clean, ruff clean.Docs updated with a live-driver usage snippet. Refs ADR-0034.