From e0a85bc780b67fe48dcbf72f9ec34c2bab0c5780 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 6 May 2026 07:52:15 +0100 Subject: [PATCH] feat: add Daytona and Islo providers --- CHANGELOG.md | 2 + README.md | 21 +- docs/README.md | 2 +- docs/cli.md | 14 +- docs/commands/list.md | 7 +- docs/commands/run.md | 14 +- docs/commands/ssh.md | 6 +- docs/commands/status.md | 7 +- docs/commands/stop.md | 6 +- docs/commands/warmup.md | 13 +- docs/features/README.md | 2 + docs/features/daytona.md | 75 ++++ docs/features/islo.md | 62 +++ docs/features/providers.md | 20 + docs/provider-backends.md | 10 +- docs/refactor/provider.md | 77 ++-- docs/source-map.md | 8 +- go.mod | 35 +- go.sum | 91 ++++- index.js | 4 +- index.test.js | 22 + internal/cli/app.go | 2 +- internal/cli/config.go | 143 ++++++- internal/cli/lease_flags.go | 2 +- internal/cli/pool.go | 2 +- internal/cli/provider_backend.go | 43 +- internal/cli/provider_backend_test.go | 123 +++++- internal/cli/provider_daytona.go | 455 +++++++++++++++++++++ internal/cli/provider_daytona_client.go | 201 +++++++++ internal/cli/provider_daytona_delegated.go | 424 +++++++++++++++++++ internal/cli/provider_islo.go | 434 ++++++++++++++++++++ internal/cli/provider_islo_client.go | 172 ++++++++ internal/cli/provider_islo_test.go | 132 ++++++ internal/cli/providers_builtin_test.go | 48 +++ internal/cli/run.go | 25 +- internal/cli/ssh.go | 22 +- internal/cli/ssh_cmd.go | 19 +- internal/cli/ssh_test.go | 55 +++ internal/cli/status.go | 10 +- internal/providers/all/all.go | 2 + internal/providers/daytona/provider.go | 36 ++ internal/providers/islo/provider.go | 36 ++ 42 files changed, 2781 insertions(+), 103 deletions(-) create mode 100644 docs/features/daytona.md create mode 100644 docs/features/islo.md create mode 100644 internal/cli/provider_daytona.go create mode 100644 internal/cli/provider_daytona_client.go create mode 100644 internal/cli/provider_daytona_delegated.go create mode 100644 internal/cli/provider_islo.go create mode 100644 internal/cli/provider_islo_client.go create mode 100644 internal/cli/provider_islo_test.go create mode 100644 internal/providers/daytona/provider.go create mode 100644 internal/providers/islo/provider.go diff --git a/CHANGELOG.md b/CHANGELOG.md index e4846e6..9adf5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ - Added `.crabboxignore` for repo-local sync-only exclude patterns shared by `run` and `sync-plan`. - Documented the prebaked runner image boundary: provider-owned AMIs/snapshots hold machine capabilities while repo/runtime caches stay in QA workflows or warm leases. - Added a provider backend registry and authoring guide so delegated and SSH-backed providers can live in provider-owned packages while core keeps command parsing, rendering, and capability validation. +- Added `provider: daytona` for Daytona sandbox leases using Daytona's SDK/toolbox for sync and command execution, with short-lived SSH access available through `crabbox ssh`. +- Added `provider: islo` for delegated Islo sandbox runs using the Islo Go SDK. ### Fixed diff --git a/README.md b/README.md index 4fee45c..ea3bf56 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Crabbox is an open-source remote testbox runner for maintainers and AI agents. L crabbox run -- pnpm test ``` -Behind that single command: a Go CLI on your laptop, a Cloudflare Worker broker that owns provider credentials and lease state, and a managed runner on Hetzner Cloud or AWS EC2. Crabbox can also wrap Blacksmith Testboxes when you choose `provider: blacksmith-testbox`, or use `provider: ssh` for existing macOS and Windows targets. +Behind that single command: a Go CLI on your laptop, a Cloudflare Worker broker that owns provider credentials and lease state, and a managed runner on Hetzner Cloud or AWS EC2. Crabbox can also wrap Blacksmith Testboxes when you choose `provider: blacksmith-testbox`, use Daytona or Islo sandboxes for direct-provider workflows, or use `provider: ssh` for existing macOS and Windows targets. --- @@ -76,6 +76,7 @@ For the full mental model, see [How Crabbox Works](docs/how-it-works.md). For th - **Brokered cloud.** Maintainers and agents share infra without sharing provider tokens. Hetzner and AWS EC2 are first-class managed providers; AWS also owns managed Windows and EC2 Mac targets. Linux defaults to Spot unless capacity config says otherwise. Providers fall back across compatible instance families when capacity or quota rejects a request. - **macOS and Windows static hosts.** `provider: ssh` reuses existing machines; it does not create macOS or Windows Crabbox boxes. macOS and Windows WSL2 use the POSIX rsync path; native Windows uses PowerShell plus tar archive sync. - **Blacksmith Testbox wrapper.** Set `provider: blacksmith-testbox` to delegate warmup/run/list/status/stop to the Blacksmith CLI while Crabbox keeps local slugs, repo claims, timing summaries, and config conventions. +- **Daytona and Islo sandboxes.** Set `provider: daytona` for Daytona SDK/toolbox execution from a snapshot with explicit SSH access when needed, or `provider: islo` for delegated Islo sandbox execution through the Islo Go SDK. - **Trusted AWS images.** Operators can create AMIs from active brokered AWS leases and promote a known-good image as the coordinator default. - **Cost guardrails.** Per-lease and monthly spend caps. Live pricing from EC2 Spot history or Hetzner server-type prices, with static fallbacks. `crabbox usage` summarizes spend by user, org, provider, and type. - **GitHub Actions hydration.** `crabbox actions hydrate` registers a leased box as an ephemeral Actions runner, so the repo's own workflow installs runtimes, services, and secrets. Crabbox does not parse Actions YAML. @@ -155,6 +156,24 @@ blacksmith: idleTimeout: 90m ``` +Optional Daytona sandbox: + +```yaml +provider: daytona +daytona: + snapshot: crabbox-ready + workRoot: /home/daytona/crabbox +``` + +Optional Islo sandbox: + +```yaml +provider: islo +islo: + image: docker.io/library/ubuntu:24.04 + workdir: crabbox +``` + Optional static macOS or Windows target: ```yaml diff --git a/docs/README.md b/docs/README.md index 8b64c8f..aad568d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -78,7 +78,7 @@ Pick whichever matches your intent: - **Get the mental model:** [How Crabbox Works](how-it-works.md), [Architecture](architecture.md), [Orchestrator](orchestrator.md). - **Use the CLI:** [CLI](cli.md), [Commands](commands/README.md), [Features](features/README.md), [Actions hydration](features/actions-hydration.md). -- **Pick or add a target:** [Providers](features/providers.md), [Provider backends](provider-backends.md), [AWS](features/aws.md), [Hetzner](features/hetzner.md), [Blacksmith Testbox](features/blacksmith-testbox.md), [Interactive desktop and VNC](features/interactive-desktop-vnc.md). +- **Pick or add a target:** [Providers](features/providers.md), [Provider backends](provider-backends.md), [AWS](features/aws.md), [Hetzner](features/hetzner.md), [Blacksmith Testbox](features/blacksmith-testbox.md), [Daytona](features/daytona.md), [Islo](features/islo.md), [Interactive desktop and VNC](features/interactive-desktop-vnc.md). - **Operate it:** [Operations](operations.md), [Observability](observability.md), [Troubleshooting](troubleshooting.md), [Performance](performance.md). - **Set it up or audit it:** [Infrastructure](infrastructure.md), [Security](security.md), [Source Map](source-map.md), [MVP Plan](mvp-plan.md). diff --git a/docs/cli.md b/docs/cli.md index 5005854..51eaf9d 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -33,8 +33,8 @@ crabbox init [--force] crabbox config show [--json] crabbox config path crabbox config set-broker --url --token-stdin [--provider hetzner|aws] -crabbox warmup [--provider hetzner|aws|ssh|blacksmith-testbox] [--target linux|macos|windows] [--desktop] [--browser] [--code] [--tailscale] [--network auto|tailscale|public] [--profile ] [--idle-timeout ] [--timing-json] -crabbox run [--id ] [--provider hetzner|aws|ssh|blacksmith-testbox] [--target linux|macos|windows] [--windows-mode normal|wsl2] [--desktop] [--browser] [--code] [--tailscale] [--network auto|tailscale|public] [--shell] [--checksum] [--debug] [--force-sync-large] [--timing-json] [--blacksmith-workflow ] -- +crabbox warmup [--provider hetzner|aws|ssh|blacksmith-testbox|daytona|islo] [--target linux|macos|windows] [--desktop] [--browser] [--code] [--tailscale] [--network auto|tailscale|public] [--profile ] [--idle-timeout ] [--timing-json] +crabbox run [--id ] [--provider hetzner|aws|ssh|blacksmith-testbox|daytona|islo] [--target linux|macos|windows] [--windows-mode normal|wsl2] [--desktop] [--browser] [--code] [--tailscale] [--network auto|tailscale|public] [--shell] [--checksum] [--debug] [--force-sync-large] [--timing-json] [--blacksmith-workflow ] -- crabbox desktop launch --id [--browser] [--url ] [--webvnc] [--open] [-- ] crabbox code --id [--open] crabbox media preview --input