From f04453c6c2050b7815e3f62d14343dee4698879d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 20:34:01 +0000 Subject: [PATCH 1/5] feat(api): manual updates --- .stats.yml | 2 +- README.md | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91b86f3..35f1aef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 7 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d -config_hash: b01f15c540ab2c92808c2bba96368631 +config_hash: bdeeac521c2cf3846aec9f75cb681d97 diff --git a/README.md b/README.md index ea21572..5afa4a6 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ stagehand = Stagehand::Client.new( model_api_key: ENV["MODEL_API_KEY"] # This is the default and can be omitted ) -response = stagehand.sessions.act("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", input: "click the first link on the page") +response = stagehand.sessions.act("00000000-your-session-id-000000000000", input: "click the first link on the page") puts(response.actions) ``` @@ -46,8 +46,8 @@ When the library is unable to connect to the API, or if the API returns a non-su ```ruby begin session = stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID" + browserbase_api_key: "", + browserbase_project_id: "" ) rescue Stagehand::Errors::APIConnectionError => e puts("The server could not be reached") @@ -92,8 +92,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "", + browserbase_project_id: "", request_options: {max_retries: 5} ) ``` @@ -110,8 +110,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "", + browserbase_project_id: "", request_options: {timeout: 5} ) ``` @@ -145,8 +145,8 @@ Note: the `extra_` parameters of the same name overrides the documented paramete ```ruby response = stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "", + browserbase_project_id: "", request_options: { extra_query: {my_query_parameter: value}, extra_body: {my_body_parameter: value}, @@ -192,18 +192,18 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio You can provide typesafe request parameters like so: ```ruby -stagehand.sessions.act("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", input: "click the first link on the page") +stagehand.sessions.act("00000000-your-session-id-000000000000", input: "click the first link on the page") ``` Or, equivalently: ```ruby # Hashes work, but are not typesafe: -stagehand.sessions.act("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", input: "click the first link on the page") +stagehand.sessions.act("00000000-your-session-id-000000000000", input: "click the first link on the page") # You can also splat a full Params class: params = Stagehand::SessionActParams.new(input: "click the first link on the page") -stagehand.sessions.act("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", **params) +stagehand.sessions.act("00000000-your-session-id-000000000000", **params) ``` ### Enums From d9bad7d5bc9a17d45c02583eb7809e0f29b3238b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:16:10 +0000 Subject: [PATCH 2/5] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 35f1aef..d9fd06e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 7 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d -config_hash: bdeeac521c2cf3846aec9f75cb681d97 +config_hash: a17b6052ac65237b7b8e145f4f692d3c From c21cb20650bbad1ba8f6a89ad33dcf5ddfc53c81 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 22:21:51 +0000 Subject: [PATCH 3/5] feat(api): manual updates --- .stats.yml | 6 +++--- README.md | 16 ++++++++-------- .../models/session_execute_agent_response.rb | 10 +--------- .../models/session_execute_agent_response.rbi | 19 +++---------------- .../models/session_execute_agent_response.rbs | 11 +++-------- test/stagehand/resources/sessions_test.rb | 3 +-- 6 files changed, 19 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9fd06e..4a47868 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 7 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml -openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d -config_hash: a17b6052ac65237b7b8e145f4f692d3c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-e52e8d3513159931200e5d4bd32cfdc475fe6e7db6b8015c394f5625b5a3ce1f.yml +openapi_spec_hash: fa597eb985cd1c3ba03acf68d6416857 +config_hash: b138dc33d4d0880499266048be517958 diff --git a/README.md b/README.md index 5afa4a6..efc6074 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ When the library is unable to connect to the API, or if the API returns a non-su ```ruby begin session = stagehand.sessions.start( - browserbase_api_key: "", - browserbase_project_id: "" + browserbase_api_key: "BROWSERBASE_API_KEY", + browserbase_project_id: "BROWSERBASE_PROJECT_ID" ) rescue Stagehand::Errors::APIConnectionError => e puts("The server could not be reached") @@ -92,8 +92,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "", - browserbase_project_id: "", + browserbase_api_key: "BROWSERBASE_API_KEY", + browserbase_project_id: "BROWSERBASE_PROJECT_ID", request_options: {max_retries: 5} ) ``` @@ -110,8 +110,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "", - browserbase_project_id: "", + browserbase_api_key: "BROWSERBASE_API_KEY", + browserbase_project_id: "BROWSERBASE_PROJECT_ID", request_options: {timeout: 5} ) ``` @@ -145,8 +145,8 @@ Note: the `extra_` parameters of the same name overrides the documented paramete ```ruby response = stagehand.sessions.start( - browserbase_api_key: "", - browserbase_project_id: "", + browserbase_api_key: "BROWSERBASE_API_KEY", + browserbase_project_id: "BROWSERBASE_PROJECT_ID", request_options: { extra_query: {my_query_parameter: value}, extra_body: {my_body_parameter: value}, diff --git a/lib/stagehand/models/session_execute_agent_response.rb b/lib/stagehand/models/session_execute_agent_response.rb index df9e1a2..fe8a2c8 100644 --- a/lib/stagehand/models/session_execute_agent_response.rb +++ b/lib/stagehand/models/session_execute_agent_response.rb @@ -10,16 +10,8 @@ class SessionExecuteAgentResponse < Stagehand::Internal::Type::BaseModel # @return [String, nil] optional :message, String - # @!attribute steps - # Steps taken by the agent - # - # @return [Array, nil] - optional :steps, Stagehand::Internal::Type::ArrayOf[Stagehand::Internal::Type::Unknown] - - # @!method initialize(message: nil, steps: nil) + # @!method initialize(message: nil) # @param message [String] Final message from the agent - # - # @param steps [Array] Steps taken by the agent end end end diff --git a/rbi/stagehand/models/session_execute_agent_response.rbi b/rbi/stagehand/models/session_execute_agent_response.rbi index 67c567c..2f4f507 100644 --- a/rbi/stagehand/models/session_execute_agent_response.rbi +++ b/rbi/stagehand/models/session_execute_agent_response.rbi @@ -18,27 +18,14 @@ module Stagehand sig { params(message: String).void } attr_writer :message - # Steps taken by the agent - sig { returns(T.nilable(T::Array[T.anything])) } - attr_reader :steps - - sig { params(steps: T::Array[T.anything]).void } - attr_writer :steps - - sig do - params(message: String, steps: T::Array[T.anything]).returns( - T.attached_class - ) - end + sig { params(message: String).returns(T.attached_class) } def self.new( # Final message from the agent - message: nil, - # Steps taken by the agent - steps: nil + message: nil ) end - sig { override.returns({ message: String, steps: T::Array[T.anything] }) } + sig { override.returns({ message: String }) } def to_hash end end diff --git a/sig/stagehand/models/session_execute_agent_response.rbs b/sig/stagehand/models/session_execute_agent_response.rbs index 98b9822..bb4d470 100644 --- a/sig/stagehand/models/session_execute_agent_response.rbs +++ b/sig/stagehand/models/session_execute_agent_response.rbs @@ -1,20 +1,15 @@ module Stagehand module Models - type session_execute_agent_response = - { message: String, steps: ::Array[top] } + type session_execute_agent_response = { message: String } class SessionExecuteAgentResponse < Stagehand::Internal::Type::BaseModel attr_reader message: String? def message=: (String) -> String - attr_reader steps: ::Array[top]? + def initialize: (?message: String) -> void - def steps=: (::Array[top]) -> ::Array[top] - - def initialize: (?message: String, ?steps: ::Array[top]) -> void - - def to_hash: -> { message: String, steps: ::Array[top] } + def to_hash: -> { message: String } end end end diff --git a/test/stagehand/resources/sessions_test.rb b/test/stagehand/resources/sessions_test.rb index aae77a9..809876d 100644 --- a/test/stagehand/resources/sessions_test.rb +++ b/test/stagehand/resources/sessions_test.rb @@ -54,8 +54,7 @@ def test_execute_agent_required_params assert_pattern do response => { - message: String | nil, - steps: ^(Stagehand::Internal::Type::ArrayOf[Stagehand::Internal::Type::Unknown]) | nil + message: String | nil } end end From d660a3ad9cd54238d2bc6598b576e7677ebf120f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 22:23:19 +0000 Subject: [PATCH 4/5] feat(api): manual updates --- .stats.yml | 6 +++--- README.md | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4a47868..36782ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 7 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-e52e8d3513159931200e5d4bd32cfdc475fe6e7db6b8015c394f5625b5a3ce1f.yml -openapi_spec_hash: fa597eb985cd1c3ba03acf68d6416857 -config_hash: b138dc33d4d0880499266048be517958 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-705638ac8966569986bd9ebb7c9761bf0016909e9f2753e77ceabb12c8049511.yml +openapi_spec_hash: a8fbbcaa38e91c7f97313620b42d8d62 +config_hash: a35b56eb05306a0f02e83c11d57f975f diff --git a/README.md b/README.md index efc6074..3fc2f42 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ When the library is unable to connect to the API, or if the API returns a non-su ```ruby begin session = stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID" + browserbase_api_key: "your Browserbase API key", + browserbase_project_id: "your Browserbase Project ID" ) rescue Stagehand::Errors::APIConnectionError => e puts("The server could not be reached") @@ -92,8 +92,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "your Browserbase API key", + browserbase_project_id: "your Browserbase Project ID", request_options: {max_retries: 5} ) ``` @@ -110,8 +110,8 @@ stagehand = Stagehand::Client.new( # Or, configure per-request: stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "your Browserbase API key", + browserbase_project_id: "your Browserbase Project ID", request_options: {timeout: 5} ) ``` @@ -145,8 +145,8 @@ Note: the `extra_` parameters of the same name overrides the documented paramete ```ruby response = stagehand.sessions.start( - browserbase_api_key: "BROWSERBASE_API_KEY", - browserbase_project_id: "BROWSERBASE_PROJECT_ID", + browserbase_api_key: "your Browserbase API key", + browserbase_project_id: "your Browserbase Project ID", request_options: { extra_query: {my_query_parameter: value}, extra_body: {my_body_parameter: value}, From 1aa8f5d52624c16d805103147b72fb60a1fca251 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 22:23:35 +0000 Subject: [PATCH 5/5] release: 0.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/stagehand/version.rb | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3d2ac0b..10f3091 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0" + ".": "0.2.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b15b72..c1f716d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.2.0 (2025-12-16) + +Full Changelog: [v0.1.0...v0.2.0](https://github.com/browserbase/stagehand-ruby/compare/v0.1.0...v0.2.0) + +### Features + +* **api:** manual updates ([d660a3a](https://github.com/browserbase/stagehand-ruby/commit/d660a3ad9cd54238d2bc6598b576e7677ebf120f)) +* **api:** manual updates ([c21cb20](https://github.com/browserbase/stagehand-ruby/commit/c21cb20650bbad1ba8f6a89ad33dcf5ddfc53c81)) +* **api:** manual updates ([f04453c](https://github.com/browserbase/stagehand-ruby/commit/f04453c6c2050b7815e3f62d14343dee4698879d)) + ## 0.1.0 (2025-12-16) Full Changelog: [v0.0.1...v0.1.0](https://github.com/browserbase/stagehand-ruby/compare/v0.0.1...v0.1.0) diff --git a/Gemfile.lock b/Gemfile.lock index 990a560..72f91ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - stagehand (0.1.0) + stagehand (0.2.0) connection_pool GEM diff --git a/README.md b/README.md index 3fc2f42..9fb880f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "stagehand", "~> 0.1.0" +gem "stagehand", "~> 0.2.0" ``` diff --git a/lib/stagehand/version.rb b/lib/stagehand/version.rb index 78a723a..2c829eb 100644 --- a/lib/stagehand/version.rb +++ b/lib/stagehand/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stagehand - VERSION = "0.1.0" + VERSION = "0.2.0" end