diff --git a/.changeset/all-dots-shop.md b/.changeset/all-dots-shop.md deleted file mode 100644 index f2c597268..000000000 --- a/.changeset/all-dots-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -refactor \_performPlaywrightMethod diff --git a/.changeset/clean-cups-join.md b/.changeset/clean-cups-join.md deleted file mode 100644 index 543fbf3a0..000000000 --- a/.changeset/clean-cups-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -added support for "scrolling to next/previous chunk" diff --git a/.changeset/cool-lemons-report.md b/.changeset/cool-lemons-report.md deleted file mode 100644 index 193405009..000000000 --- a/.changeset/cool-lemons-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -pass observeHandler into actHandler diff --git a/.changeset/curly-rules-build.md b/.changeset/curly-rules-build.md deleted file mode 100644 index 96ec06805..000000000 --- a/.changeset/curly-rules-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -Added support for offloading agent tasks to the API. diff --git a/.changeset/empty-spoons-float.md b/.changeset/empty-spoons-float.md deleted file mode 100644 index 51f4a82c5..000000000 --- a/.changeset/empty-spoons-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -Added a `stagehand.history` array which stores an array of `act`, `extract`, `observe`, and `goto` calls made. Since this history array is stored on the `StagehandPage` level, it will capture methods even if indirectly called by an agent. diff --git a/.changeset/fifty-crabs-arrive.md b/.changeset/fifty-crabs-arrive.md deleted file mode 100644 index 8a3c84ea4..000000000 --- a/.changeset/fifty-crabs-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -you can now call stagehand.metrics to get token usage metrics. you can also set logInferenceToFile in stagehand config to log the entire call/response history from stagehand & the LLM. diff --git a/.changeset/forty-symbols-crash.md b/.changeset/forty-symbols-crash.md deleted file mode 100644 index 5b9f8c297..000000000 --- a/.changeset/forty-symbols-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -use a11y tree for default extract diff --git a/.changeset/four-hoops-mix.md b/.changeset/four-hoops-mix.md deleted file mode 100644 index 6848e8201..000000000 --- a/.changeset/four-hoops-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -add custom error classes diff --git a/.changeset/free-pots-move.md b/.changeset/free-pots-move.md deleted file mode 100644 index 459daf48c..000000000 --- a/.changeset/free-pots-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -Added CDP support for screenshots, find more about the benefits here: https://docs.browserbase.com/features/screenshots#why-use-cdp-for-screenshots%3F diff --git a/.changeset/full-trams-learn.md b/.changeset/full-trams-learn.md deleted file mode 100644 index 1a8290fa1..000000000 --- a/.changeset/full-trams-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -Fix to remove unnecessary healtcheck ping on sdk diff --git a/.changeset/giant-tires-sleep.md b/.changeset/giant-tires-sleep.md deleted file mode 100644 index 679b58e13..000000000 --- a/.changeset/giant-tires-sleep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -Fixed new opened tab handling for CUA models diff --git a/.changeset/lemon-walls-wish.md b/.changeset/lemon-walls-wish.md deleted file mode 100644 index d8253c75f..000000000 --- a/.changeset/lemon-walls-wish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -cleaner logging with pino diff --git a/.changeset/petite-donuts-lead.md b/.changeset/petite-donuts-lead.md deleted file mode 100644 index 776fcd9e0..000000000 --- a/.changeset/petite-donuts-lead.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -support api usage for extract with no args diff --git a/.changeset/plenty-ties-float.md b/.changeset/plenty-ties-float.md deleted file mode 100644 index bc7baa580..000000000 --- a/.changeset/plenty-ties-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -support scrolling in `act` diff --git a/.changeset/puny-garlics-join.md b/.changeset/puny-garlics-join.md deleted file mode 100644 index 8a8316bd1..000000000 --- a/.changeset/puny-garlics-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -Fix the open operator handler to work with anthropic diff --git a/.changeset/rare-tires-turn.md b/.changeset/rare-tires-turn.md deleted file mode 100644 index 2f237bb83..000000000 --- a/.changeset/rare-tires-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -Added support for resuming a Stagehand session created on the API. diff --git a/.changeset/ripe-lands-jump.md b/.changeset/ripe-lands-jump.md deleted file mode 100644 index 6fb914b3a..000000000 --- a/.changeset/ripe-lands-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -remove all logic related to dom based act diff --git a/.changeset/shaggy-mails-march.md b/.changeset/shaggy-mails-march.md deleted file mode 100644 index e7691038f..000000000 --- a/.changeset/shaggy-mails-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -Removed deprecated fields and methods from Stagehand constructor and added cdpUrl to localBrowserLaunchOptions for custom CDP URLs support. diff --git a/.changeset/shiny-windows-attack.md b/.changeset/shiny-windows-attack.md deleted file mode 100644 index af7efd143..000000000 --- a/.changeset/shiny-windows-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -remove debugDom diff --git a/.changeset/six-lies-lie.md b/.changeset/six-lies-lie.md deleted file mode 100644 index ecf06afb3..000000000 --- a/.changeset/six-lies-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -rm unused handlePossiblePageNavigation diff --git a/.changeset/tall-jokes-hear.md b/.changeset/tall-jokes-hear.md deleted file mode 100644 index 87b807145..000000000 --- a/.changeset/tall-jokes-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -override whatwg-url to avoid punycode warning diff --git a/.changeset/tender-rats-cheat.md b/.changeset/tender-rats-cheat.md deleted file mode 100644 index f9043514a..000000000 --- a/.changeset/tender-rats-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -You can now use Computer Using Agents (CUA) natively in Stagehand for both Anthropic and OpenAI models! This unlocks a brand new frontier of applications for Stagehand users 🤘 diff --git a/.changeset/true-moles-hear.md b/.changeset/true-moles-hear.md deleted file mode 100644 index c0aece931..000000000 --- a/.changeset/true-moles-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -add disablePino flag to stagehand constructor params diff --git a/.changeset/twenty-cooks-perform.md b/.changeset/twenty-cooks-perform.md deleted file mode 100644 index fe04d2202..000000000 --- a/.changeset/twenty-cooks-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": patch ---- - -return act result in actFromObserve diff --git a/.changeset/wide-oranges-yawn.md b/.changeset/wide-oranges-yawn.md deleted file mode 100644 index 5e0f23244..000000000 --- a/.changeset/wide-oranges-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -You can now pass in an OpenAI instance as an `llmClient` to the Stagehand constructor! This allows you to use Stagehand with any OpenAI-compatible model, like Ollama, Gemini, etc., as well as OpenAI wrappers like Braintrust. diff --git a/.changeset/wise-worlds-pull.md b/.changeset/wise-worlds-pull.md deleted file mode 100644 index 500c14d6b..000000000 --- a/.changeset/wise-worlds-pull.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@browserbasehq/stagehand": major ---- - -Announcing **Stagehand 2.0**! 🎉 - -We're thrilled to announce the release of Stagehand 2.0, bringing significant improvements to make browser automation more powerful, faster, and easier to use than ever before. - -### 🚀 New Features - -- **Introducing `stagehand.agent`**: A powerful new way to integrate SOTA Computer use models or Browserbase's [Open Operator](https://operator.browserbase.com) into Stagehand with one line of code! Perfect for multi-step workflows and complex interactions. [Learn more](https://docs.stagehand.dev/concepts/agent) -- **Lightning-fast `act` and `extract`**: Major performance improvements to make your automations run significantly faster. -- **Enhanced Logging**: Better visibility into what's happening during automation with improved logging and debugging capabilities. -- **Comprehensive Documentation**: A completely revamped documentation site with better examples, guides, and best practices. -- **Improved Error Handling**: More descriptive errors and better error recovery to help you debug issues faster. - -### 🛠️ Developer Experience - -- **Better TypeScript Support**: Enhanced type definitions and better IDE integration -- **Better Error Messages**: Clearer, more actionable error messages to help you debug faster -- **Improved Caching**: More reliable action caching for better performance - -We're excited to see what you build with Stagehand 2.0! For questions or support, join our [Slack community](https://stagehand.dev/slack). - -For more details, check out our [documentation](https://docs.stagehand.dev). diff --git a/.changeset/young-dots-fry.md b/.changeset/young-dots-fry.md deleted file mode 100644 index bea408cb2..000000000 --- a/.changeset/young-dots-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@browserbasehq/stagehand": minor ---- - -Added native Stagehand agentic loop functionality. This allows you to build agentic workflows with a single prompt without using a computer-use model. To try it out, create a `stagehand.agent` without passing in a provider. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8edcadaf4..0d9189736 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,87 @@ # @browserbasehq/stagehand +## 2.0.0 + +### Major Changes + +- [#591](https://github.com/browserbase/stagehand/pull/591) [`e234a0f`](https://github.com/browserbase/stagehand/commit/e234a0f80bf4c07bcc57265da216cbc4ab3bd19d) Thanks [@miguelg719](https://github.com/miguelg719)! - Announcing **Stagehand 2.0**! 🎉 + + We're thrilled to announce the release of Stagehand 2.0, bringing significant improvements to make browser automation more powerful, faster, and easier to use than ever before. + + ### 🚀 New Features + + - **Introducing `stagehand.agent`**: A powerful new way to integrate SOTA Computer use models or Browserbase's [Open Operator](https://operator.browserbase.com) into Stagehand with one line of code! Perfect for multi-step workflows and complex interactions. [Learn more](https://docs.stagehand.dev/concepts/agent) + - **Lightning-fast `act` and `extract`**: Major performance improvements to make your automations run significantly faster. + - **Enhanced Logging**: Better visibility into what's happening during automation with improved logging and debugging capabilities. + - **Comprehensive Documentation**: A completely revamped documentation site with better examples, guides, and best practices. + - **Improved Error Handling**: More descriptive errors and better error recovery to help you debug issues faster. + + ### 🛠️ Developer Experience + + - **Better TypeScript Support**: Enhanced type definitions and better IDE integration + - **Better Error Messages**: Clearer, more actionable error messages to help you debug faster + - **Improved Caching**: More reliable action caching for better performance + + We're excited to see what you build with Stagehand 2.0! For questions or support, join our [Slack community](https://stagehand.dev/slack). + + For more details, check out our [documentation](https://docs.stagehand.dev). + +### Minor Changes + +- [#588](https://github.com/browserbase/stagehand/pull/588) [`ba9efc5`](https://github.com/browserbase/stagehand/commit/ba9efc5580a536bc3c158e507a6c6695825c2834) Thanks [@sameelarif](https://github.com/sameelarif)! - Added support for offloading agent tasks to the API. + +- [#600](https://github.com/browserbase/stagehand/pull/600) [`11e015d`](https://github.com/browserbase/stagehand/commit/11e015daac56dc961b8c8d54ce360fd00d4fee38) Thanks [@sameelarif](https://github.com/sameelarif)! - Added a `stagehand.history` array which stores an array of `act`, `extract`, `observe`, and `goto` calls made. Since this history array is stored on the `StagehandPage` level, it will capture methods even if indirectly called by an agent. + +- [#601](https://github.com/browserbase/stagehand/pull/601) [`1d22604`](https://github.com/browserbase/stagehand/commit/1d2260401e27bae25779a55bb2ed7b7153c34fd0) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add custom error classes + +- [#599](https://github.com/browserbase/stagehand/pull/599) [`75d8fb3`](https://github.com/browserbase/stagehand/commit/75d8fb36a67cd84eb55b509bf959edc7b05059da) Thanks [@miguelg719](https://github.com/miguelg719)! - cleaner logging with pino + +- [#609](https://github.com/browserbase/stagehand/pull/609) [`c92295d`](https://github.com/browserbase/stagehand/commit/c92295d8424dac1a4f81066ca260ade2d5fce80b) Thanks [@kamath](https://github.com/kamath)! - Removed deprecated fields and methods from Stagehand constructor and added cdpUrl to localBrowserLaunchOptions for custom CDP URLs support. + +- [#571](https://github.com/browserbase/stagehand/pull/571) [`73d6736`](https://github.com/browserbase/stagehand/commit/73d67368b88002c17814e46e75a99456bf355c4e) Thanks [@miguelg719](https://github.com/miguelg719)! - You can now use Computer Using Agents (CUA) natively in Stagehand for both Anthropic and OpenAI models! This unlocks a brand new frontier of applications for Stagehand users 🤘 + +- [#619](https://github.com/browserbase/stagehand/pull/619) [`7b0b996`](https://github.com/browserbase/stagehand/commit/7b0b9969a58014ae3e99b2054e4463b785073cfd) Thanks [@sameelarif](https://github.com/sameelarif)! - add disablePino flag to stagehand constructor params + +- [#620](https://github.com/browserbase/stagehand/pull/620) [`566e587`](https://github.com/browserbase/stagehand/commit/566e5877a1861e0eae5a118d34efe09d43a37098) Thanks [@kamath](https://github.com/kamath)! - You can now pass in an OpenAI instance as an `llmClient` to the Stagehand constructor! This allows you to use Stagehand with any OpenAI-compatible model, like Ollama, Gemini, etc., as well as OpenAI wrappers like Braintrust. + +- [#586](https://github.com/browserbase/stagehand/pull/586) [`c57dc19`](https://github.com/browserbase/stagehand/commit/c57dc19c448b8c2aab82953291f4e38f202c4729) Thanks [@sameelarif](https://github.com/sameelarif)! - Added native Stagehand agentic loop functionality. This allows you to build agentic workflows with a single prompt without using a computer-use model. To try it out, create a `stagehand.agent` without passing in a provider. + +### Patch Changes + +- [#580](https://github.com/browserbase/stagehand/pull/580) [`179e17c`](https://github.com/browserbase/stagehand/commit/179e17c2d1c9837de49c776d9850a330a759e73f) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - refactor \_performPlaywrightMethod + +- [#608](https://github.com/browserbase/stagehand/pull/608) [`71ee10d`](https://github.com/browserbase/stagehand/commit/71ee10d50cb46e83d43fd783e1404569e6f317cf) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - added support for "scrolling to next/previous chunk" + +- [#594](https://github.com/browserbase/stagehand/pull/594) [`e483484`](https://github.com/browserbase/stagehand/commit/e48348412a6e651967ba22d097d5308af0e8d0a8) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - pass observeHandler into actHandler + +- [#569](https://github.com/browserbase/stagehand/pull/569) [`17e8b40`](https://github.com/browserbase/stagehand/commit/17e8b40f94b30f6e253443a4bbb8a3e364e58e38) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - you can now call stagehand.metrics to get token usage metrics. you can also set logInferenceToFile in stagehand config to log the entire call/response history from stagehand & the LLM. + +- [#617](https://github.com/browserbase/stagehand/pull/617) [`affa564`](https://github.com/browserbase/stagehand/commit/affa5646658399ab71ed08c1b9ce0fd776b46fca) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - use a11y tree for default extract + +- [#589](https://github.com/browserbase/stagehand/pull/589) [`0c4b1e7`](https://github.com/browserbase/stagehand/commit/0c4b1e7e6ff4b8a60af4a2d0d2056bff847227d5) Thanks [@miguelg719](https://github.com/miguelg719)! - Added CDP support for screenshots, find more about the benefits here: https://docs.browserbase.com/features/screenshots#why-use-cdp-for-screenshots%3F + +- [#584](https://github.com/browserbase/stagehand/pull/584) [`c7c1a80`](https://github.com/browserbase/stagehand/commit/c7c1a8066be33188ba1e900828045db61410025c) Thanks [@miguelg719](https://github.com/miguelg719)! - Fix to remove unnecessary healtcheck ping on sdk + +- [#616](https://github.com/browserbase/stagehand/pull/616) [`2a27e1c`](https://github.com/browserbase/stagehand/commit/2a27e1c8e967befbbbb05ea71369878ac1573658) Thanks [@miguelg719](https://github.com/miguelg719)! - Fixed new opened tab handling for CUA models + +- [#582](https://github.com/browserbase/stagehand/pull/582) [`dfd24e6`](https://github.com/browserbase/stagehand/commit/dfd24e638ef3723d3a8a3a33ff7942af0ac4745f) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - support api usage for extract with no args + +- [#563](https://github.com/browserbase/stagehand/pull/563) [`98166d7`](https://github.com/browserbase/stagehand/commit/98166d76d30bc67d6b04b3d5c39f78f92c254b49) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - support scrolling in `act` + +- [#598](https://github.com/browserbase/stagehand/pull/598) [`53889d4`](https://github.com/browserbase/stagehand/commit/53889d4b6e772098beaba2e1ee5a24e6f07706bb) Thanks [@miguelg719](https://github.com/miguelg719)! - Fix the open operator handler to work with anthropic + +- [#605](https://github.com/browserbase/stagehand/pull/605) [`b8beaec`](https://github.com/browserbase/stagehand/commit/b8beaec451a03eaa5d12281fe7c8d4eb9c9d7e81) Thanks [@sameelarif](https://github.com/sameelarif)! - Added support for resuming a Stagehand session created on the API. + +- [#612](https://github.com/browserbase/stagehand/pull/612) [`cd36068`](https://github.com/browserbase/stagehand/commit/cd3606854c465747c78b44763469dfdfa16db1b0) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - remove all logic related to dom based act + +- [#577](https://github.com/browserbase/stagehand/pull/577) [`4fdbf63`](https://github.com/browserbase/stagehand/commit/4fdbf6324a0dc68568bba73ea4d9018b2ed67849) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - remove debugDom + +- [#603](https://github.com/browserbase/stagehand/pull/603) [`2a14a60`](https://github.com/browserbase/stagehand/commit/2a14a607f3e7fa3ca9a02670afdc7e60ccfbfb3f) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - rm unused handlePossiblePageNavigation + +- [#614](https://github.com/browserbase/stagehand/pull/614) [`a59eaef`](https://github.com/browserbase/stagehand/commit/a59eaef67c2f4a0cb07bb0046fe7e93e2ba4dc41) Thanks [@kamath](https://github.com/kamath)! - override whatwg-url to avoid punycode warning + +- [#573](https://github.com/browserbase/stagehand/pull/573) [`c24f3c9`](https://github.com/browserbase/stagehand/commit/c24f3c9a58873c3920fab0f9891c2bf5245c9b5e) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - return act result in actFromObserve + ## 1.14.0 ### Minor Changes diff --git a/package.json b/package.json index cd992518b..5f596c0f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@browserbasehq/stagehand", - "version": "1.14.0", + "version": "2.0.0", "description": "An AI web browsing framework focused on simplicity and extensibility.", "main": "./dist/index.js", "module": "./dist/index.js",