feat(providers): add Steel cloud browser provider#1302
Open
nibzard wants to merge 2 commits into
Open
Conversation
Reimplements Steel as a native Rust provider in cli/src/native/providers.rs,
mirroring the Browserless/Kernel pattern. Selectable via `-p steel` or
`AGENT_BROWSER_PROVIDER=steel`; requires `STEEL_API_KEY`.
Optional env vars configure session behavior: STEEL_TIMEOUT_MS,
STEEL_HEADLESS, STEEL_SOLVE_CAPTCHA, STEEL_USE_PROXY, STEEL_PROXY_URL,
STEEL_REGION, STEEL_BLOCK_ADS, STEEL_PROFILE_ID, STEEL_PERSIST_PROFILE,
STEEL_DEVICE. Sessions are explicitly released on connect failure via
POST /v1/sessions/{id}/release.
The CDP WebSocket URL has the API key appended as an apiKey query param
before connecting (preserving any pre-existing apiKey).
Supersedes the closed PR vercel-labs#532 which targeted the deleted src/browser.ts
TypeScript layer.
Contributor
|
@nibzard is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
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
-p steelorAGENT_BROWSER_PROVIDER=steel.connect_steel()incli/src/native/providers.rsmirrors the Browserless/Kernel pattern: readsSTEEL_*env vars, POSTs toapi.steel.dev/v1/sessions, returns the CDP WS URL withapiKeyappended.close_provider_session()POSTs to/v1/sessions/{id}/releaseon connect failure (best-effort, mirrors Kernel).Env vars
STEEL_API_KEYSTEEL_TIMEOUT_MSSTEEL_HEADLESSSTEEL_SOLVE_CAPTCHASTEEL_USE_PROXYSTEEL_PROXY_URLSTEEL_REGIONSTEEL_BLOCK_ADSSTEEL_PROFILE_IDSTEEL_PERSIST_PROFILESTEEL_DEVICEContext
Reimplementation of #532 against the post-
8e43469("full native") provider system. The original PR targetedsrc/browser.tswhich no longer exists; this version lives entirely incli/src/native/providers.rs. Behavioral spec (env var names, request/response shapes, apiKey-on-WS handling) is preserved verbatim from #532.Test plan
cargo buildcleancargo fmt --check&cargo clippy -- -D warningscleanSTEEL_API_KEY=... agent-browser -p steel open https://example.comconnects, navigates, returns title;close --allreleases cleanlyNotes
End-to-end HTTP-mocked test from the TS PR was not ported —
providers.rshas no mock framework today, and adding one was out of scope. Unit tests cover env-var parsing and WS URL builder; integration is covered by the smoke run above.Closes #532 (superseded).