You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restore the standard Browse command surface on top of #2834's isolated Stagehand V4 browser/session foundation.
Navigation: open/back/forward/reload and wait.
Page information: snapshot, get/is, HTML/markdown, viewport, screenshot, and eval.
Element actions: click, fill, select, upload, and highlight through V4 locators—without act() or a model.
Input: keyboard/type/press and raw mouse operations.
Tabs: list/new/switch/close with V4 async page/context APIs.
Omit undefined optional values from V4 RPC payloads.
Cursor and network deliberately remain explicit stack gaps. The legacy coordinate returnXPath request is still accepted but fails explicitly until #2835 removes the option.
This is the large, mechanical V3-to-V4 command translation layer. It can be reviewed against a stable lifecycle below it and exercised without mixing in cursor DOM code or private CDP transport. The test additions are correspondingly command-focused.
E2E verification
The actual built CLI was run against a synthetic page in a real Browserbase browser; the same implementation is on final head 1f13d2ba24:
Flow
Observed result
Open and read page
<h1> returned Ready
Fill and read input
Returned Ada
Select and read option
Returned b
Click checkbox and query state
checked: true
Click button and read result
Returned Clicked
Viewport and screenshot
Screenshot written, 8,130 bytes
Tabs new/list/close
Count changed 1 → 2 → 1
Cursor, network, and coordinate XPath gaps
Each failed explicitly as designed
Supported commands and cleanup
Exit 0; Browserbase session stopped
pnpm --filter browse lint
Prettier, ESLint, and TypeScript passed
pnpm --filter browse test
25 files / 381 tests passed
The fixture is synthetic and deterministic; no LLM path is involved.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Superseded by the combined review boundary in #2834. The #2868 head and commits were fast-forwarded unchanged into #2834, so GitHub correctly marked this PR merged when its head became reachable from its base. This removes the temporary delete/stub/re-add review churn while preserving separate lifecycle and command commits inside #2834. The next stack PR is now #2869 directly on #2834.
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
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
Restore the standard Browse command surface on top of #2834's isolated Stagehand V4 browser/session foundation.
act()or a model.Cursor and network deliberately remain explicit stack gaps. The legacy coordinate
returnXPathrequest is still accepted but fails explicitly until #2835 removes the option.Stack (#2870)
--return-xpath; supported V3 parity/release checkpointWhy this is separate
This is the large, mechanical V3-to-V4 command translation layer. It can be reviewed against a stable lifecycle below it and exercised without mixing in cursor DOM code or private CDP transport. The test additions are correspondingly command-focused.
E2E verification
The actual built CLI was run against a synthetic page in a real Browserbase browser; the same implementation is on final head
1f13d2ba24:<h1>returnedReadyAdabchecked: trueClickedpnpm --filter browse lintpnpm --filter browse testThe fixture is synthetic and deterministic; no LLM path is involved.