From a7711cac689d60a44472afef555f68d1ba3a82bd Mon Sep 17 00:00:00 2001 From: Shrey Pandya Date: Thu, 17 Sep 2026 18:15:51 +0000 Subject: [PATCH] fix(evals): use workspace Browse to unblock release builds --- README.md | 45 ++++++++----------- packages/evals/package.json | 2 +- .../framework/claudeCodeToolAdapter.test.ts | 9 ++-- packages/evals/tests/tui/run.test.ts | 4 +- pnpm-lock.yaml | 4 +- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 724e85c549..de46521a2b 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,9 @@

- ## AI that uses the browser like humans. -Sign in once, keep the session, and pull structured data out the other side. - - +Sign in once, keep the session, and pull structured data out the other side. ```typescript import { localBrowser, Stagehand } from "@browserbasehq/stagehand"; @@ -72,9 +69,7 @@ await stagehand.act("open the billing page"); const { data } = await stagehand.extract( "extract every invoice in the table", z.object({ - invoices: z.array( - z.object({ number: z.string(), amount: z.number(), paid: z.boolean() }), - ), + invoices: z.array(z.object({ number: z.string(), amount: z.number(), paid: z.boolean() })), }), ); @@ -258,7 +253,6 @@ func run(ctx context.Context) (err error) { - ## Install ```bash @@ -285,18 +279,16 @@ go get github.com/browserbase/stagehand/packages/sdk-go/v4@v4.0.0 Local runs need [Chrome](https://www.google.com/chrome/) installed. Full setup: [Quickstart](https://docs.stagehand.dev/v4/first-steps/quickstart). - ## Why Stagehand -| | | -| --- | --- | -| **Familiar APIs** | The Playwright-style methods you and your agents already know: `goto`, `click`, `locator`, `screenshot`. | -| **Token efficiency** | Hybrid accessibility-tree trimming gives agents exactly the page context they need and nothing more. | -| **Faster in production** | Stagehand runs as an extension next to the browser, cutting round-trip latency on every action. | -| **Self-healing** | `act`, `observe`, and `extract` refresh how an action happens when the site changes underneath it. | -| **Built for agents** | WebMCP, clipboard support, batch commands, deep locators for nested iframes and closed Shadow DOMs, OTel traces. | -| **Three languages** | One complete browser driver across TypeScript, Python, and Go. | - +| | | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------- | +| **Familiar APIs** | The Playwright-style methods you and your agents already know: `goto`, `click`, `locator`, `screenshot`. | +| **Token efficiency** | Hybrid accessibility-tree trimming gives agents exactly the page context they need and nothing more. | +| **Faster in production** | Stagehand runs as an extension next to the browser, cutting round-trip latency on every action. | +| **Self-healing** | `act`, `observe`, and `extract` refresh how an action happens when the site changes underneath it. | +| **Built for agents** | WebMCP, clipboard support, batch commands, deep locators for nested iframes and closed Shadow DOMs, OTel traces. | +| **Three languages** | One complete browser driver across TypeScript, Python, and Go. | ## Run it on Browserbase @@ -408,17 +400,16 @@ console.log(fetched.content); [Search](https://docs.stagehand.dev/v4/add-ons/search) · [Fetch](https://docs.stagehand.dev/v4/add-ons/fetch) - ## Docs and resources -| | | -| --- | --- | -| [Quickstart](https://docs.stagehand.dev/v4/first-steps/quickstart) | Empty directory to working automation in three steps | -| [act](https://docs.stagehand.dev/v4/basics/act) · [extract](https://docs.stagehand.dev/v4/basics/extract) · [observe](https://docs.stagehand.dev/v4/basics/observe) | The three primitives | -| [Migrate from Playwright](https://docs.stagehand.dev/v4/migrations/playwright) | Port an existing suite | -| [Integrations](https://docs.stagehand.dev/v4/integrations/overview) | CrewAI, Mastra, Deep Agents, Vercel AI SDK, Claude Code, Codex | -| [Python SDK](./packages/sdk-python/README.md) · [Go SDK](./packages/sdk-go/README.md) | Language-specific guides | -| [Ask DeepWiki](https://deepwiki.com/browserbase/stagehand) | Ask questions about this codebase | +| | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| [Quickstart](https://docs.stagehand.dev/v4/first-steps/quickstart) | Empty directory to working automation in three steps | +| [act](https://docs.stagehand.dev/v4/basics/act) · [extract](https://docs.stagehand.dev/v4/basics/extract) · [observe](https://docs.stagehand.dev/v4/basics/observe) | The three primitives | +| [Migrate from Playwright](https://docs.stagehand.dev/v4/migrations/playwright) | Port an existing suite | +| [Integrations](https://docs.stagehand.dev/v4/integrations/overview) | CrewAI, Mastra, Deep Agents, Vercel AI SDK, Claude Code, Codex | +| [Python SDK](./packages/sdk-python/README.md) · [Go SDK](./packages/sdk-go/README.md) | Language-specific guides | +| [Ask DeepWiki](https://deepwiki.com/browserbase/stagehand) | Ask questions about this codebase | ## Join the community diff --git a/packages/evals/package.json b/packages/evals/package.json index 3b6c143ead..0e26ace598 100644 --- a/packages/evals/package.json +++ b/packages/evals/package.json @@ -40,7 +40,7 @@ "@opentelemetry/sdk-trace-node": "^2.9.0", "ai": "^5.0.133", "braintrust": "^3.21.0", - "browse": "0.9.5", + "browse": "workspace:*", "dotenv": "^17.3.1", "langsmith": "^0.5.16", "openai": "^4.104.0", diff --git a/packages/evals/tests/framework/claudeCodeToolAdapter.test.ts b/packages/evals/tests/framework/claudeCodeToolAdapter.test.ts index 5acd0d939a..c214dd8729 100644 --- a/packages/evals/tests/framework/claudeCodeToolAdapter.test.ts +++ b/packages/evals/tests/framework/claudeCodeToolAdapter.test.ts @@ -110,11 +110,14 @@ describe("claude code tool adapter resolution", () => { expect(getBrowseCliAllowedTools()).toEqual(["Skill", "Bash"]); }); - it("exposes browse cli metadata for Braintrust rows", () => { + it("exposes workspace browse cli metadata for Braintrust rows", async () => { + const { version } = JSON.parse( + await fsp.readFile(new URL("../../../cli/package.json", import.meta.url), "utf8"), + ); expect(getBrowseCliToolMetadata()).toMatchObject({ toolCommand: "browse", - browseCliVersion: "0.9.5", - browseCliEntrypoint: expect.stringMatching(/browse[/\\]bin[/\\]run\.js$/u), + browseCliVersion: version, + browseCliEntrypoint: expect.stringMatching(/packages[/\\]cli[/\\]bin[/\\]run\.js$/u), }); }); diff --git a/packages/evals/tests/tui/run.test.ts b/packages/evals/tests/tui/run.test.ts index 4a0cab5e5b..2d7f73c21c 100644 --- a/packages/evals/tests/tui/run.test.ts +++ b/packages/evals/tests/tui/run.test.ts @@ -259,7 +259,7 @@ describe("deriveCategoryFilter", () => { startupProfile: "tool_create_browserbase", toolCommand: "browse", browseCliVersion: expect.any(String), - browseCliEntrypoint: expect.stringMatching(/browse[/\\]bin[/\\]run\.js$/u), + browseCliEntrypoint: expect.stringMatching(/packages[/\\]cli[/\\]bin[/\\]run\.js$/u), harnessConfig: { harness: "claude_code", model: "anthropic/claude-sonnet-4-20250514", @@ -317,7 +317,7 @@ describe("deriveCategoryFilter", () => { startupProfile: "tool_create_browserbase", toolCommand: "browse", browseCliVersion: expect.any(String), - browseCliEntrypoint: expect.stringMatching(/browse[/\\]bin[/\\]run\.js$/u), + browseCliEntrypoint: expect.stringMatching(/packages[/\\]cli[/\\]bin[/\\]run\.js$/u), harnessConfig: { harness: "codex", model: "openai/gpt-5.4-mini", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c769a88398..4e74460909 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -596,8 +596,8 @@ importers: specifier: ^3.21.0 version: 3.28.0(@aws-sdk/credential-provider-web-identity@3.972.74)(zod@4.4.3) browse: - specifier: 0.9.5 - version: 0.9.5(bufferutil@4.1.0)(playwright-core@1.56.1) + specifier: workspace:* + version: link:../cli dotenv: specifier: ^17.3.1 version: 17.4.2