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

@taprun/from-stagehand

v0.1.2

Published

Migrate Stagehand (Browserbase) AI flows to MCP-compatible plans. Deterministic Playwright calls compile to plan ops; stagehand.act/extract/observe preserve their natural-language prompts. Run agent flows at zero LLM tokens in Claude Code, Cursor, and any

Readme

@taprun/from-stagehand

Convert Stagehand scripts into Tap plan-v1 .tap.json files. Complement to Stagehand, not a replacement.

npm install @taprun/from-stagehand @taprun/spec

What this is for

Stagehand (Browserbase) ships natural-language browser automation on top of Playwright. Two API surfaces coexist in user scripts:

  1. Deterministic Playwrightpage.goto / click / fill / type / press / waitForSelector / waitForTimeout / screenshot. These have fixed selectors and stable behavior.
  2. Natural-language Stagehandstagehand.act("..."), stagehand.extract("...", schema), stagehand.observe(), stagehand.agent().execute("..."). These resolve to actions only at runtime via an LLM.

This adapter takes a pragmatic stance:

| Stagehand API | → plan-v1 op | Verifiable? | |---|---|---| | page.goto(url) | { op: "nav", url } | ✓ | | page.click(s) | { op: "input", kind: "click", target } | ✓ | | page.fill(s, v) | { op: "input", kind: "fill", target, value } | ✓ | | page.type / press / waitForSelector / waitForTimeout / screenshot | (same as @taprun/from-playwright) | ✓ | | stagehand.act(prompt) | { op: "exec", allowUnverifiable: true } (prompt preserved in fn comment) | ✗ | | stagehand.extract(prompt, schema) | { op: "exec", allowUnverifiable: true } | ✗ | | stagehand.observe(...) | { op: "exec", allowUnverifiable: true } | ✗ | | stagehand.agent().execute(prompt) | { op: "exec", allowUnverifiable: true } | ✗ |

Result: a partially deterministic plan. Tap can doctor and heal the page.* portions. The NL portions remain a black box that Stagehand re-resolves at runtime — Tap reports them via allowUnverifiable: true so consumers know exactly which steps require an LLM.

Positioning

This is not a Stagehand replacement. It's a Tap-side bridge so Stagehand users can:

  • Add structural drift detection on the deterministic portions of their scripts
  • Audit which steps in their automation actually require an LLM
  • Produce a portable .tap.json artifact for compliance / reproducibility logs

Usage

import { readFile, writeFile } from "node:fs/promises";
import { stagehandToTap } from "@taprun/from-stagehand";
import { runConformance } from "@taprun/spec";

const source = await readFile("scripts/my-stagehand-script.ts", "utf8");
const plan = stagehandToTap(source, {
  site: "github",
  name: "browserbase-search",
  intent: "read",
});

const v = runConformance(plan);
if (!v.pass) throw new Error(JSON.stringify(v.failures));

await writeFile("github/browserbase-search.tap.json", JSON.stringify(plan, null, 2));

Scope notes

  • Lifecycle calls (stagehand.init, stagehand.close, browser.newPage, etc.) are silently dropped — they're scaffolding, not user actions.
  • Plain Playwright deterministic calls follow exactly the same regex as @taprun/from-playwright (no behavioral divergence).
  • The MVP regex scanner has the same limitations as the Playwright/Puppeteer adapters: variable-bound selectors, template-string interpolation, and trailing line comments are best-effort.

Part of the Tap ecosystem

Tap is local-first browser automation — compile your scraper once, run it in your own browser forever, and diff the drift when sites change. The local-first runtime means your act() and extract() calls hit your already-logged-in session — no Browserbase egress, no shared cloud browser.

License

MIT.