[pull] main from browserbase:main - #183
Merged
Merged
Conversation
#2769) …ns using the fascade # why The integration MCP didn't by the way, to close a browser session since there wasn't a clean mapping to `browser.close` # what changed This PR updates some of the instructions and the eve integration and also adds the ability to close browser sessions through the MCP tool. # test plan Tested locally <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Maps browser.close() in the Stagehand MCP facade so agents can end sessions cleanly. Previously close was unmapped and browser.isConnected() always returned true; now close sets a closeRequested flag, isConnected() reflects it, and the host tears down Stagehand after the batch. Addresses Linear GRO-2174. - In `packages/integrations/core/src/facade/runtime.ts`: add closeRequested state and accessor to PlaywrightCompatRuntime; implement browser.close() to record the call and set the flag; make browser.isConnected() return !closeRequested. - In `packages/integrations/eve/agent/instructions.md`: document that agents must call browser.close() to end a session and must not launch another browser. - Closing does not kill Chrome mid-batch; the host reads closeRequested and shuts down after the batch returns. <sup>Written for commit b6ca2e8. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/browserbase/stagehand/pull/2769?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )