feat: integrate openclaw/crabbox as AgentENV sandbox client - #35
Conversation
Islo verification (openclaw/crabbox)Validated upstream crabbox against Islo while preparing this PR (no in-repo wrapper):
AgentENV usage remains |
Point the upstream Crabbox CLI at AgentENV's E2B-compatible API with a checked-in example config, docs, env-var notes, and CI that installs openclaw/crabbox (optional Islo smoke when ISLO_API_KEY is set). Co-authored-by: Cursor <cursoragent@cursor.com>
bab0c88 to
26be07d
Compare
|
✅ OpenCodeReview: No supported files changed. |
| integrate: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
This job has no timeout even though it performs network downloads, runs a background server, invokes remote provider operations, and may allocate an Islo environment. A stalled operation can consume the runner until GitHub's platform limit and potentially retain remote resources. Add a repository-appropriate timeout-minutes value (and consider command-level timeouts for remote lifecycle calls).
Suggestion:
| integrate: | |
| runs-on: ubuntu-latest | |
| integrate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 |
| assert state["delete"] == 1, state | ||
| PY | ||
|
|
||
| - uses: taiki-e/install-action@mdbook |
There was a problem hiding this comment.
This third-party action is referenced by a mutable tag rather than a reviewed full commit SHA. If the tag or upstream repository is compromised, arbitrary code can execute and persist until the later secret-bearing Islo steps. Pin taiki-e/install-action to a full commit SHA and specify an explicit mdBook version for reproducible installs.
| - name: Guard — optional Islo smoke | ||
| id: guard | ||
| env: | ||
| ISLO_API_KEY: ${{ secrets.ISLO_API_KEY }} |
There was a problem hiding this comment.
This secret-bearing step runs in the same job after pull-request-controlled code has been checked out and executed. Secrets are available to same-repository PRs, and an earlier malicious script can persist changes through $GITHUB_ENV/$GITHUB_PATH, replace executables, or otherwise compromise later steps before this secret is injected. Move the Islo smoke to a separate job with a fresh checkout and gate it to a trusted event/ref (for example, a push to main or an explicitly trusted dispatch); do not expose ISLO_API_KEY in any job that executes PR code.
yingdi-shan
left a comment
There was a problem hiding this comment.
Thanks for your contribution! Integrations with other tools can improve AgentENV's usability, so this is a welcome addition. That said, I think we should keep this minimal: add a short section on how to configure it, plus a link, rather than updating the README and docs extensively or modifying the code for the integration test.
Reduce the Crabbox integration to what was asked for: a short configuration section plus links. Drops the dedicated CI workflow and the mock E2B contract server, removes the checked-in example config in favor of an inline snippet, and restores README, env-vars, overview, and common-issues to their upstream text.
|
Thanks — that's a fair call, the PR was doing far too much. Pushed a commit that cuts it down to what you asked for. Removed:
What's left is one 34-line Net is +43/-0 across 6 files, down from +836/-7 across 12, with no upstream lines deleted anywhere. Happy to fold the page into |
Summary
e2bproviderconfig/crabbox.example.yamlcontaining only project-scoped template/workdir settings (no endpoint or credentials)crabboxdirectlyImportant deployment requirement
Crabbox's
e2bprovider sends file and process traffic tohttps://{port}-{sandboxID}.{domain}; it does not readE2B_SANDBOX_URL. AgentENV must therefore advertise[sandbox_proxy].domains[0](orAENV_SANDBOX_PROXY_DOMAINS) and expose wildcard DNS + TLS for that domain. A loopback-onlyE2B_API_URLis sufficient fordoctorandlist, but not forwarmuporrun.Validation
config/crabbox.example.yamlloaded by Crabbox with required0600permissionsactionlint -no-color .github/workflows/crabbox.ymlruff checkandruff format --checkfor the contract serverpyright scripts/tests/crabbox-e2b-contract-server.pymake fmtmake docscrabbox run --provider e2bagainst a KVM-backed AgentENV deployment with wildcard DNS/TLS (requires deployment infrastructure not available in this checkout)