feat: add islo provider#16
Closed
zozo123 wants to merge 3 commits into
Closed
Conversation
Add `provider: islo` (alias `islo-sandbox`) as a thin pass-through to the local `islo` CLI, mirroring the Blacksmith Testbox integration. The wrapper forwards machine operations to islo: warmup runs `islo use <name> -- true`, run runs `islo use <name> -- <command>`, list runs `islo ls -o json`, status runs `islo status <name>`, and stop runs `islo rm <name> --force`. Crabbox keeps local YAML/env config, friendly slugs, repo claims, and timing summaries; islo keeps auth (`islo login`), provisioning, sandbox networking, repo cloning via `--source`, and idle expiry. Like blacksmith-testbox, sync is reported as delegated and `--sync-only`, `--checksum`, and `--force-sync-large` are rejected. The Cloudflare Worker is not touched. Synthetic lease IDs use the prefix `isb_<sandbox-name>` to avoid collisions with `cbx_` and `tbx_` IDs in the claim store; the raw sandbox name is what flows to the islo CLI.
islo emits `created_by`, `created_at`, and `deleted_at` (snake_case) in `islo ls -o json` output. Update `isloListItem` JSON tags to match so `crabbox list --provider islo --json` round-trips those fields. Verified end-to-end against a real `islo ls` against the user's org: created_by and created_at are now preserved in crabbox JSON output.
End-to-end testing against a real islo sandbox uncovered three issues: 1. Leading shell-style env assignments (`FOO=1 cmd`) were passed as argv tokens, so bash inside the sandbox ran them as a command and reported `command not found: FOO=1`. Fixed by detecting leading `KEY=VAL` tokens and switching to `bash -lc` with the same shell-quoting helper that the Blacksmith path uses. Shell-meta commands (`pnpm test && pnpm check`) still take the raw-join path so operators are preserved. 2. `crabbox status --provider islo --json` was streaming islo's native `SandboxResponse` JSON shape, which does not match Crabbox's uniform `statusView` schema. Reject `--json` for parity with the Blacksmith provider; users who want islo's JSON shape can call `islo status <name> -o json` directly. 3. Auto-generated sandbox names used 4 random bytes (32-bit space). Bumped to 6 bytes to match the lease-id randomness used elsewhere. Tests cover env-assignment quoting, raw-join shell mode, and the --json rejection. Docs updated to spell out the v1 contract: --json unsupported on status, idle-timeout is Crabbox-local only, creation flags are honored on warmup and ignored on reuse. Verified against a live islo sandbox: - `crabbox run --id lilac-hare -- MYVAR=hello sh -c 'echo got=$MYVAR'` now prints `got=hello` (was `command not found: MYVAR=hello`). - `crabbox run --id lilac-hare -- pnpm install '&&' pnpm test` still joins raw so the shell sees the operator. - `crabbox status --provider islo --id <name> --json` exits 2 with a clear message. - `crabbox list --provider islo --json` round-trips created_by / created_at from islo's snake_case JSON.
Contributor
|
@steipete hey, I'm Adam and I'm building https://islo.dev. We're working on solving this issue and in the meanwhile I added 1000$ in credits to your organization. @zozo123 thanks for adding us btw! I'll change this PR a bit to use our Go SDK |
Contributor
|
Thanks for putting this together. Closing this one because it was superseded by #24, and we are not adding an Islo provider to Crabbox right now. We may revisit the provider question later if the service fit is clearer, but this PR should not stay open as the active path. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds
provider: islo(aliasislo-sandbox) as a thin pass-through to the localisloCLI, modeled after the existing Blacksmith Testbox integration ininternal/cli/blacksmith.go. Lets maintainers and AI agents target islo sandboxes the same way they target Blacksmith Testboxes today:crabbox run --provider islo --id my-sandbox -- pnpm testMotivation
Crabbox already supports an "external CLI passthrough" backend (Blacksmith Testbox) that bypasses the broker and keeps auth/sync with the upstream tool. islo.dev fits the same shape: it owns auth, sandbox networking, repo cloning, and idle expiry, while Crabbox owns local YAML/env config, friendly slugs, repo claims, command quoting, and timing summaries. Mirroring the Blacksmith pattern gives users a consistent on-ramp without a worker integration.
What changed
warmupislo use <name> -- truerunislo use <name> -- <cmd...>(orbash -lc '...'when shell metas present)statusislo status <name> [-o json]listislo ls -o jsonstopislo rm <name> --forceinternal/cli/islo.gowithisIsloProvider, flag/config wiring, and the warmup/run/list/status/stop methods.IsloConfigstruct +islo:YAML block +CRABBOX_ISLO_*env overrides ininternal/cli/config.go.run.go,pool.go,status.go,capabilities.go,target.go,screenshot.go,vnc.gonext to the existingisBlacksmithProviderchecks.isb_<sandbox-name>prefix in the claim store to disambiguate fromcbx_andtbx_; the raw sandbox name is what flows to the islo CLI.internal/cli/islo_test.goandinternal/cli/config_test.gomirror the Blacksmith table-driven style.docs/features/islo.md, plus updates toREADME.md,docs/features/providers.md,docs/source-map.md,docs/commands/run.md,docs/commands/warmup.md.What is intentionally not changed
islo login). Crabbox does not hold or forward islo credentials.--sync-only,--checksum,--force-sync-largeare rejected forprovider: islo(mirrors blacksmith); islo owns sync via--islo-source.--actions-runneris rejected forprovider: islo(mirrors blacksmith); islo owns sandbox setup.--desktopand--browserare rejected forprovider: islo(mirrors blacksmith).openclaw.plugin.jsonis unchanged. The existingcrabbox_*tools work uniformly across providers.Test plan
go vet ./...go test -race ./...(all green; newTestIslo*cases plus extendedTestLoadConfigFromUserFileandTestEnvOverridesConfigpass)gofmt -l $(git ls-files '*.go')returns cleango build -trimpath -o bin/crabbox ./cmd/crabboxnode scripts/check-docs-links.mjsandnode scripts/check-command-docs.mjspassisloinstall withislo loginpreviously run:Example config
Related
provider: blacksmith-testboxprecedent: https://github.com/openclaw/crabbox/blob/main/internal/cli/blacksmith.go