Repository navigation
feat(computer): add the reference driver and the conformance probe - #343
Merged
earakely-scale merged 11 commits intoOct 27, 2026
Conversation
…form ComputerDriverEnvironment.declaration(platform) builds the card the class serves on that platform, with default settings and under its own name, without running the subclass's __init__: what a computer_driver env records at put for each platform it supports. platform.supported(entry) gives the platforms a supports entry names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agentenv_protocol.computer.conformance checks a running driver against the contract through its card, tools and extensions only, and reports each of the driver design's checks P0 to P9 and each extension's own checks as passed, failed, unverified or not applicable, with each declared extension verified, unverified or failed. basic needs nothing on the computer; full stages the Linux fixture (the Fixture Desk, now with notes, a wheel pad, colour markers at odd and even pixels and a clipboard sentinel) with data/add, launches it with computer-exec and reads its state back with bounded waits. run_probe(url, level) returns a ProbeReport, the value M0.7 stores in metadata.validated_boot; python -m agentenv_protocol.computer.conformance prints it. The tests serve the fake driver on loopback with a fake fixture behind its input, drivers broken one way each fail the check for it, and stubs cover how a driver outside the base class can go wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A computer_driver env is a ComputerDriverEnvironment subclass with its files: env.toml names its class as module = "<file>:<class>", put stores the folder's files as a file_artifact_universe and records what the class declares for each platform its supports names (the card's name, the extensions it provides, its tools and its computer/v1 features). The class is read in a process of its own by agentenv_protocol.computer._declare, where a module that isn't installed imports as an inert stub, so a driver's own dependencies needn't be installed where it is put. The bundle ledger hashes the folder's files, so a driver is written again only when one changes. Deploying one is refused until agent-env can create a computer to deploy it in. Core now requires agentenv-framework-protocol[computer], which put reads the class with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent-env ships a drivers bundle with the reference driver, the X11 driver PR #336's example and end-to-end runs proved out, as the computer_driver env envs/reference, named reference by its aliases.toml. The example folder is removed: its fixture is the conformance probe's, and its offline test moves with the driver. A bundle that gives what it holds aliases and has nothing to run now passes the checks a run makes, as a library other bundles pull from; a run of it still says it has nothing to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h agent-env, probed at full The scaffold is a hand-written Ubuntu 24.04 image (Xvfb, the probe's Fixture Desk, tini as PID 1) that serves the reference driver as an MCP server on the server provider, until agent-env composes computers. agent-env run deploys it and an env_outcome_verifier runs the conformance probe at full three times; a second task has claude-code drive the desk through the computer_* tools and checks the desk's own record of what reached it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nv and the drivers bundle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests, and refuse one that takes too long to read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check wrote ~/inbox/message.txt for the Fixture Desk to pick up, so a probe left an inbox folder behind and would remove a user's own inbox/message.txt. The fixture now reads <state-dir>/inbox.txt, which goes with the stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n up a fixture that didn't start, and check tool access on a role of its own - Every point tool call names space "frame" unless it names another, so a driver whose default space is norm passes. - Staging runs inside the cleanup: a fixture that fails to start, or a staging step that raises, still has its folder removed, and the fixture is killed by the pid its launch reports, so one still starting after the timeout is stopped too. - The tool-access check hides a tool from a role new to each run, so it can't re-enable a tool a driver's deployment had disabled for agentenv-probe. The README says the probe calls as the default role. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and check a computer_driver env.toml in a dry run - _declare sends what the driver module prints while it loads to stderr, so stdout carries only the JSON put reads. - ComputerDriverEnv.accept_toml checks the keys and that module names a file of the folder, so a dry run and the bundle check refuse it before anything is written; from_toml reuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
End-to-end and chaos results at 2e38c6cEvery check here ran on a real X server.
On both, the image is the scaffold that Through agent-env (
The probe CLI against a running desktop:
PR 1's contract harness: 58/58 on both machines, against the reference driver as shipped in the drivers bundle. Chaos: 29/29 on both machines.
Fixed on this branch because of these runs
🤖 Generated with Claude Code |
earakely-scale
deleted the
edgararakelyan/fd-4353-m03-reference-driver-v01-on-computerdriverenvironment
branch
October 27, 2026 03:18
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.
PR 2 of the CUA env epic (FD-4345): M0.3, the reference driver (FD-4353), and M0.4, the conformance probe (FD-4354). It builds on the computer driver SDK from #336.
What's in it
ComputerDriverEnvironment.declaration(platform)(protocol). The card a driver class serves on a platform, built without running the driver.agentenv_protocol.computer.conformance).run_probe(url, level)andpython -m agentenv_protocol.computer.conformance <url>check a running driver through its card, tools and extensions. The report has each check and a verdict per declared extension.basicneeds nothing on the computer: P0 readiness, P1 the card, P2 native frames, P5 refusal codes, and each declared extension.fullalso stages the Fixture Desk, a Tk app, withdata/add, starts it withcomputer-execand reads back what reached it: P3 geometry, P4 click effects, P5 refusals change nothing, P6 keys, P7 scrolls and drags, P9 one unprivileged user, and the pointer, keyboard anddata/addgroups.computer_driverenv type (core,ComputerDriverEnv). Each env version stores the driver folder's files and what the class declares for each platform it supports.module = "<file>:<class>"inenv.tomlnames the class.putreads the class in a subprocess (agentenv_protocol.computer._declare), where any module that isn't installed becomes an inert stub. Putting the reference driver therefore needs no X11 libraries.driversbundle (core). It ships the reference driver as@local/agentenv-framework/drivers/reference, aliasedreference. This is PR 1's X11 example moved out ofexamples/, now named by@computer_driver(name="reference").tst/integration/computer/). A hand-written Ubuntu 24.04 image (Xvfb, the Fixture Desk, tini as PID 1) serves the reference driver as an MCP server on theserverprovider.agent-env rundeploys it.computer_*tools. It runs only where a model endpoint is configured.AGENTS.md.Where this differs from the design
check_bundlerefused any installed bundle without tasks or evals, so the shippeddriversbundle failed it. A bundle with neither is now accepted when itsaliases.tomlnames something for other bundles to use (bundle/plan.py).agent-env run driversstill says it has nothing to run.test(computer), so the protocol tests its own_declarein-process, andfix(protocol), which keeps the probe'sdata/addcheck inside its stage. Before that fix, a probe left~/inbox/behind and could delete a user's own~/inbox/message.txt.AGENTS.mdandsrc/agent_env/drivers/README.md, since the core README is now the front door and the user guide lives on the website.agentenv-framework-protocol[computer], becauseputimports the protocol's driver classes. Core already had mcp and uvicorn, so only Pillow is new.Testing
parse_test.py::TestFiles::test_deep_nesting[json]on my local Python 3.14 under xdist. It fails the same way onorigin/mainand passes alone; CI runs 3.12. Each commit was checked in a clean worktree: lint clean, and the unit tier gives the same result.conformance/checks.py,client.py,report.py,__init__.py,platform.pyandenv/envs/computer_driver.py: 100%._declare.py97% andconformance/__main__.py95%: the uncovered line in each is theif __name__ == "__main__"guard.driver.py: 99%. The uncovered line is PR 1's Linux exec default, which the e2e runs exercise.conformance/fixture.py: 0% in unit tests, because it runs inside the computer. The e2e runs below exercise it.tst/integration/computer/scaffold_test.pypasses both tests, the agent one with a model endpoint.End-to-end and chaos at 2e38c6c, all on real X servers:
agent-env run --task probe(scaffold_test.py, the probe at full three times)basicfull, three runsfull, driver set todefault_space = "norm"computer_*tools: one screenshot, five clicks, one type and one or two scrolls.🤖 Generated with Claude Code