[cua-bench] feat: implement computer provider for remote environment support
#845
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
Implement the
computerprovider type that was already documented but not functional. This enables running CUA-Bench tasks against remote Computer environments (e.g., remote macOS/Windows VMs via CUA Computer API).Motivation
The
provider_typeparameter already documented"computer"as a valid option:However, only
simulated/webtopwere actually implemented—computerwas ignored. This PR implements thecomputerprovider to connect to remote Computer API endpoints, aligning CUA-Bench with CUA's decoupled agent-environment architecture.Changes
1.
ProviderTypeEnumReplaces string-based checking with type-safe enum for all documented provider types.
2. Provider Resolution
Supports configuration via
--provider-typeargument orCUA_PROVIDERenv var.3. Pre-flight Validation
Fail fast with clear error when required config is missing.
4. Network Configuration
5. API URL Routing
6. Code Quality
Introduced
is_nativeflag to replace verbosenot is_simulated and not is_computerpatterns.Usage
Example: Remote Windows Environment
Provider Comparison
nativesimulatedcomputerBackward Compatibility
Fully backward compatible. Default behavior unchanged (
nativeif not specified).Test Plan
Tested:
computerprovider with remote Windows environment (http://34.186.160.160:8000)--provider-type computerargumentCUA_ENV_API_URL,CUA_ENV_TYPE)Not tested (unchanged logic):
nativeprovider - no changes to existing flowsimulatedprovider - only added to provider type checks, logic unchanged