Skip to content

Commit 2b8ab62

Browse files
feat: Removed MCP from readme for now
1 parent 2628417 commit 2b8ab62

7 files changed

Lines changed: 60 additions & 76 deletions

File tree

.github/workflows/publish-sonatype.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
export -- GPG_SIGNING_KEY_ID
3434
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
3535
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
36-
./gradlew publish --no-configuration-cache
36+
./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
3737
env:
3838
SONATYPE_USERNAME: ${{ secrets.STAGEHAND_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
3939
SONATYPE_PASSWORD: ${{ secrets.STAGEHAND_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-8fbb3fa8f3a37c1c7408de427fe125aadec49f705e8e30d191601a9b69c4cc41.yml
33
openapi_spec_hash: 48b4dfac35a842d7fb0d228caf87544e
4-
config_hash: 242651c4871c2869ba3c2e3d337505b9
4+
config_hash: 7386d24e2f03a3b2a89b3f6881446348

build.gradle.kts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
plugins {
2-
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
32
id("org.jetbrains.dokka") version "2.0.0"
43
}
54

@@ -35,15 +34,3 @@ tasks.named("dokkaJavadocCollector").configure {
3534
.filter { it.project.name != "stagehand-java" && it.name == "dokkaJavadocJar" }
3635
.forEach { mustRunAfter(it) }
3736
}
38-
39-
nexusPublishing {
40-
repositories {
41-
sonatype {
42-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
43-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
44-
45-
username.set(System.getenv("SONATYPE_USERNAME"))
46-
password.set(System.getenv("SONATYPE_PASSWORD"))
47-
}
48-
}
49-
}

buildSrc/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
plugins {
22
`kotlin-dsl`
33
kotlin("jvm") version "1.9.20"
4+
id("com.vanniktech.maven.publish") version "0.28.0"
45
}
56

67
repositories {
78
gradlePluginPortal()
9+
mavenCentral()
810
}
911

1012
dependencies {
1113
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
14+
implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0")
1215
}

buildSrc/src/main/kotlin/stagehand.java.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ repositories {
88
mavenCentral()
99
}
1010

11-
configure<JavaPluginExtension> {
12-
withJavadocJar()
13-
withSourcesJar()
14-
}
15-
1611
java {
1712
toolchain {
1813
languageVersion.set(JavaLanguageVersion.of(21))
@@ -27,10 +22,6 @@ tasks.withType<JavaCompile>().configureEach {
2722
options.release.set(8)
2823
}
2924

30-
tasks.named<Jar>("javadocJar") {
31-
setZip64(true)
32-
}
33-
3425
tasks.named<Jar>("jar") {
3526
manifest {
3627
attributes(mapOf(
Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,71 @@
1+
import com.vanniktech.maven.publish.JavadocJar
2+
import com.vanniktech.maven.publish.KotlinJvm
3+
import com.vanniktech.maven.publish.MavenPublishBaseExtension
4+
import com.vanniktech.maven.publish.SonatypeHost
5+
16
plugins {
2-
`maven-publish`
3-
signing
7+
id("com.vanniktech.maven.publish")
8+
}
9+
10+
publishing {
11+
repositories {
12+
if (project.hasProperty("publishLocal")) {
13+
maven {
14+
name = "LocalFileSystem"
15+
url = uri("${rootProject.layout.buildDirectory.get()}/local-maven-repo")
16+
}
17+
}
18+
}
419
}
520

6-
configure<PublishingExtension> {
7-
publications {
8-
register<MavenPublication>("maven") {
9-
from(components["java"])
21+
repositories {
22+
gradlePluginPortal()
23+
mavenCentral()
24+
}
1025

11-
pom {
12-
name.set("Stagehand API")
13-
description.set("Stagehand SDK for AI browser automation [ALPHA]. This API allows clients to\nexecute browser automation tasks remotely on the Browserbase cloud.\n\nAll endpoints except /sessions/start require an active session ID. Responses are\nstreamed using Server-Sent Events (SSE) when the `x-stream-response: true`\nheader is provided.\n\nThis SDK is currently ALPHA software and is not production ready! Please try it\nand give us your feedback, stay tuned for upcoming release announcements!")
14-
url.set("https://docs.stagehand.dev")
26+
extra["signingInMemoryKey"] = System.getenv("GPG_SIGNING_KEY")
27+
extra["signingInMemoryKeyId"] = System.getenv("GPG_SIGNING_KEY_ID")
28+
extra["signingInMemoryKeyPassword"] = System.getenv("GPG_SIGNING_PASSWORD")
1529

16-
licenses {
17-
license {
18-
name.set("MIT")
19-
}
20-
}
30+
configure<MavenPublishBaseExtension> {
31+
if (!project.hasProperty("publishLocal")) {
32+
signAllPublications()
33+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
34+
}
2135

22-
developers {
23-
developer {
24-
name.set("Stagehand")
25-
}
26-
}
36+
coordinates(project.group.toString(), project.name, project.version.toString())
37+
configure(
38+
KotlinJvm(
39+
javadocJar = JavadocJar.Dokka("dokkaJavadoc"),
40+
sourcesJar = true,
41+
)
42+
)
2743

28-
scm {
29-
connection.set("scm:git:git://github.com/browserbase/stagehand-java.git")
30-
developerConnection.set("scm:git:git://github.com/browserbase/stagehand-java.git")
31-
url.set("https://github.com/browserbase/stagehand-java")
32-
}
44+
pom {
45+
name.set("Stagehand API")
46+
description.set("Stagehand SDK for AI browser automation [ALPHA]. This API allows clients to\nexecute browser automation tasks remotely on the Browserbase cloud.\n\nAll endpoints except /sessions/start require an active session ID. Responses are\nstreamed using Server-Sent Events (SSE) when the `x-stream-response: true`\nheader is provided.\n\nThis SDK is currently ALPHA software and is not production ready! Please try it\nand give us your feedback, stay tuned for upcoming release announcements!")
47+
url.set("https://docs.stagehand.dev")
3348

34-
versionMapping {
35-
allVariants {
36-
fromResolutionResult()
37-
}
38-
}
49+
licenses {
50+
license {
51+
name.set("MIT")
3952
}
4053
}
41-
}
42-
repositories {
43-
if (project.hasProperty("publishLocal")) {
44-
maven {
45-
name = "LocalFileSystem"
46-
url = uri("${rootProject.layout.buildDirectory.get()}/local-maven-repo")
54+
55+
developers {
56+
developer {
57+
name.set("Stagehand")
4758
}
4859
}
49-
}
50-
}
5160

52-
signing {
53-
val signingKeyId = System.getenv("GPG_SIGNING_KEY_ID")?.ifBlank { null }
54-
val signingKey = System.getenv("GPG_SIGNING_KEY")?.ifBlank { null }
55-
val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")?.ifBlank { null }
56-
if (signingKey != null && signingPassword != null) {
57-
useInMemoryPgpKeys(
58-
signingKeyId,
59-
signingKey,
60-
signingPassword,
61-
)
62-
sign(publishing.publications["maven"])
61+
scm {
62+
connection.set("scm:git:git://github.com/browserbase/stagehand-java.git")
63+
developerConnection.set("scm:git:git://github.com/browserbase/stagehand-java.git")
64+
url.set("https://github.com/browserbase/stagehand-java")
65+
}
6366
}
6467
}
6568

66-
tasks.named("publish") {
67-
dependsOn(":closeAndReleaseSonatypeStagingRepository")
69+
tasks.withType<Zip>().configureEach {
70+
isZip64 = true
6871
}

stagehand-java-core/src/main/kotlin/com/browserbase/api/core/handlers/SseHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal fun sseHandler(jsonMapper: JsonMapper): Handler<StreamResponse<SseMessa
2828
val message = state.decode(line) ?: continue
2929

3030
when {
31-
message.data.startsWith("finished") -> {
31+
message.data.startsWith("{\"data\":{\"status\":\"finished\"") -> {
3232
// In this case we don't break because we still want to iterate through the full
3333
// stream.
3434
done = true

0 commit comments

Comments
 (0)