diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d11c8fc..eba8a04 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.20.0" + ".": "3.21.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 391cde3..0339c57 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd0ed0..97e27ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index 4490644..adcbab3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - stagehand (3.20.0) + stagehand (3.21.0) cgi connection_pool diff --git a/lib/stagehand/models/session_observe_params.rb b/lib/stagehand/models/session_observe_params.rb index b2c2f74..8564643 100644 --- a/lib/stagehand/models/session_observe_params.rb +++ b/lib/stagehand/models/session_observe_params.rb @@ -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, 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') # @@ -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] 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 diff --git a/lib/stagehand/version.rb b/lib/stagehand/version.rb index 2fbf718..bffebd2 100644 --- a/lib/stagehand/version.rb +++ b/lib/stagehand/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stagehand - VERSION = "3.20.0" + VERSION = "3.21.0" end diff --git a/rbi/stagehand/models/session_observe_params.rbi b/rbi/stagehand/models/session_observe_params.rbi index ba48ed4..240e691 100644 --- a/rbi/stagehand/models/session_observe_params.rbi +++ b/rbi/stagehand/models/session_observe_params.rbi @@ -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 @@ -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, @@ -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 @@ -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, diff --git a/sig/stagehand/models/session_observe_params.rbs b/sig/stagehand/models/session_observe_params.rbs index 4aad068..063b837 100644 --- a/sig/stagehand/models/session_observe_params.rbs +++ b/sig/stagehand/models/session_observe_params.rbs @@ -54,6 +54,7 @@ module Stagehand type options = { + ignore_selectors: ::Array[String], model: Stagehand::Models::SessionObserveParams::Options::model, selector: String, timeout: Float, @@ -61,6 +62,10 @@ module Stagehand } 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=: ( @@ -82,6 +87,7 @@ 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, @@ -89,6 +95,7 @@ module Stagehand ) -> void def to_hash: -> { + ignore_selectors: ::Array[String], model: Stagehand::Models::SessionObserveParams::Options::model, selector: String, timeout: Float,