This PR addresses two issues:
1. **Fix version detection in pypi-publish-computer workflow**
- Updated to match the pattern from PR #598 for pypi-publish-agent
- Check inputs.version first (works for workflow_call regardless of event_name)
- Add debug output to help troubleshoot version detection issues
- Proper handling of all three trigger types: workflow_call, workflow_dispatch, push
2. **Publish both packages when bumping cua-computer**
- When bumping cua-computer, we bump both cua-computer and cua-agent versions
(since cua-agent depends on cua-computer: "cua-computer>=0.4.0,<0.5.0")
- Updated publish-agent job to trigger for both 'cua-agent' and 'cua-computer' services
- This ensures version consistency between the two packages
**Behavior:**
- When bumping `cua-agent`: publishes cua-agent only
- When bumping `cua-computer`: publishes BOTH cua-computer AND cua-agent
This maintains version consistency and ensures users can install the latest
versions of both packages together without dependency conflicts.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
When bumping cua-computer, the workflow was incorrectly publishing cua-agent
instead of cua-computer to PyPI. This was because the publish-agent job had a
condition that triggered for both cua-agent and cua-computer services.
Changes:
- Added computer_version output to capture the bumped computer version
- Changed publish-agent condition to only trigger for cua-agent service
- Added new publish-computer job that triggers for cua-computer service
- publish-computer job calls pypi-publish-computer.yml workflow
Now when bumping cua-computer:
- Bumps cua-computer version (as before)
- Also bumps cua-agent version to maintain dependency sync (as before)
- Publishes cua-computer to PyPI (fixed!)
- Does NOT publish cua-agent to PyPI (fixed!)
Fixes: https://github.com/trycua/cua/actions/runs/19512484987🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, users had to explicitly read the CUA_API_KEY environment variable
and pass it to the Computer/CloudProvider constructor. This change makes the
API key parameter optional and automatically reads from the CUA_API_KEY
environment variable if not provided.
Changes:
- CloudProvider.__init__: Made api_key parameter optional, reads from CUA_API_KEY env var
- Computer.__init__: Added fallback to CUA_API_KEY env var for api_key parameter
- Updated documentation examples to show simplified usage without explicit api_key
- Updated cloud_api_examples.py to demonstrate the new simpler pattern
This provides a cleaner API while maintaining backward compatibility with
explicit api_key parameter passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
hud-python is an external package that isn't published to PyPI yet,
which was blocking installation of cua-agent[all]. This change:
- Removes hud-python==0.4.52 from the [all] extra dependencies
- Keeps the separate [hud] extra for users who have access to hud-python
- Allows pip install cua-agent[all] to work without dependency errors
The hud functionality remains available as an opt-in extra via:
pip install cua-agent[hud]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Clean up all debug output added during investigation:
1. bump-version.yml:
- Removed "Verify agent version output" debug step
- Kept essential "Agent version: X.X.X" output
2. pypi-publish-agent.yml:
- Removed extensive "Version Determination Debug" output
- Simplified to show only "Agent version: X.X.X"
- Kept error messages for production debugging
- Removed "Verify prepare job outputs" debug step
3. pypi-reusable-publish.yml:
- Removed all debug output from "Verify version consistency"
- Kept the core version validation logic
- Script errors will still be visible if check fails
All workflows now have clean, production-ready logging while
maintaining the fixes from PR #598.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The bug: When pypi-publish-agent is called via workflow_call from
bump-version, github.event_name is "workflow_dispatch" (inherited
from parent), NOT "workflow_call". This caused the code to check
github.event.inputs.version (empty) instead of inputs.version (0.4.44).
The fix: Check inputs.version first, before checking event_name.
This works correctly for:
- workflow_call: uses inputs.version
- Tag push: extracts from tag
- workflow_dispatch with version param: uses inputs.version
- workflow_dispatch event UI: uses event.inputs.version
Debug output showed:
- Event name: workflow_dispatch
- Input version: 0.4.44 (correct!)
- Workflow dispatch version: (empty)
- Final VERSION= (bug - used wrong source)
Now it will use inputs.version first, giving VERSION=0.4.44.
Fixes: https://github.com/trycua/cua/actions/runs/19483269380🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added debug logging at every stage of version passing to identify
where the version parameter is being lost:
1. bump-version job: Verify agent_version output is set correctly
2. pypi-publish-agent prepare job: Show inputs.version and verify
the get-version step output
3. pypi-reusable-publish: Already has debug showing empty version
Debug output will show:
- Event name and workflow trigger type
- Input version values at each stage
- Step output values
- Final version passed to reusable workflow
This will pinpoint exactly where the version parameter becomes empty
in the workflow_call chain.
Related: Previous debug showed "Expected version: " (empty)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive debugging to diagnose why get_pyproject_version.py
is not receiving arguments correctly after git reset.
Changes:
- Added debug output showing current directory, GITHUB_WORKSPACE, and paths
- Changed pyproject.toml path to use absolute path with GITHUB_WORKSPACE
- Added ls commands to verify files exist before running script
- This will help identify if the git reset is affecting path resolution
The error shows the script's usage message, indicating arguments
aren't being passed correctly. The debug output will reveal why.
Related: https://github.com/trycua/cua/actions/runs/19482970320🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add explicit git fetch and reset after checkout to guarantee
workflows get the most recent main branch commits, including
version bumps pushed by the bump-version workflow.
The issue: When using workflow_call, even with ref: main, GitHub
Actions may use a cached repository state from workflow run start.
This caused version consistency checks to fail because the checkout
didn't include the just-pushed version bump.
Solution: After checkout, explicitly fetch and reset to origin/main
to ensure we have the absolute latest code. Added logging to show
the current commit for debugging.
Fixes: https://github.com/trycua/cua/actions/runs/19482970320🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Ensure publish workflows check out the main branch to get the
latest bumped version after the bump-version workflow pushes changes.
Previously, workflows were checking out the SHA at trigger time,
which didn't include the version bump committed by bump-version job.
This fixes the "Verify version consistency" step failure where the
expected version didn't match the pyproject.toml version.
Related to: https://github.com/trycua/cua/actions/runs/19482814921🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace heredoc-based Python script with inline command to fix
exit code 2 error in the "Capture bumped agent version" step.
The heredoc syntax with indented EOF marker was causing issues
in GitHub Actions. Simplified to a single-line Python command.
Fixes: https://github.com/trycua/cua/actions/runs/19482457144🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>