Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fa2456e
chore: sync repo
stainless-app[bot] Jan 20, 2026
23c5201
chore: update SDK settings
stainless-app[bot] Jan 26, 2026
d54c240
chore: update SDK settings
stainless-app[bot] Jan 27, 2026
203b546
codegen metadata
stainless-app[bot] Jan 13, 2026
66d0f45
chore(internal): version bump
stainless-app[bot] Jan 27, 2026
ae2f587
feat(client): add support for binary request streaming
stainless-app[bot] Jan 14, 2026
3dac57a
feat(api): manual updates
stainless-app[bot] Jan 14, 2026
f0e9667
chore(internal): version bump
stainless-app[bot] Jan 15, 2026
b9ac3fe
codegen metadata
stainless-app[bot] Jan 15, 2026
6e87413
codegen metadata
stainless-app[bot] Jan 15, 2026
82f9f7b
codegen metadata
stainless-app[bot] Jan 15, 2026
33fb088
codegen metadata
stainless-app[bot] Jan 15, 2026
63b020c
codegen metadata
stainless-app[bot] Jan 15, 2026
1294bc4
codegen metadata
stainless-app[bot] Jan 15, 2026
2075526
codegen metadata
stainless-app[bot] Jan 15, 2026
6d46ed2
feat: x-stainless-any fix, optional frame id, ModelConfigString fix
stainless-app[bot] Jan 27, 2026
ec86e3c
codegen metadata
stainless-app[bot] Jan 16, 2026
bda97bc
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 17, 2026
106cc07
codegen metadata
stainless-app[bot] Jan 20, 2026
3f5b25c
feat: move Stainless compatibility transforms from gen-openapi.ts int…
stainless-app[bot] Jan 27, 2026
ba74968
feat: End endpoint cleanup
stainless-app[bot] Jan 27, 2026
b32a290
feat: [feat]: add support for local caching of agent when using api (2)
stainless-app[bot] Jan 21, 2026
64847ef
feat: add v3 integration tests matching cloud exactly
stainless-app[bot] Jan 27, 2026
fb4c3f9
feat: Include replay endpoint in stainless spec so SDK clients can ge…
stainless-app[bot] Jan 22, 2026
24ede05
feat(api): manual updates
stainless-app[bot] Jan 27, 2026
396a905
release: 3.5.0
stainless-app[bot] Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand All @@ -41,7 +41,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand All @@ -57,7 +57,7 @@ jobs:
- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/stagehand-python'
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

Expand All @@ -75,7 +75,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand Down
119 changes: 79 additions & 40 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ name: Publish PyPI

on:
workflow_dispatch:
inputs:
stagehand_tag:
description: "Stagehand repo git ref to build SEA binaries from (e.g. @browserbasehq/stagehand@3.0.6)"
required: true
type: string
inputs: {}

release:
types: [published]
Expand Down Expand Up @@ -42,46 +38,45 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.13"

- name: Checkout stagehand (server source)
uses: actions/checkout@v4
with:
repository: browserbase/stagehand
ref: ${{ inputs.stagehand_tag || vars.STAGEHAND_TAG }}
path: _stagehand
fetch-depth: 1
# If browserbase/stagehand is private, set STAGEHAND_SOURCE_TOKEN (PAT) in this repo.
token: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}

- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Resolve latest stagehand/server release
id: stagehand-server-release
uses: actions/github-script@v6
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "23"
cache: "pnpm"
cache-dependency-path: _stagehand/pnpm-lock.yaml

- name: Build SEA server binary (from source)
github-token: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}
script: |
const { data } = await github.rest.repos.listReleases({
owner: 'browserbase',
repo: 'stagehand',
per_page: 100,
});
const release = data.find(r => typeof r.tag_name === 'string' && r.tag_name.startsWith('stagehand-server/v'));
if (!release) {
core.setFailed('No stagehand-server/v* release found in browserbase/stagehand');
return;
}
core.info(`Using stagehand/server release tag: ${release.tag_name}`);
core.setOutput('tag', release.tag_name);
core.setOutput('id', String(release.id));

- name: Download stagehand/server SEA binary (from GitHub Release assets)
env:
GH_TOKEN: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}
RELEASE_TAG: ${{ steps.stagehand-server-release.outputs.tag }}
RELEASE_ID: ${{ steps.stagehand-server-release.outputs.id }}
ASSET_NAME: ${{ matrix.binary_name }}
OUTPUT_PATH: ${{ matrix.output_path }}
shell: bash
run: |
set -euo pipefail

if [[ -z "${{ inputs.stagehand_tag }}" && -z "${{ vars.STAGEHAND_TAG }}" ]]; then
echo "Missing stagehand ref: set repo variable STAGEHAND_TAG or provide workflow input stagehand_tag." >&2
exit 1
fi

# Ensure we only ship the binary built for this runner's OS/arch.
# Ensure we only ship the binary for this runner's OS/arch.
python - <<'PY'
from pathlib import Path
sea_dir = Path("src/stagehand/_sea")
Expand All @@ -92,19 +87,63 @@ jobs:
p.unlink(missing_ok=True)
PY

pushd _stagehand >/dev/null
pnpm install --frozen-lockfile
CI=true pnpm --filter @browserbasehq/stagehand-server build:binary
popd >/dev/null
echo "Downloading ${ASSET_NAME} from browserbase/stagehand@${RELEASE_TAG}"

cp "_stagehand/packages/server/dist/sea/${{ matrix.binary_name }}" "${{ matrix.output_path }}"
chmod +x "${{ matrix.output_path }}" 2>/dev/null || true
url="$(
curl -fsSL \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/browserbase/stagehand/releases/${RELEASE_ID}" \
| python -c 'import json,sys; d=json.load(sys.stdin); a=next((x for x in d.get("assets",[]) if x.get("name")==sys.argv[1]), None); print(a.get("url","") if a else "")' \
"${ASSET_NAME}"
)"

if [ -z "${url}" ]; then
echo "Release asset not found: ${ASSET_NAME} (tag=${RELEASE_TAG})" >&2
exit 1
fi

mkdir -p "$(dirname "${OUTPUT_PATH}")"
curl -fsSL \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/octet-stream" \
"${url}" \
-o "${OUTPUT_PATH}"

chmod +x "${OUTPUT_PATH}" 2>/dev/null || true
rm -f src/stagehand/_sea/.keep || true

- name: Build wheel
env:
STAGEHAND_WHEEL_TAG: py3-none-${{ matrix.wheel_platform_tag }}
run: uv build --wheel

- name: Log SEA contents
shell: bash
run: |
echo "Contents of src/stagehand/_sea/"
ls -al src/stagehand/_sea || true
python - <<'PY'
import pathlib, zipfile, collections, sys
had_error = False
for wheel in sorted(pathlib.Path("dist").glob("*.whl")):
print(f"Contents of {wheel.name} entries matching stagehand/_sea")
with zipfile.ZipFile(wheel, "r") as zf:
names = [info.filename for info in zf.infolist()]
counts = collections.Counter(names)
dups = sorted([name for name, n in counts.items() if n > 1])
for info in zf.infolist():
if "stagehand/_sea/" in info.filename:
print(info.filename)
if dups:
had_error = True
print("ERROR: duplicate zip entries detected:")
for name in dups:
print(f" {counts[name]}x {name}")
if had_error:
sys.exit(1)
PY

- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Doctor
on:
pull_request:
branches:
- main
- stainless
workflow_dispatch:

jobs:
Expand All @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'browserbase/stagehand-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.1"
}
".": "3.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-419940ce988c43313660d30a5bb5b5c2d89b3b19a0f80fe050331e0f4e8c58d2.yml
openapi_spec_hash: a621ca69697ebba7286cbf9e475c46ad
config_hash: 1f709f8775e13029dc60064ef3a94355
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-089c8670f1d7c2e9fa8e5c97010db7c24b8f162eb7cfe76ffa41d70fa46efe2f.yml
openapi_spec_hash: 7a226aee8f3f2ab16febbe6bb35e1657
config_hash: 242651c4871c2869ba3c2e3d337505b9
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,95 @@
# Changelog

## 3.5.0 (2026-01-27)

Full Changelog: [v3.4.7...v3.5.0](https://github.com/browserbase/stagehand-python/compare/v3.4.7...v3.5.0)

### Features

* [feat]: add support for local caching of agent when using api (2) ([b32a290](https://github.com/browserbase/stagehand-python/commit/b32a29086b5d996556aaf9fabdf3eed769197f3b))
* add v3 integration tests matching cloud exactly ([64847ef](https://github.com/browserbase/stagehand-python/commit/64847ef9e065b3fda3acaadcc87fa36c607d5ab1))
* **api:** manual updates ([24ede05](https://github.com/browserbase/stagehand-python/commit/24ede050f05061573865fe5d51922155935f7b62))
* **api:** manual updates ([3dac57a](https://github.com/browserbase/stagehand-python/commit/3dac57a7fa654b30938f623c9a1d336afa5c04a6))
* **client:** add support for binary request streaming ([ae2f587](https://github.com/browserbase/stagehand-python/commit/ae2f5873f090eeb6a564d8fd54378347725a8ae7))
* End endpoint cleanup ([ba74968](https://github.com/browserbase/stagehand-python/commit/ba74968c8b1543d3edf57779b7592f1a3ecb965b))
* Include replay endpoint in stainless spec so SDK clients can get run metrics ([fb4c3f9](https://github.com/browserbase/stagehand-python/commit/fb4c3f9f0e118a155d4b74877d2ebb1540881b59))
* move Stainless compatibility transforms from gen-openapi.ts into stainless.yml ([3f5b25c](https://github.com/browserbase/stagehand-python/commit/3f5b25cfea25801870c43d1598c671ffa7cc9932))
* x-stainless-any fix, optional frame id, ModelConfigString fix ([6d46ed2](https://github.com/browserbase/stagehand-python/commit/6d46ed2cd9e4b82eb3753eb524d9d52b033e6351))


### Chores

* **internal:** update `actions/checkout` version ([bda97bc](https://github.com/browserbase/stagehand-python/commit/bda97bca74f981ec3fa2626c552bb52d9cb79cc0))
* **internal:** version bump ([f0e9667](https://github.com/browserbase/stagehand-python/commit/f0e9667cab4f0ea074341fbbaae16a5b0a7e3ec9))
* **internal:** version bump ([66d0f45](https://github.com/browserbase/stagehand-python/commit/66d0f4544e2d8e72d316b55507d7967adcef4456))
* sync repo ([fa2456e](https://github.com/browserbase/stagehand-python/commit/fa2456eeec78a5b05d2e9cf9c9aad3f287e83e59))
* update SDK settings ([d54c240](https://github.com/browserbase/stagehand-python/commit/d54c24082b66853485fc4307e985b6c9a5f21d31))
* update SDK settings ([23c5201](https://github.com/browserbase/stagehand-python/commit/23c520167bc3931c44348d5feceba075176f127a))

## 3.4.7 (2026-01-15)

Full Changelog: [v3.4.6...v3.4.7](https://github.com/browserbase/stagehand-python/compare/v3.4.6...v3.4.7)

## 3.4.6 (2026-01-13)

Full Changelog: [v3.4.5...v3.4.6](https://github.com/browserbase/stagehand-python/compare/v3.4.5...v3.4.6)

### Chores

* remove duplicate .keep files for pypi publish step fix ([5235658](https://github.com/browserbase/stagehand-python/commit/5235658b9360362d70d9154a96b53fe69167101d))

## 3.4.5 (2026-01-13)

Full Changelog: [v3.4.4...v3.4.5](https://github.com/browserbase/stagehand-python/compare/v3.4.4...v3.4.5)

### Chores

* windows logging/build fix ([5ed0e5f](https://github.com/browserbase/stagehand-python/commit/5ed0e5f633082295b1ab17af9291d6efc863d25d))

## 3.4.4 (2026-01-13)

Full Changelog: [v3.4.3...v3.4.4](https://github.com/browserbase/stagehand-python/compare/v3.4.3...v3.4.4)

### Chores

* publish-pypi lint fix ([71abdc6](https://github.com/browserbase/stagehand-python/commit/71abdc6f805c95f42da7c74dde961209a58290e7))

## 3.4.3 (2026-01-13)

Full Changelog: [v3.4.2...v3.4.3](https://github.com/browserbase/stagehand-python/compare/v3.4.2...v3.4.3)

### Chores

* force-include SEA binaries in wheel ([301147c](https://github.com/browserbase/stagehand-python/commit/301147ce8f7fde3726e04efaaecfcdc5755b7683))

## 3.4.2 (2026-01-13)

Full Changelog: [v3.4.1...v3.4.2](https://github.com/browserbase/stagehand-python/compare/v3.4.1...v3.4.2)

### Chores

* sync repo ([2d4bd0a](https://github.com/browserbase/stagehand-python/commit/2d4bd0aee5a1f03ed09473a43f5607871f05c7ee))

## [3.4.1](https://github.com/browserbase/stagehand-python/compare/v0.4.0...v3.4.1) (2026-01-13)


### Documentation

* refresh README for release ([41926c7](https://github.com/browserbase/stagehand-python/commit/41926c77f9f8ffcca32c341a33d50dc731e1d84a))

## [0.4.0](https://github.com/browserbase/stagehand-python/compare/v0.3.1...v0.4.0) (2026-01-13)


### Features

* don't close new opened tabs ([#161](https://github.com/browserbase/stagehand-python/issues/161)) ([#169](https://github.com/browserbase/stagehand-python/issues/169)) ([f68e86c](https://github.com/browserbase/stagehand-python/commit/f68e86c90d9e5f30d2f447ada65cc711ac531baa))


### Bug Fixes

* active page context ([#251](https://github.com/browserbase/stagehand-python/issues/251)) ([d61e118](https://github.com/browserbase/stagehand-python/commit/d61e118ccc8845ac95e4579f6137a91abb004943))
* set injected Stagehand cursor position to fixed for correct viewport tracking ([#121](https://github.com/browserbase/stagehand-python/issues/121)) ([#122](https://github.com/browserbase/stagehand-python/issues/122)) ([93c16e3](https://github.com/browserbase/stagehand-python/commit/93c16e392d754227f9bec47ee9d9f26046bfb770))

## 0.3.1 (2026-01-13)

Full Changelog: [v0.3.0...v0.3.1](https://github.com/browserbase/stagehand-python/compare/v0.3.0...v0.3.1)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If you’d like to use the repository from source, you can either install from g
To install via git:

```sh
uv run pip install git+ssh://git@github.com/browserbase/stagehand-python#stainless.git
$ uv run pip install git+ssh://git@github.com/browserbase/stagehand-python.git
```

Alternatively, you can build from source and install the wheel file:
Expand Down
Loading
Loading