Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ permissions:

jobs:
test:
runs-on: ubuntu-latest
# ubuntu-latest (26.04) has no Python 3.9 build; 24.04 still has every version the SDK supports.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
All notable changes to the `drums` Python SDK. The SDK talks to drumsd over its HTTP API; the drumsd version each
SDK version was built against is noted where it matters.

## Unreleased (proposed: 0.4.0)

Post-D1 fixes for training clients (audit 2026-11-16). Minor version: new API, one behaviour change (429 retries),
nothing removed. Each item is a pull request of its own.

- **Retry-After on every call** (A-29, #11). A 429 (the gateway's per-key rate limit, or no capacity right now:
nothing was started) is retried for every method, step, screenshot, verify, create and fork included, waiting at
least the reply's `Retry-After`, with jittered exponential backoff, for at most 60 s of waiting per call.
`drums.RetryPolicy(max_wait_s, max_attempts, base_s, cap_s, jitter)` via `connect(..., retry=...)`;
`DRUMS_RETRY_MAX_WAIT_S` sets the budget and `0` restores the 0.3.0 behaviour (raise at once). `drums mcp` waits
at most 10 s. `Overloaded` carries `retry_after` and `retries`. A GET that gets a 503 honours `Retry-After`; a POST
that gets a 503 is still never retried.
- **macOS certificates** (A-07, #11). When the system store cannot verify the server and `certifi` is installed, the
client retries once with certifi's CA bundle and prints one line saying so; without certifi it raises the new
`CertificateError` (a `DaemonUnavailable`) with the fix (`Install Certificates.command` or `pip install certifi`).
No new dependency.
- **Run object** (A-36, #12). `with client.run(name, kind="training", task_set=..., config=...) as run:` opens a run
(`POST /v1/runs`), `run.step(step, reward=, zero_advantage_share=, rollouts=, desktops_busy=)` buffers points sent
at most once per 30 s (`PATCH /v1/runs/{id}`), and the block's end closes it (`POST /v1/runs/{id}/close`:
completed, failed with the exception, cancelled on Ctrl-C). Desktops created inside carry `X-Drums-Run-Label` (and
`X-Drums-Run-Id`). On a gateway without these routes it is a no-op with one warning (`strict=True` raises
`RunNotSupported`). `client.run(<run uuid>)` alone still returns the run's record; `get_run` and `open_run` are the
explicit names.
- **`drums preflight`** (#13). `drums preflight --desktops N --hours H [--model-gpus 2:6] [--task-set ID] [--json]`
and `drums.preflight(...)`: gateway and console health, key validity, expiry and scopes, host capacity and
admission, rate limit (N x 0.5 requests/s, the D1 rule, `REQUESTS_PER_DESKTOP_S`), live-desktop quota, spend cap at
the projected desktop-hour cost, and the task set's registration and validation. A pass/fail table with a fix and a
console link per row; exit 1 on a failure (`--strict`: also on a warning or a row it could not check). Rows that
need the gateway's future `GET /v1/limits` say "not checked" until it exists.
- **MCP custom tasks** (A-08, A-09, #15). `create_computer` and `load_task` take `task_set_id` + `task_id` (a task of
a registered set) besides `task` and `task_id`; a task document sent as a JSON string is accepted; new tools
`list_task_sets` and `get_task_set` (36 tools, the gateway's tools.json); `verify` on a computer with no task says
so. Needs the gateway route `GET /v1/task-sets/{id}/tasks/{task_id}` (Drums-Labs/drums#46).

## 0.3.0 - 2026-11-12

The MCP server and the `drums` command. The hosted MCP endpoint on the gateway (`<gateway URL>/mcp`) is live already;
Expand Down
2 changes: 1 addition & 1 deletion drums/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
EnvGone, ForkError, GateFailed, GuestError, InsecureTransport, InvalidEpisode, NotFound, NotQuiescent, Overloaded, RedirectRefused, RestoreFailed, TaskSetupFailed,
TaskUnsupported)

__version__ = "0.3.0"
__version__ = "0.4.0"
DEFAULT_URL = os.environ.get("DRUMS_URL") or os.environ.get("DRUMSD_URL") or "http://127.0.0.1:7070"
DEFAULT_IMAGE = "osworld-ubuntu"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "drums-sdk"
version = "0.3.0"
version = "0.4.0"
# Distribution name drums-sdk (PyPI rejects "drums" as too similar to an existing project); import name: drums.
description = "Drums SDK: isolated desktop environments for computer-use RL. Create a desktop, act, screenshot, fork, verify."
readme = "README.md"
Expand Down
Loading