Repository navigation
feat(collect_artifacts): collect from framework computer envs - #601
Draft
williamloo-scale wants to merge 1 commit into
Draft
williamloo-scale wants to merge 1 commit into
williamloo-scale wants to merge 1 commit into
Conversation
collect_artifacts with `env_id` only read from CUA desktop VMs (envs whose deploy stamps `cua_vm_sandbox_id`) and refused every other env. An env whose card serves computer-exec/v1 `run` (a framework `computer`) now takes the same path: `cua_bash` and `cua_get_file` are answered by commands run inside the computer as its session user, in ranges whose base64 fits the card's `max_output_bytes`, and truncated or timed-out output fails rather than uploading a partial file. CUA envs are unchanged. Base-path enumeration now uses `cd <base> && find . -type f | sed` instead of GNU-only `find -printf`, so it also works on macOS computers. Adds `inside.max_output_bytes`, and puts `inside.run`, `inside.read_file`, `inside.max_timeout_s` and `inside.max_output_bytes` on the plugin surface (USED), so plugins such as agentenv-cua can run and read inside a computer from a checked, stable location. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This branch has not been deployed
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.
Summary
Part of OSWorld initialize/evaluate parity for framework
computerenvs: CUA tasks retargeted at acomputerenv needcollect_artifactsto pull deliverables off the computer, and the hub's CUA regrade stages those collected files back in.collect_artifactswithenv_idset now accepts a deployed env whose card servesurn:agentenv:computer-exec/v1runand carries nocua_vm_sandbox_idmarker. On those envs the existingcua_bashandcua_get_filereads run inside the computer, as its session user, throughagent_env.env.envs.computer.utils.inside.run.max_output_bytes(1 MiB by default). The base64 of a range always fits, so files above that size stream in ranges. Output that computer-exec truncated or that timed out raises an error; it never becomes a partial upload.cd <base> && find . -type f | sed 's|^\./||'instead of GNU-only-printf). Output is the same on Linux, and it now also works on macOS computers.inside.max_output_bytes, and listsinside.run,inside.read_file,inside.max_timeout_sandinside.max_output_bytesincheck_plugin_api.pyUSED. That gives plugins (agentenv-cua'scua_initialize/cua_evaluateguest ops) a checked, stable import.Test plan
tst/unit/task_step/test_collect_artifacts.pyaddsTestComputerPath. A fake computer runs each command for real with/bin/sh, which covers single-shot reads, streaming in ranges under a 1 KiB cap, skipping absent files, base-path enumeration, refusing truncated output, and leaving CUA envs' read limits unchanged.ruff checkcheck_plugin_api.py --base origin/main: no break to the plugin surfacetst/unit/ packages/agentenv-protocol/tests/ -n auto --timeout=90) on macOS: 14341 passed, 67 skipped, 3 failed. The 3 failures (test_disk_recipe.py::test_a_windows_install_boots_its_iso_first…,test_docker_image_github_clone.py::test_a_token_signs_the_clone_in…[secrets|secret files]) fail the same way onorigin/mainwithout this change: macOS-host timeouts, unrelated to this PR.🤖 Generated with Claude Code