Skip to content

feat(eve): add Stagehand code-mode MCP example - #2645

Draft
shrey150 wants to merge 15 commits into
shrey/stg-2765-codemode-langchainfrom
shrey/stg-2765-codemode-eve
Draft

feat(eve): add Stagehand code-mode MCP example#2645
shrey150 wants to merge 15 commits into
shrey/stg-2765-codemode-langchainfrom
shrey/stg-2765-codemode-eve

Conversation

@shrey150

@shrey150 shrey150 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an Eve integration as the next layer above the LangChain example. Eve consumes the same package-installed, bearer-authenticated Stagehand code-mode MCP server running inside Vercel Sandbox; it does not introduce another execution boundary.

Stack

  1. feat: publish the Stagehand code-mode MCP #2644 — publish @browserbasehq/stagehand-codemode
  2. feat: run code-mode MCP in Vercel Sandbox #2626 — run package-installed code-mode MCP in Vercel Sandbox
  3. feat(mastra): add Stagehand code-mode MCP example #2627 — Mastra integration
  4. feat(crewai): add Stagehand code-mode MCP example #2628 — CrewAI integration
  5. feat(langchain): add Stagehand code-mode MCP example #2629 — LangChain integration
  6. this PR — Eve integration

Base: shrey/stg-2765-codemode-langchain

What changed

  • adds an Eve-native defineMcpClientConnection using the shared sandbox { url, token }
  • allows only the canonical code_execute tool and supplies its canonical description to the agent
  • uses Eve's connection_search flow followed by two code-mode calls in the same MCP session
  • proves page/DOM state persists between calls while host-only model-key markers stay isolated from the guest
  • uses direct OpenAI gpt-5-mini for the live model-selection proof
  • reuses the shared Vercel sandbox lease and exact package artifacts
  • removes the branch's duplicate gateway, sandbox image, and guest runtime implementation
  • keeps cleanup ordered and preserves the primary error if cleanup also fails

Proof completed

  • Eve build plus TypeScript typecheck: passed
  • deterministic Eve server/eval contract: passed
    • 6/6 Stagehand gates
    • one connection_search
    • two code_execute calls
    • unauthenticated request rejected with 401
    • authenticated optional GET rejected with 405
  • repository checks: 9/9 passed across 12 workspaces
  • exact Stagehand and code-mode package artifact build/pack: passed
  • missing live configuration fails closed in about one second without hanging

Live proof

The workflow builds the exact package artifacts, installs them in Vercel Sandbox, and runs both the deterministic Eve contract and a real Eve/OpenAI model-selected tool call. A successful hosted live run still requires the repository's Browserbase, Vercel, and OpenAI secrets; no live pass is claimed here until those credentials are available.

Changeset

None. This adds an example integration and does not change a published package.


Summary by cubic

Adds an Eve example that connects to the shared, bearer‑authenticated Stagehand code‑mode MCP in Vercel Sandbox and exposes only stagehand__code_execute. Delivers STG‑2765 with a working Eve binding, a deterministic contract/eval, and CI that can run a live e2e.

  • New Features

    • Native Eve defineMcpClientConnection with shared { url, token }; discovery via connection_search exposes only stagehand__code_execute.
    • Deterministic contract/evals verify: one connection_search; two code_execute in one session; DOM state persists; 401 when unauthenticated; 405 on optional GET; real‑model run defaults to gpt-5-mini and isolates model/host secrets from guest code.
    • CI adds an Eve job to typecheck, run the contract, pack Vercel Sandbox artifacts, detect live creds, wait for the sandbox gateway, and conditionally run live e2e.
  • Dependencies

    • Adds eve@0.29.4 and a new workspace example @browserbasehq/stagehand-integrations-example-eve; updates pnpm-lock.yaml, workspace catalog, and integrations README.
    • Reuses sandboxed @browserbasehq/stagehand-codemode artifacts; no published packages changed.

Written for commit 6b4eba2. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6b4eba2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

socket-security Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​eve@​0.29.4991001009880

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant