Skip to content

Commit 4431f69

Browse files
authored
Merge pull request #2 from browserbase/release-please--branches--main--changes--next
release: 0.2.0
2 parents 2b2fdf3 + f6a7ada commit 4431f69

File tree

7 files changed

+29
-84
lines changed

7 files changed

+29
-84
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "0.2.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml
3-
openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d
4-
config_hash: a17b6052ac65237b7b8e145f4f692d3c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-705638ac8966569986bd9ebb7c9761bf0016909e9f2753e77ceabb12c8049511.yml
3+
openapi_spec_hash: a8fbbcaa38e91c7f97313620b42d8d62
4+
config_hash: a35b56eb05306a0f02e83c11d57f975f

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.2.0 (2025-12-16)
4+
5+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/browserbase/stagehand-java/compare/v0.1.0...v0.2.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([a5a66d6](https://github.com/browserbase/stagehand-java/commit/a5a66d64628b1f18f987d1d2b96d529d4a623f27))
10+
* **api:** manual updates ([2b8487b](https://github.com/browserbase/stagehand-java/commit/2b8487b08f12aca78e9b8e252779be34c06ffe11))
11+
312
## 0.1.0 (2025-12-16)
413

514
Full Changelog: [v0.0.1...v0.1.0](https://github.com/browserbase/stagehand-java/compare/v0.0.1...v0.1.0)

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![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)
6-
[![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)
5+
[![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)
6+
[![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)
77

88
<!-- x-release-please-end -->
99

@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1313

1414
<!-- x-release-please-start-version -->
1515

16-
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).
16+
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).
1717

1818
<!-- x-release-please-end -->
1919

@@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta
2424
### Gradle
2525

2626
```kotlin
27-
implementation("com.browserbase.api:stagehand-java:0.1.0")
27+
implementation("com.browserbase.api:stagehand-java:0.2.0")
2828
```
2929

3030
### Maven
@@ -33,7 +33,7 @@ implementation("com.browserbase.api:stagehand-java:0.1.0")
3333
<dependency>
3434
<groupId>com.browserbase.api</groupId>
3535
<artifactId>stagehand-java</artifactId>
36-
<version>0.1.0</version>
36+
<version>0.2.0</version>
3737
</dependency>
3838
```
3939

@@ -203,8 +203,8 @@ import com.browserbase.api.models.sessions.SessionStartParams;
203203
import com.browserbase.api.models.sessions.SessionStartResponse;
204204

205205
SessionStartParams params = SessionStartParams.builder()
206-
.browserbaseApiKey("<your API key here>")
207-
.browserbaseProjectId("<your project ID here>")
206+
.browserbaseApiKey("your Browserbase API key")
207+
.browserbaseProjectId("your Browserbase Project ID")
208208
.build();
209209
HttpResponseFor<SessionStartResponse> response = client.sessions().withRawResponse().start(params);
210210

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99

1010
allprojects {
1111
group = "com.browserbase.api"
12-
version = "0.1.0" // x-release-please-version
12+
version = "0.2.0" // x-release-please-version
1313
}
1414

1515
subprojects {

stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponse.kt

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import com.browserbase.api.core.ExcludeMissing
66
import com.browserbase.api.core.JsonField
77
import com.browserbase.api.core.JsonMissing
88
import com.browserbase.api.core.JsonValue
9-
import com.browserbase.api.core.checkKnown
10-
import com.browserbase.api.core.toImmutable
119
import com.browserbase.api.errors.StagehandInvalidDataException
1210
import com.fasterxml.jackson.annotation.JsonAnyGetter
1311
import com.fasterxml.jackson.annotation.JsonAnySetter
@@ -16,21 +14,18 @@ import com.fasterxml.jackson.annotation.JsonProperty
1614
import java.util.Collections
1715
import java.util.Objects
1816
import java.util.Optional
19-
import kotlin.jvm.optionals.getOrNull
2017

2118
class SessionExecuteAgentResponse
2219
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
2320
private constructor(
2421
private val message: JsonField<String>,
25-
private val steps: JsonField<List<JsonValue>>,
2622
private val additionalProperties: MutableMap<String, JsonValue>,
2723
) {
2824

2925
@JsonCreator
3026
private constructor(
31-
@JsonProperty("message") @ExcludeMissing message: JsonField<String> = JsonMissing.of(),
32-
@JsonProperty("steps") @ExcludeMissing steps: JsonField<List<JsonValue>> = JsonMissing.of(),
33-
) : this(message, steps, mutableMapOf())
27+
@JsonProperty("message") @ExcludeMissing message: JsonField<String> = JsonMissing.of()
28+
) : this(message, mutableMapOf())
3429

3530
/**
3631
* Final message from the agent
@@ -40,28 +35,13 @@ private constructor(
4035
*/
4136
fun message(): Optional<String> = message.getOptional("message")
4237

43-
/**
44-
* Steps taken by the agent
45-
*
46-
* @throws StagehandInvalidDataException if the JSON field has an unexpected type (e.g. if the
47-
* server responded with an unexpected value).
48-
*/
49-
fun steps(): Optional<List<JsonValue>> = steps.getOptional("steps")
50-
5138
/**
5239
* Returns the raw JSON value of [message].
5340
*
5441
* Unlike [message], this method doesn't throw if the JSON field has an unexpected type.
5542
*/
5643
@JsonProperty("message") @ExcludeMissing fun _message(): JsonField<String> = message
5744

58-
/**
59-
* Returns the raw JSON value of [steps].
60-
*
61-
* Unlike [steps], this method doesn't throw if the JSON field has an unexpected type.
62-
*/
63-
@JsonProperty("steps") @ExcludeMissing fun _steps(): JsonField<List<JsonValue>> = steps
64-
6545
@JsonAnySetter
6646
private fun putAdditionalProperty(key: String, value: JsonValue) {
6747
additionalProperties.put(key, value)
@@ -86,13 +66,11 @@ private constructor(
8666
class Builder internal constructor() {
8767

8868
private var message: JsonField<String> = JsonMissing.of()
89-
private var steps: JsonField<MutableList<JsonValue>>? = null
9069
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
9170

9271
@JvmSynthetic
9372
internal fun from(sessionExecuteAgentResponse: SessionExecuteAgentResponse) = apply {
9473
message = sessionExecuteAgentResponse.message
95-
steps = sessionExecuteAgentResponse.steps.map { it.toMutableList() }
9674
additionalProperties = sessionExecuteAgentResponse.additionalProperties.toMutableMap()
9775
}
9876

@@ -107,30 +85,6 @@ private constructor(
10785
*/
10886
fun message(message: JsonField<String>) = apply { this.message = message }
10987

110-
/** Steps taken by the agent */
111-
fun steps(steps: List<JsonValue>) = steps(JsonField.of(steps))
112-
113-
/**
114-
* Sets [Builder.steps] to an arbitrary JSON value.
115-
*
116-
* You should usually call [Builder.steps] with a well-typed `List<JsonValue>` value
117-
* instead. This method is primarily for setting the field to an undocumented or not yet
118-
* supported value.
119-
*/
120-
fun steps(steps: JsonField<List<JsonValue>>) = apply {
121-
this.steps = steps.map { it.toMutableList() }
122-
}
123-
124-
/**
125-
* Adds a single [JsonValue] to [steps].
126-
*
127-
* @throws IllegalStateException if the field was previously set to a non-list.
128-
*/
129-
fun addStep(step: JsonValue) = apply {
130-
steps =
131-
(steps ?: JsonField.of(mutableListOf())).also { checkKnown("steps", it).add(step) }
132-
}
133-
13488
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
13589
this.additionalProperties.clear()
13690
putAllAdditionalProperties(additionalProperties)
@@ -156,11 +110,7 @@ private constructor(
156110
* Further updates to this [Builder] will not mutate the returned instance.
157111
*/
158112
fun build(): SessionExecuteAgentResponse =
159-
SessionExecuteAgentResponse(
160-
message,
161-
(steps ?: JsonMissing.of()).map { it.toImmutable() },
162-
additionalProperties.toMutableMap(),
163-
)
113+
SessionExecuteAgentResponse(message, additionalProperties.toMutableMap())
164114
}
165115

166116
private var validated: Boolean = false
@@ -171,7 +121,6 @@ private constructor(
171121
}
172122

173123
message()
174-
steps()
175124
validated = true
176125
}
177126

@@ -188,9 +137,7 @@ private constructor(
188137
*
189138
* Used for best match union deserialization.
190139
*/
191-
@JvmSynthetic
192-
internal fun validity(): Int =
193-
(if (message.asKnown().isPresent) 1 else 0) + (steps.asKnown().getOrNull()?.size ?: 0)
140+
@JvmSynthetic internal fun validity(): Int = (if (message.asKnown().isPresent) 1 else 0)
194141

195142
override fun equals(other: Any?): Boolean {
196143
if (this === other) {
@@ -199,14 +146,13 @@ private constructor(
199146

200147
return other is SessionExecuteAgentResponse &&
201148
message == other.message &&
202-
steps == other.steps &&
203149
additionalProperties == other.additionalProperties
204150
}
205151

206-
private val hashCode: Int by lazy { Objects.hash(message, steps, additionalProperties) }
152+
private val hashCode: Int by lazy { Objects.hash(message, additionalProperties) }
207153

208154
override fun hashCode(): Int = hashCode
209155

210156
override fun toString() =
211-
"SessionExecuteAgentResponse{message=$message, steps=$steps, additionalProperties=$additionalProperties}"
157+
"SessionExecuteAgentResponse{message=$message, additionalProperties=$additionalProperties}"
212158
}

stagehand-java-core/src/test/kotlin/com/browserbase/api/models/sessions/SessionExecuteAgentResponseTest.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
package com.browserbase.api.models.sessions
44

5-
import com.browserbase.api.core.JsonValue
65
import com.browserbase.api.core.jsonMapper
76
import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
8-
import kotlin.jvm.optionals.getOrNull
97
import org.assertj.core.api.Assertions.assertThat
108
import org.junit.jupiter.api.Test
119

@@ -14,24 +12,16 @@ internal class SessionExecuteAgentResponseTest {
1412
@Test
1513
fun create() {
1614
val sessionExecuteAgentResponse =
17-
SessionExecuteAgentResponse.builder()
18-
.message("message")
19-
.addStep(JsonValue.from(mapOf<String, Any>()))
20-
.build()
15+
SessionExecuteAgentResponse.builder().message("message").build()
2116

2217
assertThat(sessionExecuteAgentResponse.message()).contains("message")
23-
assertThat(sessionExecuteAgentResponse.steps().getOrNull())
24-
.containsExactly(JsonValue.from(mapOf<String, Any>()))
2518
}
2619

2720
@Test
2821
fun roundtrip() {
2922
val jsonMapper = jsonMapper()
3023
val sessionExecuteAgentResponse =
31-
SessionExecuteAgentResponse.builder()
32-
.message("message")
33-
.addStep(JsonValue.from(mapOf<String, Any>()))
34-
.build()
24+
SessionExecuteAgentResponse.builder().message("message").build()
3525

3626
val roundtrippedSessionExecuteAgentResponse =
3727
jsonMapper.readValue(

0 commit comments

Comments
 (0)