npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mayurajs/browser-stagehand

v1.2.0

Published

Stagehand's act, extract and observe as tools on a mayura/browser browser.

Readme

@mayurajs/browser-stagehand

Stagehand's natural-language browser automation as tools on a mayura/browser browser: extract (what a page says), observe (what can be done on it) and act (do what an instruction says). Stagehand drives the same browser over its CDP endpoint, so the browser's origins, lifetime and limits still hold.

npm install mayura @mayurajs/browser-stagehand @browserbasehq/stagehand@3
import { createBrowsers } from 'mayura/browser';
import { localBrowsers } from 'mayura/browser/local';
import { stagehandTools } from '@mayurajs/browser-stagehand';

const browsers = createBrowsers(localBrowsers(), { maxBrowsers: 1, maxLifetimeMs: 30 * 60_000, origins: ['https://example.com'] });
const browser = await browsers.open();
const tools = stagehandTools(browser, { model: { modelName: 'openai/gpt-5-mini', apiKey }, act: true });
// stagehand.extract and stagehand.observe (stagehand:stagehand:read), stagehand.act (stagehand:stagehand:act).

| Tool | Permission | Option | | --- | --- | --- | | <name>.extract: what the page says about something, as text | stagehand:<name>:read | always | | <name>.observe: the elements and actions matching an instruction | stagehand:<name>:read | always | | <name>.act: do what an instruction says, such as "click sign in" | stagehand:<name>:act | act: true |

  • Stagehand 3 is a peer you install yourself (3.7.3 or a later 3.x; Stagehand 4 loads a Chrome extension that hosted browsers cannot take). It is loaded when first needed. Node only, as Stagehand is.
  • One Stagehand per browser, attached when a tool first needs it, on the browser's active tab. It is kept alive: closing it leaves the browser to Mayura, which ends it with its lifetime or release.
  • Stagehand calls its own model, outside Mayura: give model with its key (nothing is read from the environment), and costMicros to charge each call to the run's budget. Results are bounded (maxResultBytes, 64 KiB).
  • It works with browsers that are Mayura's alone and whose CDP connection needs no headers: local, Browserbase, Steel, Hyperbrowser, Kernel, Browser Use, Anchor and Firecrawl browsers; not BrowserView or Cloudflare (headers), nor Browserless, whose every connection is a browser of its own, nor a browser shared through cdpBrowsers, where Stagehand could act on others' pages.
  • source may be a browser, or a function giving the run's browser, as browserPerRun(...).source.
  • Options: name (stagehand), model, act, timeoutMs (120 s), maxResultBytes, costMicros, stagehand (the class, to give your own import).

See the browser guide. Apache-2.0.