v1.8.0

browserbase/stagehandv1.8.0Dec 24, 2024by github-actions[bot]

AI Summary

Restructures the API to use a Page-centric approach, moving action and extraction methods from the root `stagehand` object to the `page` object, and introduces wrapper classes for Playwright objects.

Key Highlights

  • Move stagehand.act() -> stagehand.page.act() and deprecate stagehand.act()
  • Wrap playwright page/context within StagehandPage and StagehandContext objects
  • Moves extract and act -> page and deprecates stagehand.extract and stagehand.observe

Breaking Changes

  • Move stagehand.act() to stagehand.page.act()
  • Deprecate stagehand.act()
  • Moves extract and act -> page
  • Deprecate stagehand.extract and stagehand.observe

New Features

  • Page-centric API
  • StagehandPage and StagehandContext wrapper classes

Full Release Notes

### Minor Changes

-   [#324](https://github.com/browserbase/stagehand/pull/324) [`cd23fa3`](https://github.com/browserbase/stagehand/commit/cd23fa33450107f29cb1ddb6edadfc769d336aa5) Thanks [@kamath](https://github.com/kamath)! - Move stagehand.act() -> stagehand.page.act() and deprecate stagehand.act()

-   [#319](https://github.com/browserbase/stagehand/pull/319) [`bacbe60`](https://github.com/browserbase/stagehand/commit/bacbe608058304bfa1f0ab049da4d8aa90e8d6f7) Thanks [@kamath](https://github.com/kamath)! - We now wrap playwright page/context within StagehandPage and StagehandContext objects. This helps us augment the Stagehand experience by being able to augment the underlying Playwright

-   [#324](https://github.com/browserbase/stagehand/pull/324) [`cd23fa3`](https://github.com/browserbase/stagehand/commit/cd23fa33450107f29cb1ddb6edadfc769d336aa5) Thanks [@kamath](https://github.com/kamath)! - moves extract and act -> page and deprecates stagehand.extract and stagehand.observe

### Patch Changes

-   [#320](https://github.com/browserbase/stagehand/pull/320) [`c0cdd0e`](https://github.com/browserbase/stagehand/commit/c0cdd0e985d66f0464d2e70b7d0cb343b0efbd3f) Thanks [@kamath](https://github.com/kamath)! - bug fix: set this.env to LOCAL if BROWSERBASE_API_KEY is not defined

-   [#325](https://github.com/browserbase/stagehand/pull/325) [`cc46f34`](https://github.com/browserbase/stagehand/commit/cc46f345c0a1dc0af4abae7e207833df17da50e7) Thanks [@pkiv](https://github.com/pkiv)! - only start domdebug if enabled