Skip to content

Commit 00a6a51

Browse files
committed
STG-1537: switch local binary downloads to server-v3
1 parent 18832cf commit 00a6a51

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
matrix:
1818
include:
1919
- os: ubuntu-latest
20-
binary_name: stagehand-server-linux-x64
20+
binary_name: stagehand-server-v3-linux-x64
2121
output_path: src/stagehand/_sea/stagehand-linux-x64
2222
wheel_platform_tag: manylinux2014_x86_64
2323
- os: macos-latest
24-
binary_name: stagehand-server-darwin-arm64
24+
binary_name: stagehand-server-v3-darwin-arm64
2525
output_path: src/stagehand/_sea/stagehand-darwin-arm64
2626
wheel_platform_tag: macosx_11_0_arm64
2727
- os: macos-15-intel
28-
binary_name: stagehand-server-darwin-x64
28+
binary_name: stagehand-server-v3-darwin-x64
2929
output_path: src/stagehand/_sea/stagehand-darwin-x64
3030
wheel_platform_tag: macosx_10_9_x86_64
3131
- os: windows-latest
32-
binary_name: stagehand-server-win32-x64.exe
32+
binary_name: stagehand-server-v3-win32-x64.exe
3333
output_path: src/stagehand/_sea/stagehand-win32-x64.exe
3434
wheel_platform_tag: win_amd64
3535

@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
version: "0.9.13"
4747

48-
- name: Resolve latest stagehand/server release
48+
- name: Resolve latest stagehand/server-v3 release
4949
id: stagehand-server-release
5050
uses: actions/github-script@v6
5151
with:
@@ -56,12 +56,12 @@ jobs:
5656
repo: 'stagehand',
5757
per_page: 100,
5858
});
59-
const release = data.find(r => typeof r.tag_name === 'string' && r.tag_name.startsWith('stagehand-server/v'));
59+
const release = data.find(r => typeof r.tag_name === 'string' && r.tag_name.startsWith('stagehand-server-v3/v'));
6060
if (!release) {
61-
core.setFailed('No stagehand-server/v* release found in browserbase/stagehand');
61+
core.setFailed('No stagehand-server-v3/v* release found in browserbase/stagehand');
6262
return;
6363
}
64-
core.info(`Using stagehand/server release tag: ${release.tag_name}`);
64+
core.info(`Using stagehand/server-v3 release tag: ${release.tag_name}`);
6565
core.setOutput('tag', release.tag_name);
6666
core.setOutput('id', String(release.id));
6767

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ $ uv run python scripts/download-binary.py
4040

4141
This will:
4242
- Detect your platform (macOS, Linux, Windows) and architecture (x64, arm64)
43-
- Download the latest stagehand-server binary from GitHub releases
43+
- Download the latest stagehand-server-v3 binary from GitHub releases
4444
- Place it in `bin/sea/` where the SDK expects to find it
4545

4646
### Manual download (alternative)
4747

4848
You can also manually download from [GitHub releases](https://github.com/browserbase/stagehand/releases):
4949

50-
1. Find the latest `stagehand/server vX.X.X` release
50+
1. Find the latest `stagehand/server-v3 vX.X.X` release
5151
2. Download the binary for your platform:
52-
- macOS ARM: `stagehand-server-darwin-arm64`
53-
- macOS Intel: `stagehand-server-darwin-x64`
54-
- Linux: `stagehand-server-linux-x64` or `stagehand-server-linux-arm64`
55-
- Windows: `stagehand-server-win32-x64.exe` or `stagehand-server-win32-arm64.exe`
52+
- macOS ARM: `stagehand-server-v3-darwin-arm64`
53+
- macOS Intel: `stagehand-server-v3-darwin-x64`
54+
- Linux: `stagehand-server-v3-linux-x64` or `stagehand-server-v3-linux-arm64`
55+
- Windows: `stagehand-server-v3-win32-x64.exe` or `stagehand-server-v3-win32-arm64.exe`
5656
3. Rename it to match the expected format (remove `-server` from the name):
5757
- `stagehand-darwin-arm64`, `stagehand-linux-x64`, `stagehand-win32-x64.exe`, etc.
5858
4. Place it in `bin/sea/` directory

RELEASE_WORKFLOWS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ This repo publishes the `stagehand` Python package to PyPI when a **GitHub Relea
1111
- Publishes the GitHub Release + git tag.
1212
4. Wait for GitHub Actions to publish to PyPI (automatic).
1313
- Trigger: GitHub Release `published` event runs `.github/workflows/publish-pypi.yml`.
14-
- Builds platform wheels that embed the Stagehand server binary (downloaded from the latest `stagehand-server/v*` GitHub Release in `browserbase/stagehand`), then publishes to PyPI.
14+
- Builds platform wheels that embed the Stagehand server binary (downloaded from the latest `stagehand-server-v3/v*` GitHub Release in `browserbase/stagehand`), then publishes to PyPI.
1515

1616
## Important implementation notes
1717

1818
- **Server binary bundling into wheels**
19-
- `.github/workflows/publish-pypi.yml` downloads the prebuilt Stagehand server SEA binary from the latest `stagehand-server/v*` GitHub Release in `browserbase/stagehand`, then places it into `src/stagehand/_sea/*` before running `uv build --wheel`.
19+
- `.github/workflows/publish-pypi.yml` downloads the prebuilt Stagehand server SEA binary from the latest `stagehand-server-v3/v*` GitHub Release in `browserbase/stagehand`, then places it into `src/stagehand/_sea/*` before running `uv build --wheel`.
2020
- **Stagehand server version selection (current behavior)**
21-
- `publish-pypi.yml` resolves the latest GitHub Release tag matching `stagehand-server/v*` from `browserbase/stagehand` and downloads the matching `stagehand-server-<platform>` release asset for each wheel build.
21+
- `publish-pypi.yml` resolves the latest GitHub Release tag matching `stagehand-server-v3/v*` from `browserbase/stagehand` and downloads the matching `stagehand-server-v3-<platform>` release asset for each wheel build.
2222
- **Secrets**
2323
- PyPI publish uses `secrets.STAGEHAND_PYPI_TOKEN || secrets.PYPI_TOKEN`.
2424
- `.github/workflows/release-doctor.yml` runs `bin/check-release-environment` on qualifying PRs and fails if `PYPI_TOKEN` is missing.

scripts/download-binary.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
Download the stagehand-server binary for local development.
3+
Download the stagehand-server-v3 binary for local development.
44
55
This script downloads the appropriate binary for your platform from GitHub releases
66
and places it in bin/sea/ for use during development and testing.
@@ -43,7 +43,7 @@ def get_platform_info() -> tuple[str, str]:
4343

4444
def get_binary_filename(plat: str, arch: str) -> str:
4545
"""Get the expected binary filename for this platform."""
46-
name = f"stagehand-server-{plat}-{arch}"
46+
name = f"stagehand-server-v3-{plat}-{arch}"
4747
return name + (".exe" if plat == "win32" else "")
4848

4949

@@ -53,11 +53,11 @@ def get_local_filename(plat: str, arch: str) -> str:
5353
return name + (".exe" if plat == "win32" else "")
5454

5555
def _parse_server_tag(tag: str) -> tuple[int, int, int] | None:
56-
# Expected: stagehand-server/vX.Y.Z
57-
if not tag.startswith("stagehand-server/v"):
56+
# Expected: stagehand-server-v3/vX.Y.Z
57+
if not tag.startswith("stagehand-server-v3/v"):
5858
return None
5959

60-
ver = tag.removeprefix("stagehand-server/v")
60+
ver = tag.removeprefix("stagehand-server-v3/v")
6161
# Drop any pre-release/build metadata (we only expect stable tags here).
6262
ver = ver.split("-", 1)[0].split("+", 1)[0]
6363
parts = ver.split(".")
@@ -86,7 +86,7 @@ def _http_get_json(url: str) -> Any:
8686

8787

8888
def resolve_latest_server_tag() -> str:
89-
"""Resolve the latest stagehand-server/v* tag from GitHub releases."""
89+
"""Resolve the latest stagehand-server-v3/v* tag from GitHub releases."""
9090
repo = "browserbase/stagehand"
9191
releases_url = f"https://api.github.com/repos/{repo}/releases?per_page=100"
9292
try:
@@ -113,7 +113,7 @@ def resolve_latest_server_tag() -> str:
113113
best = (parsed, tag)
114114

115115
if best is None:
116-
raise RuntimeError("No stagehand-server/v* GitHub Releases found for browserbase/stagehand")
116+
raise RuntimeError("No stagehand-server-v3/v* GitHub Releases found for browserbase/stagehand")
117117

118118
return best[1]
119119

@@ -126,7 +126,7 @@ def download_binary(version: str) -> None:
126126

127127
# GitHub release URL
128128
repo = "browserbase/stagehand"
129-
tag = version if version.startswith("stagehand-server/v") else f"stagehand-server/{version}"
129+
tag = version if version.startswith("stagehand-server-v3/v") else f"stagehand-server-v3/{version}"
130130
url = f"https://github.com/{repo}/releases/download/{tag}/{binary_filename}"
131131

132132
# Destination path
@@ -186,13 +186,13 @@ def main() -> None:
186186
Examples:
187187
python scripts/download-binary.py
188188
python scripts/download-binary.py --version v3.2.0
189-
python scripts/download-binary.py --version stagehand-server/v3.2.0
189+
python scripts/download-binary.py --version stagehand-server-v3/v3.2.0
190190
""",
191191
)
192192
parser.add_argument(
193193
"--version",
194194
default=None,
195-
help="Stagehand server release tag/version to download (e.g. v3.2.0 or stagehand-server/v3.2.0). Defaults to latest stagehand-server/* GitHub Release.",
195+
help="Stagehand server release tag/version to download (e.g. v3.2.0 or stagehand-server-v3/v3.2.0). Defaults to latest stagehand-server-v3/* GitHub Release.",
196196
)
197197

198198
args = parser.parse_args()

0 commit comments

Comments
 (0)