Skip to content

Commit 1a81fea

Browse files
committed
Merge branch 'main' into contrib/132
2 parents 4ee3a33 + 1bef512 commit 1a81fea

Some content is hidden

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

47 files changed

+2431
-171
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Fix stagehand.metrics on env:BROWSERBASE
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Fix max_steps parsing for agent execute options
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Fix openai-litellm dependency bug
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Multi-tab support
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
added regression tests
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Fix temperature setting for GPT-5 family of models
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Added frame_id_map to support multi-tab handling on API

.github/workflows/changesets.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
cat pr-description.md >> $GITHUB_ENV
7070
echo "EOF" >> $GITHUB_ENV
7171
rm pr-description.md
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7274

7375
- name: Bump versions
7476
if: steps.check_changesets.outputs.has_changesets == 'true'

.github/workflows/feature-parity.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
owner: context.repo.owner,
4848
repo: context.repo.repo,
4949
issue_number: context.issue.number,
50-
body: `❌ **Parity Label Removed**\n\n@${context.actor}, you do not have sufficient permissions to add the 'parity' label. Only users with write access can trigger feature parity issues.\n\nIf you believe this feature should be implemented in the Python SDK, please ask a maintainer to add the label.`
50+
body: `❌ **Parity Label Removed**\n\n@${context.actor}, you do not have sufficient permissions to add the 'parity' label. Only users with write access can trigger feature parity issues.\n\nIf you believe this feature should be implemented in the Typescript SDK, please ask a maintainer to add the label.`
5151
});
5252
5353
throw new Error(`User ${context.actor} does not have write access to add parity label`);
@@ -62,7 +62,7 @@ jobs:
6262
app-id: ${{ secrets.PARITY_APP_ID }}
6363
private-key: ${{ secrets.PARITY_APP_PRIVATE_KEY }}
6464
owner: browserbase
65-
repositories: stagehand
65+
repositories: stagehand-python
6666

6767
- name: Create issue in Python SDK repository
6868
uses: actions/github-script@v7
@@ -104,7 +104,7 @@ jobs:
104104
const issueTitle = `[Feature Parity] ${pullRequest.title}`;
105105
const issueBody = `## Feature Parity Request
106106
107-
This issue was automatically created from a pull request in the TypeScript Stagehand repository that was labeled with 'parity'.
107+
This issue was automatically created from a pull request in the Python Stagehand repository that was labeled with 'parity'.
108108
109109
### Original PR Details
110110
- **PR**: #${context.issue.number} - ${pullRequest.title}
@@ -120,12 +120,12 @@ jobs:
120120
${commentsSection}
121121
122122
### Action Required
123-
Please review the changes in the original PR and implement equivalent functionality in the Python SDK if applicable.
123+
Please review the changes in the original PR and implement equivalent functionality in the Typescript SDK if applicable.
124124
125125
---
126126
*This issue was automatically generated by the Feature Parity workflow.*`;
127127
128-
// Create the issue in the Python repository
128+
// Create the issue in the Typescript repository
129129
const { data: issue } = await github.rest.issues.create({
130130
owner: 'browserbase',
131131
repo: 'stagehand',
@@ -141,5 +141,5 @@ jobs:
141141
owner: context.repo.owner,
142142
repo: context.repo.repo,
143143
issue_number: context.issue.number,
144-
body: `🔄 **Feature Parity Issue Created**\n\nAn issue has been automatically created in the Python SDK repository to track parity implementation:\n${issue.html_url}`
144+
body: `🔄 **Feature Parity Issue Created**\n\nAn issue has been automatically created in the Typescript SDK repository to track parity implementation:\n${issue.html_url}`
145145
});

.github/workflows/test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,66 @@ jobs:
180180
name: smoke-test-results
181181
path: junit-smoke.xml
182182

183+
test-regression:
184+
name: Regression Tests
185+
runs-on: ubuntu-latest
186+
needs: test-unit
187+
if: |
188+
contains(github.event.pull_request.labels.*.name, 'test-regression') ||
189+
contains(github.event.pull_request.labels.*.name, 'regression')
190+
191+
steps:
192+
- uses: actions/checkout@v4
193+
194+
- name: Set up Python 3.11
195+
uses: actions/setup-python@v4
196+
with:
197+
python-version: "3.11"
198+
199+
- name: Install system dependencies
200+
run: |
201+
sudo apt-get update
202+
sudo apt-get install -y xvfb
203+
204+
- name: Install dependencies
205+
run: |
206+
python -m pip install --upgrade pip
207+
pip install -e ".[dev]"
208+
pip install jsonschema
209+
playwright install chromium
210+
playwright install-deps chromium
211+
212+
- name: Run regression tests
213+
run: |
214+
xvfb-run -a pytest tests/ -v \
215+
--cov=stagehand \
216+
--cov-report=xml \
217+
--junit-xml=junit-regression.xml \
218+
-m "regression" \
219+
--tb=short \
220+
--maxfail=10
221+
env:
222+
BROWSERBASE_API_KEY: ${{ secrets.BROWSERBASE_API_KEY || 'mock-api-key' }}
223+
BROWSERBASE_PROJECT_ID: ${{ secrets.BROWSERBASE_PROJECT_ID || 'mock-project-id' }}
224+
MODEL_API_KEY: ${{ secrets.MODEL_API_KEY || 'mock-model-key' }}
225+
STAGEHAND_API_URL: ${{ secrets.STAGEHAND_API_URL || 'http://localhost:3000' }}
226+
227+
- name: Upload regression test results
228+
uses: actions/upload-artifact@v4
229+
if: always()
230+
with:
231+
name: regression-test-results
232+
path: junit-regression.xml
233+
234+
- name: Upload coverage data
235+
uses: actions/upload-artifact@v4
236+
if: always()
237+
with:
238+
name: coverage-data-regression
239+
path: |
240+
.coverage
241+
coverage.xml
242+
183243
test-e2e:
184244
name: End-to-End Tests
185245
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)