Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.20.0"
".": "3.21.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-6f6bfb81d092f30a5e2005328c97d61b9ea36132bb19e9e79e55294b9534ce20.yml
openapi_spec_hash: f3fc1e3688a38dc2c28f7178f7d534e5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-eae8400fade7b2c8329c4148f56de92e147c34c0feecb420c015aab6544a9acc.yml
openapi_spec_hash: 0a9eff1ac1d464e89cbd9db64709b08a
config_hash: 1fb12ae9b478488bc1e56bfbdc210b01
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.21.0 (2026-05-07)

Full Changelog: [v3.20.0...v3.21.0](https://github.com/browserbase/stagehand-php/compare/v3.20.0...v3.21.0)

### Features

* [feat]: add `ignoreSelectors` to `observe()` ([872590f](https://github.com/browserbase/stagehand-php/commit/872590fe228fd2f0ce70d7cbefdddbf3c22fe147))

## 3.20.0 (2026-05-06)

Full Changelog: [v3.19.3...v3.20.0](https://github.com/browserbase/stagehand-php/compare/v3.19.3...v3.20.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta
<!-- x-release-please-start-version -->

```
composer require "browserbase/stagehand 3.20.0"
composer require "browserbase/stagehand 3.21.0"
```

<!-- x-release-please-end -->
Expand Down
25 changes: 25 additions & 0 deletions src/Sessions/SessionObserveParams/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @phpstan-import-type VariableShape from \Stagehand\Sessions\SessionObserveParams\Options\Variable
*
* @phpstan-type OptionsShape = array{
* ignoreSelectors?: list<string>|null,
* model?: ModelShape|null,
* selector?: string|null,
* timeout?: float|null,
Expand All @@ -28,6 +29,14 @@ final class Options implements BaseModel
/** @use SdkModel<OptionsShape> */
use SdkModel;

/**
* Selectors for elements and subtrees that should be excluded from observation.
*
* @var list<string>|null $ignoreSelectors
*/
#[Optional(list: 'string')]
public ?array $ignoreSelectors;

/**
* Model configuration object or model name string (e.g., 'openai/gpt-5-nano').
*
Expand Down Expand Up @@ -66,17 +75,20 @@ public function __construct()
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<string>|null $ignoreSelectors
* @param ModelShape|null $model
* @param array<string,VariableShape>|null $variables
*/
public static function with(
?array $ignoreSelectors = null,
string|ModelConfig|array|null $model = null,
?string $selector = null,
?float $timeout = null,
?array $variables = null,
): self {
$self = new self;

null !== $ignoreSelectors && $self['ignoreSelectors'] = $ignoreSelectors;
null !== $model && $self['model'] = $model;
null !== $selector && $self['selector'] = $selector;
null !== $timeout && $self['timeout'] = $timeout;
Expand All @@ -85,6 +97,19 @@ public static function with(
return $self;
}

/**
* Selectors for elements and subtrees that should be excluded from observation.
*
* @param list<string> $ignoreSelectors
*/
public function withIgnoreSelectors(array $ignoreSelectors): self
{
$self = clone $this;
$self['ignoreSelectors'] = $ignoreSelectors;

return $self;
}

/**
* Model configuration object or model name string (e.g., 'openai/gpt-5-nano').
*
Expand Down
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace Stagehand;

// x-release-please-start-version
const VERSION = '3.20.0';
const VERSION = '3.21.0';
// x-release-please-end