Skip to content

Commit 033e0ba

Browse files
chore: sync repo
1 parent abd9305 commit 033e0ba

47 files changed

Lines changed: 1541 additions & 789 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ github.repository == 'stainless-sdks/stagehand-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2020
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2323

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

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

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

8080
- name: Install uv
8181
uses: astral-sh/setup-uv@v5

.github/workflows/publish-pypi.yml

Lines changed: 79 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: Publish PyPI
44

55
on:
66
workflow_dispatch:
7-
inputs:
8-
stagehand_tag:
9-
description: "Stagehand repo git ref to build SEA binaries from (e.g. @browserbasehq/stagehand@3.0.6)"
10-
required: true
11-
type: string
7+
inputs: {}
128

139
release:
1410
types: [published]
@@ -42,46 +38,45 @@ jobs:
4238
contents: read
4339

4440
steps:
45-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
4642

4743
- name: Install uv
4844
uses: astral-sh/setup-uv@v5
4945
with:
5046
version: "0.9.13"
5147

52-
- name: Checkout stagehand (server source)
53-
uses: actions/checkout@v4
54-
with:
55-
repository: browserbase/stagehand
56-
ref: ${{ inputs.stagehand_tag || vars.STAGEHAND_TAG }}
57-
path: _stagehand
58-
fetch-depth: 1
59-
# If browserbase/stagehand is private, set STAGEHAND_SOURCE_TOKEN (PAT) in this repo.
60-
token: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}
61-
62-
- name: Setup pnpm
63-
uses: pnpm/action-setup@v4
48+
- name: Resolve latest stagehand/server release
49+
id: stagehand-server-release
50+
uses: actions/github-script@v6
6451
with:
65-
version: 9
66-
67-
- name: Setup Node.js
68-
uses: actions/setup-node@v4
69-
with:
70-
node-version: "23"
71-
cache: "pnpm"
72-
cache-dependency-path: _stagehand/pnpm-lock.yaml
73-
74-
- name: Build SEA server binary (from source)
52+
github-token: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}
53+
script: |
54+
const { data } = await github.rest.repos.listReleases({
55+
owner: 'browserbase',
56+
repo: 'stagehand',
57+
per_page: 100,
58+
});
59+
const release = data.find(r => typeof r.tag_name === 'string' && r.tag_name.startsWith('stagehand-server/v'));
60+
if (!release) {
61+
core.setFailed('No stagehand-server/v* release found in browserbase/stagehand');
62+
return;
63+
}
64+
core.info(`Using stagehand/server release tag: ${release.tag_name}`);
65+
core.setOutput('tag', release.tag_name);
66+
core.setOutput('id', String(release.id));
67+
68+
- name: Download stagehand/server SEA binary (from GitHub Release assets)
69+
env:
70+
GH_TOKEN: ${{ secrets.STAGEHAND_SOURCE_TOKEN || github.token }}
71+
RELEASE_TAG: ${{ steps.stagehand-server-release.outputs.tag }}
72+
RELEASE_ID: ${{ steps.stagehand-server-release.outputs.id }}
73+
ASSET_NAME: ${{ matrix.binary_name }}
74+
OUTPUT_PATH: ${{ matrix.output_path }}
7575
shell: bash
7676
run: |
7777
set -euo pipefail
7878
79-
if [[ -z "${{ inputs.stagehand_tag }}" && -z "${{ vars.STAGEHAND_TAG }}" ]]; then
80-
echo "Missing stagehand ref: set repo variable STAGEHAND_TAG or provide workflow input stagehand_tag." >&2
81-
exit 1
82-
fi
83-
84-
# Ensure we only ship the binary built for this runner's OS/arch.
79+
# Ensure we only ship the binary for this runner's OS/arch.
8580
python - <<'PY'
8681
from pathlib import Path
8782
sea_dir = Path("src/stagehand/_sea")
@@ -92,19 +87,63 @@ jobs:
9287
p.unlink(missing_ok=True)
9388
PY
9489
95-
pushd _stagehand >/dev/null
96-
pnpm install --frozen-lockfile
97-
CI=true pnpm --filter @browserbasehq/stagehand-server build:binary
98-
popd >/dev/null
90+
echo "Downloading ${ASSET_NAME} from browserbase/stagehand@${RELEASE_TAG}"
9991
100-
cp "_stagehand/packages/server/dist/sea/${{ matrix.binary_name }}" "${{ matrix.output_path }}"
101-
chmod +x "${{ matrix.output_path }}" 2>/dev/null || true
92+
url="$(
93+
curl -fsSL \
94+
-H "Authorization: Bearer ${GH_TOKEN}" \
95+
-H "Accept: application/vnd.github+json" \
96+
"https://api.github.com/repos/browserbase/stagehand/releases/${RELEASE_ID}" \
97+
| 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 "")' \
98+
"${ASSET_NAME}"
99+
)"
100+
101+
if [ -z "${url}" ]; then
102+
echo "Release asset not found: ${ASSET_NAME} (tag=${RELEASE_TAG})" >&2
103+
exit 1
104+
fi
105+
106+
mkdir -p "$(dirname "${OUTPUT_PATH}")"
107+
curl -fsSL \
108+
-H "Authorization: Bearer ${GH_TOKEN}" \
109+
-H "Accept: application/octet-stream" \
110+
"${url}" \
111+
-o "${OUTPUT_PATH}"
112+
113+
chmod +x "${OUTPUT_PATH}" 2>/dev/null || true
114+
rm -f src/stagehand/_sea/.keep || true
102115
103116
- name: Build wheel
104117
env:
105118
STAGEHAND_WHEEL_TAG: py3-none-${{ matrix.wheel_platform_tag }}
106119
run: uv build --wheel
107120

121+
- name: Log SEA contents
122+
shell: bash
123+
run: |
124+
echo "Contents of src/stagehand/_sea/"
125+
ls -al src/stagehand/_sea || true
126+
python - <<'PY'
127+
import pathlib, zipfile, collections, sys
128+
had_error = False
129+
for wheel in sorted(pathlib.Path("dist").glob("*.whl")):
130+
print(f"Contents of {wheel.name} entries matching stagehand/_sea")
131+
with zipfile.ZipFile(wheel, "r") as zf:
132+
names = [info.filename for info in zf.infolist()]
133+
counts = collections.Counter(names)
134+
dups = sorted([name for name, n in counts.items() if n > 1])
135+
for info in zf.infolist():
136+
if "stagehand/_sea/" in info.filename:
137+
print(info.filename)
138+
if dups:
139+
had_error = True
140+
print("ERROR: duplicate zip entries detected:")
141+
for name in dups:
142+
print(f" {counts[name]}x {name}")
143+
if had_error:
144+
sys.exit(1)
145+
PY
146+
108147
- name: Upload wheel artifact
109148
uses: actions/upload-artifact@v4
110149
with:

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
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')
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616

1717
- name: Check release environment
1818
run: |

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.1"
3-
}
2+
".": "3.5.0"
3+
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-419940ce988c43313660d30a5bb5b5c2d89b3b19a0f80fe050331e0f4e8c58d2.yml
3-
openapi_spec_hash: a621ca69697ebba7286cbf9e475c46ad
4-
config_hash: 1f709f8775e13029dc60064ef3a94355
1+
configured_endpoints: 8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-43e6dd4ce19381de488d296e9036fea15bfea9a6f946cf8ccf4e02aecc8fb765.yml
3+
openapi_spec_hash: f736e7a8acea0d73e1031c86ea803246
4+
config_hash: b375728ccf7d33287335852f4f59c293

CHANGELOG.md

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

3+
## 3.5.0 (2026-01-29)
4+
5+
Full Changelog: [v3.4.8...v3.5.0](https://github.com/browserbase/stagehand-python/compare/v3.4.8...v3.5.0)
6+
7+
### Features
8+
9+
* add auto-bedrock support based on bedrock/provider.model-name ([eaded9f](https://github.com/browserbase/stagehand-python/commit/eaded9ffb050c297b86223c333044d8c22dd3cf4))
10+
* Update stainless.yml for project and publish settings ([f90c553](https://github.com/browserbase/stagehand-python/commit/f90c55378c03c18215d1cdc153f84d587e5048b0))
11+
12+
13+
### Bug Fixes
14+
15+
* **docs:** fix mcp installation instructions for remote servers ([85f8584](https://github.com/browserbase/stagehand-python/commit/85f85840c9e9de4c0c1b07ec1ef41936788ea88b))
16+
17+
18+
### Chores
19+
20+
* **internal:** version bump ([d227b02](https://github.com/browserbase/stagehand-python/commit/d227b0213aa729243fbc56d818a808536b98b191))
21+
* update SDK settings ([879b799](https://github.com/browserbase/stagehand-python/commit/879b7990e8095ca106bf9553159d6c7a01936ec9))
22+
23+
## 3.4.8 (2026-01-27)
24+
25+
Full Changelog: [v3.4.7...v3.4.8](https://github.com/browserbase/stagehand-python/compare/v3.4.7...v3.4.8)
26+
27+
### Chores
28+
29+
* sync repo ([efaf774](https://github.com/browserbase/stagehand-python/commit/efaf774f0dbd93db8e15e5c3800d62dd7670006c))
30+
31+
## 3.4.7 (2026-01-15)
32+
33+
Full Changelog: [v3.4.6...v3.4.7](https://github.com/browserbase/stagehand-python/compare/v3.4.6...v3.4.7)
34+
35+
## 3.4.6 (2026-01-13)
36+
37+
Full Changelog: [v3.4.5...v3.4.6](https://github.com/browserbase/stagehand-python/compare/v3.4.5...v3.4.6)
38+
39+
### Chores
40+
41+
* remove duplicate .keep files for pypi publish step fix ([5235658](https://github.com/browserbase/stagehand-python/commit/5235658b9360362d70d9154a96b53fe69167101d))
42+
43+
## 3.4.5 (2026-01-13)
44+
45+
Full Changelog: [v3.4.4...v3.4.5](https://github.com/browserbase/stagehand-python/compare/v3.4.4...v3.4.5)
46+
47+
### Chores
48+
49+
* windows logging/build fix ([5ed0e5f](https://github.com/browserbase/stagehand-python/commit/5ed0e5f633082295b1ab17af9291d6efc863d25d))
50+
51+
## 3.4.4 (2026-01-13)
52+
53+
Full Changelog: [v3.4.3...v3.4.4](https://github.com/browserbase/stagehand-python/compare/v3.4.3...v3.4.4)
54+
55+
### Chores
56+
57+
* publish-pypi lint fix ([71abdc6](https://github.com/browserbase/stagehand-python/commit/71abdc6f805c95f42da7c74dde961209a58290e7))
58+
59+
## 3.4.3 (2026-01-13)
60+
61+
Full Changelog: [v3.4.2...v3.4.3](https://github.com/browserbase/stagehand-python/compare/v3.4.2...v3.4.3)
62+
63+
### Chores
64+
65+
* force-include SEA binaries in wheel ([301147c](https://github.com/browserbase/stagehand-python/commit/301147ce8f7fde3726e04efaaecfcdc5755b7683))
66+
67+
## 3.4.2 (2026-01-13)
68+
69+
Full Changelog: [v3.4.1...v3.4.2](https://github.com/browserbase/stagehand-python/compare/v3.4.1...v3.4.2)
70+
71+
### Chores
72+
73+
* sync repo ([2d4bd0a](https://github.com/browserbase/stagehand-python/commit/2d4bd0aee5a1f03ed09473a43f5607871f05c7ee))
74+
75+
## [3.4.1](https://github.com/browserbase/stagehand-python/compare/v0.4.0...v3.4.1) (2026-01-13)
76+
77+
78+
### Documentation
79+
80+
* refresh README for release ([41926c7](https://github.com/browserbase/stagehand-python/commit/41926c77f9f8ffcca32c341a33d50dc731e1d84a))
81+
82+
## [0.4.0](https://github.com/browserbase/stagehand-python/compare/v0.3.1...v0.4.0) (2026-01-13)
83+
84+
85+
### Features
86+
87+
* 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))
88+
89+
90+
### Bug Fixes
91+
92+
* active page context ([#251](https://github.com/browserbase/stagehand-python/issues/251)) ([d61e118](https://github.com/browserbase/stagehand-python/commit/d61e118ccc8845ac95e4579f6137a91abb004943))
93+
* 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))
94+
395
## 0.3.1 (2026-01-13)
496

597
Full Changelog: [v0.3.0...v0.3.1](https://github.com/browserbase/stagehand-python/compare/v0.3.0...v0.3.1)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If you’d like to use the repository from source, you can either install from g
9191
To install via git:
9292

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

9797
Alternatively, you can build from source and install the wheel file:

0 commit comments

Comments
 (0)