From 4bd5bc18564ec6cf777ee9953efa72fe495b4e86 Mon Sep 17 00:00:00 2001
From: miguel
Date: Sun, 29 Jun 2025 13:42:53 -0700
Subject: [PATCH 1/7] feature parity workflow
---
.github/workflows/feature-parity.yml | 132 +++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
create mode 100644 .github/workflows/feature-parity.yml
diff --git a/.github/workflows/feature-parity.yml b/.github/workflows/feature-parity.yml
new file mode 100644
index 00000000..8fab7687
--- /dev/null
+++ b/.github/workflows/feature-parity.yml
@@ -0,0 +1,132 @@
+name: Feature Parity
+
+on:
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - labeled
+ - unlabeled
+
+jobs:
+ check-parity-label:
+ runs-on: ubuntu-latest
+ if: github.event.action == 'labeled' && github.event.label.name == 'parity'
+ steps:
+ - name: Check out repository code
+ uses: actions/checkout@v4
+
+ - name: Check user permissions
+ uses: actions/github-script@v7
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ username: context.actor
+ });
+
+ const hasWriteAccess = ['admin', 'write'].includes(permission.permission);
+
+ if (!hasWriteAccess) {
+ // Remove the parity label if user doesn't have write access
+ await github.rest.issues.removeLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ name: 'parity'
+ });
+
+ // Add a comment explaining why the label was removed
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ 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.`
+ });
+
+ throw new Error(`User ${context.actor} does not have write access to add parity label`);
+ }
+
+ console.log(`User ${context.actor} has ${permission.permission} access - proceeding with parity workflow`);
+
+ - name: Create issue in TS SDK repository
+ uses: actions/github-script@v7
+ with:
+ github-token: ${{ secrets.TS_REPO_TOKEN }}
+ script: |
+ const { data: pullRequest } = await github.rest.pulls.get({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: context.issue.number,
+ });
+
+ // Get PR comments for additional context
+ const { data: comments } = await github.rest.issues.listComments({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+
+ // Format comments for the issue description
+ let commentsSection = '';
+ if (comments.length > 0) {
+ commentsSection = '\n\n## Recent Comments\n\n';
+ comments.slice(-3).forEach(comment => {
+ commentsSection += `**@${comment.user.login}** commented:\n`;
+ commentsSection += `${comment.body.substring(0, 500)}${comment.body.length > 500 ? '...' : ''}\n\n`;
+ });
+ }
+
+ // Get list of changed files for context
+ const { data: files } = await github.rest.pulls.listFiles({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: context.issue.number,
+ });
+
+ const changedFiles = files.map(file => `- \`${file.filename}\``).join('\n');
+
+ const issueTitle = `[Feature Parity] ${pullRequest.title}`;
+ const issueBody = `## Feature Parity Request
+
+ This issue was automatically created from a pull request in the TypeScript Stagehand repository that was labeled with 'parity'.
+
+ ### Original PR Details
+ - **PR**: #${context.issue.number} - ${pullRequest.title}
+ - **Author**: @${pullRequest.user.login}
+ - **Link**: ${pullRequest.html_url}
+
+ ### Description
+ ${pullRequest.body || 'No description provided.'}
+
+ ### Changed Files
+ ${changedFiles}
+
+ ${commentsSection}
+
+ ### Action Required
+ Please review the changes in the original PR and implement equivalent functionality in the Python SDK if applicable.
+
+ ---
+ *This issue was automatically generated by the Feature Parity workflow.*`;
+
+ // Create the issue in the Python repository
+ const { data: issue } = await github.rest.issues.create({
+ owner: 'browserbase',
+ repo: 'stagehand',
+ title: issueTitle,
+ body: issueBody,
+ labels: ['feature-parity']
+ });
+
+ console.log(`Created issue: ${issue.html_url}`);
+
+ // Add a comment to the original PR confirming the issue was created
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ 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}`
+ });
From f187e378e847829dbd743219309bda6ebb79e908 Mon Sep 17 00:00:00 2001
From: miguel
Date: Sun, 29 Jun 2025 14:22:54 -0700
Subject: [PATCH 2/7] readme update
---
README.md | 15 ++++++++++++---
media/Director_Logo.png | Bin 0 -> 19450 bytes
media/Director_Logo_White.svg | 20 ++++++++++++++++++++
3 files changed, 32 insertions(+), 3 deletions(-)
create mode 100644 media/Director_Logo.png
create mode 100644 media/Director_Logo_White.svg
diff --git a/README.md b/README.md
index c2ca68ea..69963bdd 100644
--- a/README.md
+++ b/README.md
@@ -34,13 +34,22 @@
-> Stagehand Python is now available! We're actively seeking feedback from the community and looking for contributors. Join our [Slack community](https://stagehand.dev/slack) to stay updated on the latest updates
+> If you're looking for the TypeScript implementation, you can find it [here](https://github.com/browserbase/stagehand)
+**Vibe code** Stagehand with [Director](https://director.ai):
+
+
## Why Stagehand?
Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language, Stagehand is the natural choice for browser automations in production.
From d4e0d57d5acd4b4ba8bb37e1d3b4c3a3dbe3a7e3 Mon Sep 17 00:00:00 2001
From: miguel
Date: Sun, 29 Jun 2025 14:45:35 -0700
Subject: [PATCH 4/7] simplify readme link
---
README.md | 12 ++++++------
media/Director_Logo.png | Bin 19450 -> 0 bytes
media/Director_Logo_White.svg | 20 --------------------
media/director_icon.svg | 13 +++++++++++++
4 files changed, 19 insertions(+), 26 deletions(-)
delete mode 100644 media/Director_Logo.png
delete mode 100644 media/Director_Logo_White.svg
create mode 100644 media/director_icon.svg
diff --git a/README.md b/README.md
index d406282b..5c15a26d 100644
--- a/README.md
+++ b/README.md
@@ -37,14 +37,14 @@
> If you're looking for the TypeScript implementation, you can find it [here](https://github.com/browserbase/stagehand)