-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(stagehand): upgraded stagehand sdk to remove deps incomptaible with bun runtime #2305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR upgrades the Stagehand SDK from v2.0.0 to v3.0.5 to remove dependencies incompatible with the bun runtime. Key Changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant AgentRoute as Agent API Route
participant Stagehand as Stagehand SDK v3
participant Browserbase
participant Page as Browser Page
Client->>AgentRoute: POST /api/tools/stagehand/agent
AgentRoute->>Stagehand: new Stagehand({ model: {...} })
AgentRoute->>Stagehand: stagehand.init()
Stagehand->>Browserbase: Connect to remote browser
Browserbase-->>Stagehand: Browser context
AgentRoute->>Stagehand: stagehand.context.pages()[0]
Stagehand-->>AgentRoute: Page instance
AgentRoute->>Page: page.goto(startUrl)
alt Has login variables
AgentRoute->>Stagehand: stagehand.observe('Find login...')
Stagehand-->>AgentRoute: Login elements
AgentRoute->>Stagehand: stagehand.act('Click login')
AgentRoute->>Page: Direct DOM login attempt
end
AgentRoute->>Stagehand: stagehand.agent({ model, systemPrompt })
AgentRoute->>Stagehand: agent.execute({ instruction })
Stagehand->>Browserbase: Execute agent task
Browserbase-->>Stagehand: Agent result
Stagehand-->>AgentRoute: { success, message, actions }
AgentRoute-->>Client: JSON response
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
Summary
Type of Change
Testing
Tested manually
Checklist