From 2b8487b08f12aca78e9b8e252779be34c06ffe11 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:15 +0000 Subject: [PATCH 1/3] feat(api): manual updates --- .stats.yml | 6 +- README.md | 4 +- .../sessions/SessionExecuteAgentResponse.kt | 66 ++----------------- .../SessionExecuteAgentResponseTest.kt | 14 +--- 4 files changed, 13 insertions(+), 77 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 54118d3..edca05c 100644 --- a/README.md +++ b/README.md @@ -203,8 +203,8 @@ import com.browserbase.api.models.sessions.SessionStartParams; import com.browserbase.api.models.sessions.SessionStartResponse; SessionStartParams params = SessionStartParams.builder() - .browserbaseApiKey("") - .browserbaseProjectId("") + .browserbaseApiKey("BROWSERBASE_API_KEY") + .browserbaseProjectId("BROWSERBASE_PROJECT_ID") .build(); HttpResponseFor response = client.sessions().withRawResponse().start(params); diff --git a/stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponse.kt b/stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponse.kt index 08afed9..3c3af1d 100644 --- a/stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponse.kt +++ b/stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponse.kt @@ -6,8 +6,6 @@ import com.browserbase.api.core.ExcludeMissing import com.browserbase.api.core.JsonField import com.browserbase.api.core.JsonMissing import com.browserbase.api.core.JsonValue -import com.browserbase.api.core.checkKnown -import com.browserbase.api.core.toImmutable import com.browserbase.api.errors.StagehandInvalidDataException import com.fasterxml.jackson.annotation.JsonAnyGetter import com.fasterxml.jackson.annotation.JsonAnySetter @@ -16,21 +14,18 @@ import com.fasterxml.jackson.annotation.JsonProperty import java.util.Collections import java.util.Objects import java.util.Optional -import kotlin.jvm.optionals.getOrNull class SessionExecuteAgentResponse @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val message: JsonField, - private val steps: JsonField>, private val additionalProperties: MutableMap, ) { @JsonCreator private constructor( - @JsonProperty("message") @ExcludeMissing message: JsonField = JsonMissing.of(), - @JsonProperty("steps") @ExcludeMissing steps: JsonField> = JsonMissing.of(), - ) : this(message, steps, mutableMapOf()) + @JsonProperty("message") @ExcludeMissing message: JsonField = JsonMissing.of() + ) : this(message, mutableMapOf()) /** * Final message from the agent @@ -40,14 +35,6 @@ private constructor( */ fun message(): Optional = message.getOptional("message") - /** - * Steps taken by the agent - * - * @throws StagehandInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun steps(): Optional> = steps.getOptional("steps") - /** * Returns the raw JSON value of [message]. * @@ -55,13 +42,6 @@ private constructor( */ @JsonProperty("message") @ExcludeMissing fun _message(): JsonField = message - /** - * Returns the raw JSON value of [steps]. - * - * Unlike [steps], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("steps") @ExcludeMissing fun _steps(): JsonField> = steps - @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -86,13 +66,11 @@ private constructor( class Builder internal constructor() { private var message: JsonField = JsonMissing.of() - private var steps: JsonField>? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(sessionExecuteAgentResponse: SessionExecuteAgentResponse) = apply { message = sessionExecuteAgentResponse.message - steps = sessionExecuteAgentResponse.steps.map { it.toMutableList() } additionalProperties = sessionExecuteAgentResponse.additionalProperties.toMutableMap() } @@ -107,30 +85,6 @@ private constructor( */ fun message(message: JsonField) = apply { this.message = message } - /** Steps taken by the agent */ - fun steps(steps: List) = steps(JsonField.of(steps)) - - /** - * Sets [Builder.steps] to an arbitrary JSON value. - * - * You should usually call [Builder.steps] with a well-typed `List` value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun steps(steps: JsonField>) = apply { - this.steps = steps.map { it.toMutableList() } - } - - /** - * Adds a single [JsonValue] to [steps]. - * - * @throws IllegalStateException if the field was previously set to a non-list. - */ - fun addStep(step: JsonValue) = apply { - steps = - (steps ?: JsonField.of(mutableListOf())).also { checkKnown("steps", it).add(step) } - } - fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -156,11 +110,7 @@ private constructor( * Further updates to this [Builder] will not mutate the returned instance. */ fun build(): SessionExecuteAgentResponse = - SessionExecuteAgentResponse( - message, - (steps ?: JsonMissing.of()).map { it.toImmutable() }, - additionalProperties.toMutableMap(), - ) + SessionExecuteAgentResponse(message, additionalProperties.toMutableMap()) } private var validated: Boolean = false @@ -171,7 +121,6 @@ private constructor( } message() - steps() validated = true } @@ -188,9 +137,7 @@ private constructor( * * Used for best match union deserialization. */ - @JvmSynthetic - internal fun validity(): Int = - (if (message.asKnown().isPresent) 1 else 0) + (steps.asKnown().getOrNull()?.size ?: 0) + @JvmSynthetic internal fun validity(): Int = (if (message.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -199,14 +146,13 @@ private constructor( return other is SessionExecuteAgentResponse && message == other.message && - steps == other.steps && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { Objects.hash(message, steps, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(message, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "SessionExecuteAgentResponse{message=$message, steps=$steps, additionalProperties=$additionalProperties}" + "SessionExecuteAgentResponse{message=$message, additionalProperties=$additionalProperties}" } diff --git a/stagehand-java-core/src/test/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponseTest.kt b/stagehand-java-core/src/test/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponseTest.kt index 3fb7223..4737af6 100644 --- a/stagehand-java-core/src/test/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponseTest.kt +++ b/stagehand-java-core/src/test/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponseTest.kt @@ -2,10 +2,8 @@ package com.browserbase.api.models.sessions -import com.browserbase.api.core.JsonValue import com.browserbase.api.core.jsonMapper import com.fasterxml.jackson.module.kotlin.jacksonTypeRef -import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -14,24 +12,16 @@ internal class SessionExecuteAgentResponseTest { @Test fun create() { val sessionExecuteAgentResponse = - SessionExecuteAgentResponse.builder() - .message("message") - .addStep(JsonValue.from(mapOf())) - .build() + SessionExecuteAgentResponse.builder().message("message").build() assertThat(sessionExecuteAgentResponse.message()).contains("message") - assertThat(sessionExecuteAgentResponse.steps().getOrNull()) - .containsExactly(JsonValue.from(mapOf())) } @Test fun roundtrip() { val jsonMapper = jsonMapper() val sessionExecuteAgentResponse = - SessionExecuteAgentResponse.builder() - .message("message") - .addStep(JsonValue.from(mapOf())) - .build() + SessionExecuteAgentResponse.builder().message("message").build() val roundtrippedSessionExecuteAgentResponse = jsonMapper.readValue( From a5a66d64628b1f18f987d1d2b96d529d4a623f27 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:22:57 +0000 Subject: [PATCH 2/3] feat(api): manual updates --- .stats.yml | 6 +++--- README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 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 edca05c..e019b4a 100644 --- a/README.md +++ b/README.md @@ -203,8 +203,8 @@ import com.browserbase.api.models.sessions.SessionStartParams; import com.browserbase.api.models.sessions.SessionStartResponse; SessionStartParams params = SessionStartParams.builder() - .browserbaseApiKey("BROWSERBASE_API_KEY") - .browserbaseProjectId("BROWSERBASE_PROJECT_ID") + .browserbaseApiKey("your Browserbase API key") + .browserbaseProjectId("your Browserbase Project ID") .build(); HttpResponseFor response = client.sessions().withRawResponse().start(params); From f6a7ada23b90ded550ba5652d5476eca03b5605e 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:13 +0000 Subject: [PATCH 3/3] release: 0.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 16 insertions(+), 7 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 1edbced..04011d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.2.0 (2025-12-16) + +Full Changelog: [v0.1.0...v0.2.0](https://github.com/browserbase/stagehand-java/compare/v0.1.0...v0.2.0) + +### Features + +* **api:** manual updates ([a5a66d6](https://github.com/browserbase/stagehand-java/commit/a5a66d64628b1f18f987d1d2b96d529d4a623f27)) +* **api:** manual updates ([2b8487b](https://github.com/browserbase/stagehand-java/commit/2b8487b08f12aca78e9b8e252779be34c06ffe11)) + ## 0.1.0 (2025-12-16) Full Changelog: [v0.0.1...v0.1.0](https://github.com/browserbase/stagehand-java/compare/v0.0.1...v0.1.0) diff --git a/README.md b/README.md index e019b4a..c383ecb 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/0.1.0) -[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/0.1.0/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.1.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/0.2.0) +[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/0.2.0/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.2.0) @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.1.0). +The REST API documentation can be found on [docs.stagehand.dev](https://docs.stagehand.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.browserbase.api/stagehand-java/0.2.0). @@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta ### Gradle ```kotlin -implementation("com.browserbase.api:stagehand-java:0.1.0") +implementation("com.browserbase.api:stagehand-java:0.2.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.browserbase.api:stagehand-java:0.1.0") com.browserbase.api stagehand-java - 0.1.0 + 0.2.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index a32fb45..63a11b4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ repositories { allprojects { group = "com.browserbase.api" - version = "0.1.0" // x-release-please-version + version = "0.2.0" // x-release-please-version } subprojects {