Skip to content

feat: add cloud option to support oz agent run-cloud#29

Merged
captainsafia merged 3 commits into
mainfrom
oz-agent/cloud-run-support
Jun 24, 2026
Merged

feat: add cloud option to support oz agent run-cloud#29
captainsafia merged 3 commits into
mainfrom
oz-agent/cloud-run-support

Conversation

@captainsafia

Copy link
Copy Markdown
Collaborator

Summary

Add a new cloud boolean input to oz-agent-action that allows triggering an agent run with oz agent run-cloud instead of oz agent run.

Changes

  • action.yml: Added cloud input (default: false). When set to true, the action uses oz agent run-cloud as the subcommand.
  • src/index.ts: Read the cloud input via core.getBooleanInput and select run-cloud vs run accordingly. Also skips the --sandboxed flag for cloud runs (it doesn't apply to cloud execution).
  • src/index.test.ts: Added getBooleanInput mock and two new test cases for cloud/non-cloud behavior.
  • dist/index.js: Rebuilt bundle.

Usage

- name: Run cloud agent
  uses: warpdotdev/oz-agent-action@v1
  with:
    prompt: 'Do something useful'
    cloud: true
    warp_api_key: ${{ secrets.WARP_API_KEY }}

Conversation: https://staging.warp.dev/conversation/0326076a-2a04-4ed0-90ee-4124eea39fb3
Run: https://oz.staging.warp.dev/runs/019ef732-09cd-7800-bb3f-7b54e1ec8727

This PR was generated with Oz.

captainsafia and others added 2 commits June 24, 2026 01:18
Add a new 'cloud' boolean input to the action that, when set to true,
triggers the agent using 'oz agent run-cloud' instead of 'oz agent run'.

- Add 'cloud' input to action.yml (default: false)
- Use 'run-cloud' subcommand when cloud is true
- Skip '--sandboxed' flag for cloud runs (not applicable)
- Add tests for cloud and non-cloud code paths

Co-Authored-By: Oz <oz-agent@warp.dev>
The previous npm install updated the lock file with newer @emnapi
package versions, causing npm ci to fail in CI. Restore the
original lock file from main since no new dependencies were added.

Co-Authored-By: Oz <oz-agent@warp.dev>
@captainsafia captainsafia marked this pull request as ready for review June 24, 2026 01:23

@advait-m advait-m left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! small comment around gating

Comment thread src/index.ts
if (profile) {
args.push('--profile', profile)
} else {
} else if (!cloud) {

@advait-m advait-m Jun 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I'm understanding correctly -run-cloud doesn't accept --cwd, --profile, or --share either (run-only flags), so cloud: true + any of them fails with unexpected argument? could make sense to gate those on !cloud too. happy path's fine since they default empty

i.e. if (profile && !cloud) etc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — done in 10caa56.

Added tests covering both paths (cloud: flags omitted + warnings emitted; non-cloud: flags passed, --sandboxed skipped when a profile is set) and rebuilt dist/index.js.

…rrors

`oz agent run-cloud` does not accept `--cwd`, `--profile`, or `--share`
(run-only flags), so passing any of them with `cloud: true` failed with an
unexpected-argument error. Gate these on `!cloud`, matching the existing
`--sandboxed` gating, and emit a `core.warning` when a caller sets one of
them for a cloud run so the dropped input is discoverable instead of
silently ignored.

Co-Authored-By: Oz <oz-agent@warp.dev>
@captainsafia captainsafia merged commit 38eb2ca into main Jun 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants