Skip to content

Commit 051317b

Browse files
feat(api): tweak branding and fix some config fields
1 parent df9be74 commit 051317b

File tree

124 files changed

+527
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+527
-481
lines changed

.github/workflows/publish-sonatype.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
3636
./gradlew publish --no-configuration-cache
3737
env:
38-
SONATYPE_USERNAME: ${{ secrets.STAGEHAND_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
39-
SONATYPE_PASSWORD: ${{ secrets.STAGEHAND_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
40-
GPG_SIGNING_KEY: ${{ secrets.STAGEHAND_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
41-
GPG_SIGNING_PASSWORD: ${{ secrets.STAGEHAND_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
38+
SONATYPE_USERNAME: ${{ secrets.BROWSERBASE_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
39+
SONATYPE_PASSWORD: ${{ secrets.BROWSERBASE_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
40+
GPG_SIGNING_KEY: ${{ secrets.BROWSERBASE_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
41+
GPG_SIGNING_PASSWORD: ${{ secrets.BROWSERBASE_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.github/workflows/release-doctor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
SONATYPE_USERNAME: ${{ secrets.STAGEHAND_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
22-
SONATYPE_PASSWORD: ${{ secrets.STAGEHAND_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
23-
GPG_SIGNING_KEY: ${{ secrets.STAGEHAND_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
24-
GPG_SIGNING_PASSWORD: ${{ secrets.STAGEHAND_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
21+
SONATYPE_USERNAME: ${{ secrets.BROWSERBASE_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
22+
SONATYPE_PASSWORD: ${{ secrets.BROWSERBASE_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
23+
GPG_SIGNING_KEY: ${{ secrets.BROWSERBASE_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
24+
GPG_SIGNING_PASSWORD: ${{ secrets.BROWSERBASE_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-0c12f985340be2a9287e8e01ff8733f7f2d02e019149d1ae95f1a8f8798c6690.yml
33
openapi_spec_hash: efb79934e1dc63763dd4e8493b825273
4-
config_hash: cb2b1795c195a63201c8ef7a617934d1
4+
config_hash: 1548ab91b7e8621f7fa79e8cff0c3f93

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Stagehand
189+
Copyright 2025 Browserbase
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 98 additions & 97 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Stagehand, please follow the respective company's security reporting guidelines.
19+
or products provided by Browserbase, please follow the respective company's security reporting guidelines.
2020

2121
---
2222

stagehand-java-client-okhttp/build.gradle.kts renamed to browserbase-java-client-okhttp/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
2-
id("stagehand.kotlin")
3-
id("stagehand.publish")
2+
id("browserbase.kotlin")
3+
id("browserbase.publish")
44
}
55

66
dependencies {
7-
api(project(":stagehand-java-core"))
7+
api(project(":browserbase-java-core"))
88

99
implementation("com.squareup.okhttp3:okhttp:4.12.0")
1010
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

stagehand-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/StagehandOkHttpClient.kt renamed to browserbase-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/BrowserbaseOkHttpClient.kt

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
package com.stagehand.api.client.okhttp
44

55
import com.fasterxml.jackson.databind.json.JsonMapper
6-
import com.stagehand.api.client.StagehandClient
7-
import com.stagehand.api.client.StagehandClientImpl
6+
import com.stagehand.api.client.BrowserbaseClient
7+
import com.stagehand.api.client.BrowserbaseClientImpl
88
import com.stagehand.api.core.ClientOptions
99
import com.stagehand.api.core.Sleeper
1010
import com.stagehand.api.core.Timeout
@@ -22,25 +22,25 @@ import javax.net.ssl.X509TrustManager
2222
import kotlin.jvm.optionals.getOrNull
2323

2424
/**
25-
* A class that allows building an instance of [StagehandClient] with [OkHttpClient] as the
25+
* A class that allows building an instance of [BrowserbaseClient] with [OkHttpClient] as the
2626
* underlying [HttpClient].
2727
*/
28-
class StagehandOkHttpClient private constructor() {
28+
class BrowserbaseOkHttpClient private constructor() {
2929

3030
companion object {
3131

32-
/** Returns a mutable builder for constructing an instance of [StagehandClient]. */
32+
/** Returns a mutable builder for constructing an instance of [BrowserbaseClient]. */
3333
@JvmStatic fun builder() = Builder()
3434

3535
/**
3636
* Returns a client configured using system properties and environment variables.
3737
*
3838
* @see ClientOptions.Builder.fromEnv
3939
*/
40-
@JvmStatic fun fromEnv(): StagehandClient = builder().fromEnv().build()
40+
@JvmStatic fun fromEnv(): BrowserbaseClient = builder().fromEnv().build()
4141
}
4242

43-
/** A builder for [StagehandOkHttpClient]. */
43+
/** A builder for [BrowserbaseOkHttpClient]. */
4444
class Builder internal constructor() {
4545

4646
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
@@ -144,18 +144,22 @@ class StagehandOkHttpClient private constructor() {
144144
/**
145145
* The base URL to use for every request.
146146
*
147-
* Defaults to the production environment: `http://localhost:3000/v1`.
147+
* Defaults to the production environment: `https://api.stagehand.browserbase.com/v1`.
148148
*
149149
* The following other environments, with dedicated builder methods, are available:
150-
* - environment_1: `https://api.stagehand.browserbase.com/v1`
150+
* - dev: `https://api.stagehand.dev.browserbase.com/v1`
151+
* - local: `http://localhost:5000/v1`
151152
*/
152153
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
153154

154155
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
155156
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
156157

157-
/** Sets [baseUrl] to `https://api.stagehand.browserbase.com/v1`. */
158-
fun environment1() = apply { clientOptions.environment1() }
158+
/** Sets [baseUrl] to `https://api.stagehand.dev.browserbase.com/v1`. */
159+
fun dev() = apply { clientOptions.dev() }
160+
161+
/** Sets [baseUrl] to `http://localhost:5000/v1`. */
162+
fun local() = apply { clientOptions.local() }
159163

160164
/**
161165
* Whether to call `validate` on every response before returning it.
@@ -201,10 +205,7 @@ class StagehandOkHttpClient private constructor() {
201205
*/
202206
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
203207

204-
fun apiKey(apiKey: String?) = apply { clientOptions.apiKey(apiKey) }
205-
206-
/** Alias for calling [Builder.apiKey] with `apiKey.orElse(null)`. */
207-
fun apiKey(apiKey: Optional<String>) = apiKey(apiKey.getOrNull())
208+
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
208209

209210
fun headers(headers: Headers) = apply { clientOptions.headers(headers) }
210211

@@ -294,12 +295,12 @@ class StagehandOkHttpClient private constructor() {
294295
fun fromEnv() = apply { clientOptions.fromEnv() }
295296

296297
/**
297-
* Returns an immutable instance of [StagehandClient].
298+
* Returns an immutable instance of [BrowserbaseClient].
298299
*
299300
* Further updates to this [Builder] will not mutate the returned instance.
300301
*/
301-
fun build(): StagehandClient =
302-
StagehandClientImpl(
302+
fun build(): BrowserbaseClient =
303+
BrowserbaseClientImpl(
303304
clientOptions
304305
.httpClient(
305306
OkHttpClient.builder()

stagehand-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/StagehandOkHttpClientAsync.kt renamed to browserbase-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/BrowserbaseOkHttpClientAsync.kt

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
package com.stagehand.api.client.okhttp
44

55
import com.fasterxml.jackson.databind.json.JsonMapper
6-
import com.stagehand.api.client.StagehandClientAsync
7-
import com.stagehand.api.client.StagehandClientAsyncImpl
6+
import com.stagehand.api.client.BrowserbaseClientAsync
7+
import com.stagehand.api.client.BrowserbaseClientAsyncImpl
88
import com.stagehand.api.core.ClientOptions
99
import com.stagehand.api.core.Sleeper
1010
import com.stagehand.api.core.Timeout
@@ -22,25 +22,25 @@ import javax.net.ssl.X509TrustManager
2222
import kotlin.jvm.optionals.getOrNull
2323

2424
/**
25-
* A class that allows building an instance of [StagehandClientAsync] with [OkHttpClient] as the
25+
* A class that allows building an instance of [BrowserbaseClientAsync] with [OkHttpClient] as the
2626
* underlying [HttpClient].
2727
*/
28-
class StagehandOkHttpClientAsync private constructor() {
28+
class BrowserbaseOkHttpClientAsync private constructor() {
2929

3030
companion object {
3131

32-
/** Returns a mutable builder for constructing an instance of [StagehandClientAsync]. */
32+
/** Returns a mutable builder for constructing an instance of [BrowserbaseClientAsync]. */
3333
@JvmStatic fun builder() = Builder()
3434

3535
/**
3636
* Returns a client configured using system properties and environment variables.
3737
*
3838
* @see ClientOptions.Builder.fromEnv
3939
*/
40-
@JvmStatic fun fromEnv(): StagehandClientAsync = builder().fromEnv().build()
40+
@JvmStatic fun fromEnv(): BrowserbaseClientAsync = builder().fromEnv().build()
4141
}
4242

43-
/** A builder for [StagehandOkHttpClientAsync]. */
43+
/** A builder for [BrowserbaseOkHttpClientAsync]. */
4444
class Builder internal constructor() {
4545

4646
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
@@ -144,18 +144,22 @@ class StagehandOkHttpClientAsync private constructor() {
144144
/**
145145
* The base URL to use for every request.
146146
*
147-
* Defaults to the production environment: `http://localhost:3000/v1`.
147+
* Defaults to the production environment: `https://api.stagehand.browserbase.com/v1`.
148148
*
149149
* The following other environments, with dedicated builder methods, are available:
150-
* - environment_1: `https://api.stagehand.browserbase.com/v1`
150+
* - dev: `https://api.stagehand.dev.browserbase.com/v1`
151+
* - local: `http://localhost:5000/v1`
151152
*/
152153
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }
153154

154155
/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
155156
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())
156157

157-
/** Sets [baseUrl] to `https://api.stagehand.browserbase.com/v1`. */
158-
fun environment1() = apply { clientOptions.environment1() }
158+
/** Sets [baseUrl] to `https://api.stagehand.dev.browserbase.com/v1`. */
159+
fun dev() = apply { clientOptions.dev() }
160+
161+
/** Sets [baseUrl] to `http://localhost:5000/v1`. */
162+
fun local() = apply { clientOptions.local() }
159163

160164
/**
161165
* Whether to call `validate` on every response before returning it.
@@ -201,10 +205,7 @@ class StagehandOkHttpClientAsync private constructor() {
201205
*/
202206
fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) }
203207

204-
fun apiKey(apiKey: String?) = apply { clientOptions.apiKey(apiKey) }
205-
206-
/** Alias for calling [Builder.apiKey] with `apiKey.orElse(null)`. */
207-
fun apiKey(apiKey: Optional<String>) = apiKey(apiKey.getOrNull())
208+
fun apiKey(apiKey: String) = apply { clientOptions.apiKey(apiKey) }
208209

209210
fun headers(headers: Headers) = apply { clientOptions.headers(headers) }
210211

@@ -294,12 +295,12 @@ class StagehandOkHttpClientAsync private constructor() {
294295
fun fromEnv() = apply { clientOptions.fromEnv() }
295296

296297
/**
297-
* Returns an immutable instance of [StagehandClientAsync].
298+
* Returns an immutable instance of [BrowserbaseClientAsync].
298299
*
299300
* Further updates to this [Builder] will not mutate the returned instance.
300301
*/
301-
fun build(): StagehandClientAsync =
302-
StagehandClientAsyncImpl(
302+
fun build(): BrowserbaseClientAsync =
303+
BrowserbaseClientAsyncImpl(
303304
clientOptions
304305
.httpClient(
305306
OkHttpClient.builder()

stagehand-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/OkHttpClient.kt renamed to browserbase-java-client-okhttp/src/main/kotlin/com/stagehand/api/client/okhttp/OkHttpClient.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import com.stagehand.api.core.http.HttpMethod
88
import com.stagehand.api.core.http.HttpRequest
99
import com.stagehand.api.core.http.HttpRequestBody
1010
import com.stagehand.api.core.http.HttpResponse
11-
import com.stagehand.api.errors.StagehandIoException
11+
import com.stagehand.api.errors.BrowserbaseIoException
1212
import java.io.IOException
1313
import java.io.InputStream
1414
import java.net.Proxy
@@ -39,7 +39,7 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
3939
return try {
4040
call.execute().toResponse()
4141
} catch (e: IOException) {
42-
throw StagehandIoException("Request failed", e)
42+
throw BrowserbaseIoException("Request failed", e)
4343
} finally {
4444
request.body?.close()
4545
}
@@ -59,7 +59,7 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
5959
}
6060

6161
override fun onFailure(call: Call, e: IOException) {
62-
future.completeExceptionally(StagehandIoException("Request failed", e))
62+
future.completeExceptionally(BrowserbaseIoException("Request failed", e))
6363
}
6464
}
6565
)
@@ -84,7 +84,7 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
8484
val clientBuilder = okHttpClient.newBuilder()
8585

8686
val logLevel =
87-
when (System.getenv("STAGEHAND_LOG")?.lowercase()) {
87+
when (System.getenv("BROWSERBASE_LOG")?.lowercase()) {
8888
"info" -> HttpLoggingInterceptor.Level.BASIC
8989
"debug" -> HttpLoggingInterceptor.Level.BODY
9090
else -> null

0 commit comments

Comments
 (0)