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-ruby/compare/v3.20.0...v3.21.0)

### Features

* [feat]: add `ignoreSelectors` to `observe()` ([0acc093](https://github.com/browserbase/stagehand-ruby/commit/0acc093944e72ee488393ec1fb73dc16450cc825))

## 3.20.0 (2026-05-06)

Full Changelog: [v3.19.3...v3.20.0](https://github.com/browserbase/stagehand-ruby/compare/v3.19.3...v3.20.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
stagehand (3.20.0)
stagehand (3.21.0)
cgi
connection_pool

Expand Down
10 changes: 9 additions & 1 deletion lib/stagehand/models/session_observe_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ class SessionObserveParams < Stagehand::Internal::Type::BaseModel
# @param request_options [Stagehand::RequestOptions, Hash{Symbol=>Object}]

class Options < Stagehand::Internal::Type::BaseModel
# @!attribute ignore_selectors
# Selectors for elements and subtrees that should be excluded from observation
#
# @return [Array<String>, nil]
optional :ignore_selectors, Stagehand::Internal::Type::ArrayOf[String], api_name: :ignoreSelectors

# @!attribute model
# Model configuration object or model name string (e.g., 'openai/gpt-5-nano')
#
Expand Down Expand Up @@ -79,10 +85,12 @@ class Options < Stagehand::Internal::Type::BaseModel
optional :variables,
-> { Stagehand::Internal::Type::HashOf[union: Stagehand::SessionObserveParams::Options::Variable] }

# @!method initialize(model: nil, selector: nil, timeout: nil, variables: nil)
# @!method initialize(ignore_selectors: nil, model: nil, selector: nil, timeout: nil, variables: nil)
# Some parameter documentations has been truncated, see
# {Stagehand::Models::SessionObserveParams::Options} for more details.
#
# @param ignore_selectors [Array<String>] Selectors for elements and subtrees that should be excluded from observation
#
# @param model [Stagehand::Models::ModelConfig, String] Model configuration object or model name string (e.g., 'openai/gpt-5-nano')
#
# @param selector [String] CSS selector to scope observation to a specific element
Expand Down
2 changes: 1 addition & 1 deletion lib/stagehand/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Stagehand
VERSION = "3.20.0"
VERSION = "3.21.0"
end
11 changes: 11 additions & 0 deletions rbi/stagehand/models/session_observe_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ module Stagehand
)
end

# Selectors for elements and subtrees that should be excluded from observation
sig { returns(T.nilable(T::Array[String])) }
attr_reader :ignore_selectors

sig { params(ignore_selectors: T::Array[String]).void }
attr_writer :ignore_selectors

# Model configuration object or model name string (e.g., 'openai/gpt-5-nano')
sig { returns(T.nilable(T.any(Stagehand::ModelConfig, String))) }
attr_reader :model
Expand Down Expand Up @@ -161,6 +168,7 @@ module Stagehand

sig do
params(
ignore_selectors: T::Array[String],
model: T.any(Stagehand::ModelConfig::OrHash, String),
selector: String,
timeout: Float,
Expand All @@ -177,6 +185,8 @@ module Stagehand
).returns(T.attached_class)
end
def self.new(
# Selectors for elements and subtrees that should be excluded from observation
ignore_selectors: nil,
# Model configuration object or model name string (e.g., 'openai/gpt-5-nano')
model: nil,
# CSS selector to scope observation to a specific element
Expand All @@ -193,6 +203,7 @@ module Stagehand
sig do
override.returns(
{
ignore_selectors: T::Array[String],
model: T.any(Stagehand::ModelConfig, String),
selector: String,
timeout: Float,
Expand Down
7 changes: 7 additions & 0 deletions sig/stagehand/models/session_observe_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ module Stagehand

type options =
{
ignore_selectors: ::Array[String],
model: Stagehand::Models::SessionObserveParams::Options::model,
selector: String,
timeout: Float,
variables: ::Hash[Symbol, Stagehand::Models::SessionObserveParams::Options::variable]
}

class Options < Stagehand::Internal::Type::BaseModel
attr_reader ignore_selectors: ::Array[String]?

def ignore_selectors=: (::Array[String]) -> ::Array[String]

attr_reader model: Stagehand::Models::SessionObserveParams::Options::model?

def model=: (
Expand All @@ -82,13 +87,15 @@ module Stagehand
) -> ::Hash[Symbol, Stagehand::Models::SessionObserveParams::Options::variable]

def initialize: (
?ignore_selectors: ::Array[String],
?model: Stagehand::Models::SessionObserveParams::Options::model,
?selector: String,
?timeout: Float,
?variables: ::Hash[Symbol, Stagehand::Models::SessionObserveParams::Options::variable]
) -> void

def to_hash: -> {
ignore_selectors: ::Array[String],
model: Stagehand::Models::SessionObserveParams::Options::model,
selector: String,
timeout: Float,
Expand Down