feat(browser-runtime): implement the Steel browser runtime - #344
Open
vaibhavdabas16 wants to merge 3 commits into
Open
feat(browser-runtime): implement the Steel browser runtime#344vaibhavdabas16 wants to merge 3 commits into
vaibhavdabas16 wants to merge 3 commits into
Conversation
`--browser-runtime steel` was reserved but raised "not implemented yet". Implement it against Steel's `/v1/sessions` API, which is shared by Steel Cloud and a self-hosted steel-browser, so both are reachable: the API key is mandatory only when talking to the cloud endpoint, and STEEL_BASE_URL points at a local deployment. Sessions are created with ClawBench's 1920x1080 viewport and the task time limit plus 120s of headroom (expressed in milliseconds, as Steel expects), and released on cleanup. Steel serves its replay from the session viewer instead of a downloadable file, so the runtime reports recording_mode "provider" with the viewer URL, the same shape Browserbase already uses. Steel joins MANAGED_BROWSER_RUNTIMES so batch runs default to --max-concurrent 1 and hide the local browser viewer, and it is offered in the TUI runtime picker. Also extracts the API-key scrubbing that Browserbase and Kernel each carried inline into a shared `_scrub_secret` helper rather than adding a third copy.
Replaces the "reserved, not implemented" assertion with coverage of the create/release round trip: the request payload and bounded millisecond timeout, cloud vs self-hosted key requirements, the option allowlist and type checks, release-on-bad-response, 404 cleanup, and that neither HTTP nor network errors leak the API key into a message or into run metadata.
Drops the "reserved and not implemented" note and adds a Steel section covering Steel Cloud and self-hosted setup, the supported provider options, the fields ClawBench sets itself, and the fact that a Steel run has no local recording.mp4.
Collaborator
|
Thanks for the contribution 🎉. |
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.
Closes #105. That was the last open sub-issue of #103 (support more browser runtimes).
What
--browser-runtime steelhas been reserved since the runtime abstraction landed, but selecting it raisedsteel browser runtime is reserved but not implemented yet. This implements it.Steel Cloud and the self-hosted steel-dev/steel-browser linked in #105 expose the same
/v1/sessionsAPI, so one provider covers both:STEEL_API_KEYin.env.local, sent as thesteel-api-keyheader.STEEL_BASE_URL=http://localhost:3000. No key is required, so the key is only mandatory when the endpoint is the cloud one.Details
timeoutin milliseconds, so the value is converted and bounded to[60_000, 86_400_000].dimensionsandtimeoutare set by ClawBench and rejected as user options; the rest of the allowlist isblockAds,solveCaptcha,useProxy,proxyUrl,region,userAgent,stealthConfig,sessionContext,extensionIds, each type-checked at construction the way the Browserbase and Kernel providers do.recording.mp4to fetch. The runtime reportsrecording_mode: "provider"with the viewer URL asrecording_url— the same shape Browserbase already uses, whichbatch.pysummary rendering already understands.finalize()is therefore a no-op;cleanup()releases the session and treats 404/409 asalready_closed.steeljoinsMANAGED_BROWSER_RUNTIMES, so batch runs default to--max-concurrent 1, pass--hide-browser-viewer, and refuse theclaude-code-chrome-extensionharness — consistent with the other managed runtimes.URLErrorreasons. Steel needed a third, so that is now a shared_scrub_secrethelper.Testing
tests/test_browser_runtime.pyreplaces the "reserved" assertion with 11 cases covering the create/release round trip, payload and timeout bounds, cloud vs self-hosted key requirements, option validation, release-on-bad-response, 404 cleanup, and that neither HTTP nor network errors leak the key into an error message or intorun-meta.json.Full suite passes locally (
286 passed, 10 skipped).Not verified against a live Steel deployment — I don't have Steel credentials. Every request/response shape is exercised against fakes; a maintainer with an account or a local
steel-browsershould smoke-test one task before merge.