Skip to content

feat: add islo provider#16

Closed
zozo123 wants to merge 3 commits into
openclaw:mainfrom
zozo123:feat/islo-provider
Closed

feat: add islo provider#16
zozo123 wants to merge 3 commits into
openclaw:mainfrom
zozo123:feat/islo-provider

Conversation

@zozo123

@zozo123 zozo123 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds provider: islo (alias islo-sandbox) as a thin pass-through to the local islo CLI, modeled after the existing Blacksmith Testbox integration in internal/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 test

Motivation

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

crabbox op islo invocation
warmup islo use <name> -- true
run islo use <name> -- <cmd...> (or bash -lc '...' when shell metas present)
status islo status <name> [-o json]
list islo ls -o json
stop islo rm <name> --force
  • New internal/cli/islo.go with isIsloProvider, flag/config wiring, and the warmup/run/list/status/stop methods.
  • IsloConfig struct + islo: YAML block + CRABBOX_ISLO_* env overrides in internal/cli/config.go.
  • Provider dispatch added to run.go, pool.go, status.go, capabilities.go, target.go, screenshot.go, vnc.go next to the existing isBlacksmithProvider checks.
  • Lease IDs use a synthetic isb_<sandbox-name> prefix in the claim store to disambiguate from cbx_ and tbx_; the raw sandbox name is what flows to the islo CLI.
  • Tests in internal/cli/islo_test.go and internal/cli/config_test.go mirror the Blacksmith table-driven style.
  • Docs: new docs/features/islo.md, plus updates to README.md, docs/features/providers.md, docs/source-map.md, docs/commands/run.md, docs/commands/warmup.md.

What is intentionally not changed

  • Cloudflare Worker is untouched. Like Blacksmith, islo bypasses the broker. A worker-side provider would need a public islo API.
  • Auth stays with islo (islo login). Crabbox does not hold or forward islo credentials.
  • --sync-only, --checksum, --force-sync-large are rejected for provider: islo (mirrors blacksmith); islo owns sync via --islo-source.
  • --actions-runner is rejected for provider: islo (mirrors blacksmith); islo owns sandbox setup.
  • --desktop and --browser are rejected for provider: islo (mirrors blacksmith).
  • openclaw.plugin.json is unchanged. The existing crabbox_* tools work uniformly across providers.

Test plan

  • go vet ./...
  • go test -race ./... (all green; new TestIslo* cases plus extended TestLoadConfigFromUserFile and TestEnvOverridesConfig pass)
  • gofmt -l $(git ls-files '*.go') returns clean
  • go build -trimpath -o bin/crabbox ./cmd/crabbox
  • node scripts/check-docs-links.mjs and node scripts/check-command-docs.mjs pass
  • Core coverage gate: 86.1% on the listed core files (above the 85% threshold)
  • End-to-end smoke against a real islo install with islo login previously run:
    crabbox run --provider islo --islo-image docker.io/library/ubuntu:24.04 -- echo hello
    crabbox warmup --provider islo --islo-image docker.io/library/ubuntu:24.04
    crabbox list --provider islo --json
    crabbox stop --provider islo <name>

Example config

provider: islo
islo:
  image: docker.io/library/ubuntu:24.04
  source: github://openclaw/crabbox
  workdir: /workspace/crabbox
  gatewayProfile: default
  session: main
  idleTimeout: 90m

Related

zozo123 added 3 commits May 4, 2026 08:25
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.
@steipete

steipete commented May 4, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-05-04 at 07 55 36 tried to sign up but website is broken

@AdamGold

AdamGold commented May 4, 2026

Copy link
Copy Markdown

@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

@AdamGold AdamGold mentioned this pull request May 4, 2026
15 tasks
@steipete

steipete commented May 4, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants