Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/cd-py-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,23 @@ jobs:

- name: Determine version
id: get-version
env:
INPUT_VERSION: ${{ inputs.version }}
EVENT_NAME: ${{ github.event_name }}
GITHUB_REF_RAW: ${{ github.ref }}
EVENT_INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
if [ -n "${{ inputs.version }}" ]; then
VERSION=${{ inputs.version }}
elif [ "${{ github.event_name }}" == "push" ]; then
if [[ "${{ github.ref }}" =~ ^refs/tags/cloud-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
if [ -n "$INPUT_VERSION" ]; then
VERSION=$INPUT_VERSION
elif [ "$EVENT_NAME" == "push" ]; then
if [[ "$GITHUB_REF_RAW" =~ ^refs/tags/cloud-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
else
echo "Invalid tag format for cloud"
exit 1
fi
elif [ -n "${{ github.event.inputs.version }}" ]; then
VERSION=${{ github.event.inputs.version }}
elif [ -n "$EVENT_INPUT_VERSION" ]; then
VERSION=$EVENT_INPUT_VERSION
else
echo "ERROR: No version found!"
exit 1
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/cd-py-train.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/release-bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- pypi/sandbox
- pypi/sandbox-apps
- pypi/som
- pypi/train
- pypi/cloud
- npm/cli
- npm/computer
- npm/core
Expand Down Expand Up @@ -119,8 +119,8 @@ jobs:
echo "directory=libs/python/som" >> $GITHUB_OUTPUT
echo "type=python" >> $GITHUB_OUTPUT
;;
"pypi/train")
echo "directory=libs/python/cua-train" >> $GITHUB_OUTPUT
"pypi/cloud")
echo "directory=libs/python/cua-cloud" >> $GITHUB_OUTPUT
echo "type=python" >> $GITHUB_OUTPUT
;;
"npm/cli")
Expand Down Expand Up @@ -425,13 +425,13 @@ jobs:
echo "SOM version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Capture bumped train version
if: ${{ inputs.service == 'pypi/train' }}
id: train_version
- name: Capture bumped cloud version
if: ${{ inputs.service == 'pypi/cloud' }}
id: cloud_version
run: |
cd libs/python/cua-train
cd libs/python/cua-cloud
VERSION=$(python -c "import tomllib; from pathlib import Path; data = tomllib.loads(Path('pyproject.toml').read_text()); print(data['project']['version'])")
echo "Train version: $VERSION"
echo "Cloud version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Capture bumped npm/cli version
Expand Down
6 changes: 1 addition & 5 deletions libs/python/cua-cloud/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.1
current_version = 0.1.2
commit = True
tag = True
tag_name = cloud-v{new_version}
Expand All @@ -8,7 +8,3 @@ message = Bump cua-cloud to v{new_version}
[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:cua_cloud/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
21 changes: 15 additions & 6 deletions libs/python/cua-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# cua-cloud

Placeholder package for the future Cua Cloud Python SDK.

## Installation
Python client for the [Cua Cloud](https://run.cua.ai) API.

```bash
pip install cua-cloud
```

## Status
```python
from cua_cloud import CloudClient

client = CloudClient.from_key(
client_id="ukey-...", # from your Cua Cloud account
client_secret="...",
)

This package is intentionally empty today. It exists to reserve the package
name and provide a stable place for future Cua Cloud Python APIs.
# Control plane — claim a VM
http = client.get_async_httpx_client()
await http.post("/api/k8s/apis/osgym.cua.ai/v1alpha1/namespaces/my-pool/osgymsandboxclaims", json={...})

# Data plane — exec in the VM
await http.post("/api/svc/my-pool/my-sandbox-server/execute", json={"command": "echo hi"})
```
10 changes: 6 additions & 4 deletions libs/python/cua-cloud/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
[project]
name = "cua-cloud"
version = "0.1.1"
description = "Placeholder package for future Cua Cloud Python SDK."
version = "0.1.2"
description = "Cua Cloud Python client — control and data plane for Cua Cloud desktop VM pools"
readme = "README.md"
license = "MIT"
authors = [
{ name = "TryCua", email = "hello@trycua.com" }
]
keywords = [
"cua",
"cloud",
"computer-use",
"cloud",
"vm",
"automation",
]
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -24,7 +26,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.11,<3.14"
dependencies = []
dependencies = ["httpx>=0.27.0"]

[project.urls]
Homepage = "https://github.com/trycua/cua"
Expand Down
5 changes: 5 additions & 0 deletions libs/python/cua-cloud/src/cua_cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""cua-cloud — Python client for the Cua Cloud API."""

from .client import CloudClient

__all__ = ["CloudClient"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""TrainClient — authenticated httpx client for the Cua Cloud API."""
"""CloudClient — authenticated httpx client for the Cua Cloud API."""

from __future__ import annotations

Expand All @@ -8,7 +8,7 @@
import httpx


class TrainClient:
class CloudClient:
"""Authenticated client for the Cua Cloud API.

Obtain via :meth:`from_key` using a per-user key (``ukey-…``) from
Expand Down Expand Up @@ -50,7 +50,7 @@ def from_key(
client_id: str,
client_secret: str,
base_url: str = _DEFAULT_BASE_URL,
) -> "TrainClient":
) -> "CloudClient":
"""Exchange client credentials for a bearer token.

Args:
Expand Down
10 changes: 0 additions & 10 deletions libs/python/cua-train/.bumpversion.cfg

This file was deleted.

23 changes: 0 additions & 23 deletions libs/python/cua-train/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions libs/python/cua-train/pyproject.toml

This file was deleted.

5 changes: 0 additions & 5 deletions libs/python/cua-train/src/cua_train/__init__.py

This file was deleted.

Loading