feat(agentenv-daytona)!: migrate to Daytona SDK 2.x (v0 namespace)

Draft
MI
5d ago
+107-65

Description

Blocked: don't merge until agentenv-framework moves its built-in Daytona provider to SDK 2. agentenv-framework ships its own daytona provider, which takes the provider name (so this package's provider is skipped) and requires daytona~=0.224.0 (still true in 0.9.1540; its open dependency bump only widens that to <0.232). With SDK 2.x installed, that built-in fails to import, because from daytona import Resources no longer works; that's also why 4 registration tests fail here.

Moves the AgentEnv sandbox provider to Daytona SDK 2.x through the SDK's .v0 namespace (the bundled 0.x API), using the official upgrade tool. Sandboxes stay on the current platform; nothing here uses the new v2 API.

Draft: don't merge until Daytona SDK 2.0.0 is the default release (npm latest, not yanked on PyPI). The branch pins the pre-release daytona[v0-sdk]==2.0.0a12 in pyproject.toml, because version ranges don't match pre-releases. Once 2.0.0 is the default:

  1. Change the pin to daytona[v0-sdk]>=2,<3, and update the README install line to match.
  2. Wait for CI to pass.
  3. Squash-merge with this PR's title, and replace GitHub's default commit body with the footer below. The branch commits still mention alpha.5 and Node 22.4 from the first round.
BREAKING CHANGE: the api_url config key was removed (SDK 2.x only targets Daytona Cloud), and the package requires the Daytona SDK 2.x v0 namespace (daytona[v0-sdk] >= 2).

Breaking changes

  • The api_url config key was removed: SDK 2.x only targets Daytona Cloud. Self-hosted users stay on the 0.x release. target (region) still works and is now passed on each sandbox create.
  • Requires Daytona SDK 2.x (daytona[v0-sdk]>=2, .v0 namespace) instead of 0.x.
  • Projects that also use daytona 0.x directly have to move that code to daytona.v0 at the same time, because one environment holds one daytona.

release-please will publish agentenv-daytona 1.0.0 (currently 0.1.0).

Separately, mypy fails on provider.py: agentenv-framework 0.9.1521 added an env parameter to create_vm, and the override here doesn't have it yet. That's unrelated to the SDK and not part of this PR.

Its live suite in the integration workflow waits for approval of the integration-tests environment and creates real sandboxes. Approve it after the pin flip.

Details: readiness report, section 3.

Related issue(s)

None.

Scope

  • This PR touches no more than one package/app (release routing is by changed file path).
  • The PR title follows Conventional Commits
    (e.g. feat(pi-extension): ..., fix(adk-plugin): ...) — it becomes the squash-commit
    message that release-please reads.

Checks

  • I ran the affected package's lint/build/test locally and they pass.
    On 2.0.0a12: ruff check . and black --check . pass and 127 tests pass; mypy and 4 tests fail, for the reasons above. A live smoke on alpha.5 created a sandbox through this package, made one call, checked the v0 not-found error and deleted the sandbox.
  • I updated documentation where relevant.

Legal

  • Every commit is signed off for the
    DCO (git commit -s); the sign-off matches the
    commit author.
  • I agree to the
    Contributor License Agreement.
    On my first PR, the CLA assistant will comment and I will reply to sign (once).

See CONTRIBUTING.md for
details.