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

unsurf

v0.4.0

Published

Turn any website into a typed API

Readme

unsurf

surf the web → unsurf it

Scout a website, get back a typed spec, run the spec against the live page, get back evidence it worked. Tools and gates share one schema.

Directory

Browse the Directory →


The spec

proof-spec.v0.json — three usage modes:

  • toolact[] only (click / fill / select / check / submit / read)
  • gateobserve[] + assert[]. Includes judgeScore assertions running cloudeval's LLM-judge rubrics (Correctness, ToolUsage, Grounding, BehaviorPolicy, WorkflowReasoning, Factuality)
  • proof — all three plus loop. Evidence bundle carries usage (tokens, cost, model) + timings (per-op wall-clock)

Types: @acoyfellow/proof-spec — shared with gateproof. Unsurf re-exports.

The executor

observe → act → assert

src/services/Plan.ts:

  • runSpec(spec, args) — auto-picks based on spec shape, returns EvidenceBundle
  • invokeSpec(spec, args) — runs act[]
  • verifySpec(spec) — runs observe + assert only
  • runLoopSpec(spec, args) — honors spec.loop.maxIterations (clamped to 1 for risk: high)

risk is computed from act[] by RiskLabeler, never from the synthesizer. Adversarial pages can't downgrade it.

Vitest matchers: import { expectSpec } from "unsurf/testing".toPass(), .toHaveAssertion(...), .toObserveDomElement(...).

Auth

The agent runs inside your authenticated tab. Your cookies, your localStorage, your credentialed fetches. Sign in once; the agent is you until you close the tab.

The Directory

URL-keyed registry of scouted specs, fingerprinted by page structure. Two tiers:

  • Local.unsurf/directory/ per-repo. Record once, replay forever in tests.
  • Hostedunsurf-api.coey.dev/d/. Publish on opt-in.
GET  /d/                            # all catalogs
GET  /d/:domain                     # per-domain view
GET  /d/catalog/:fingerprint        # one catalog
POST /d/catalog                     # publish

Agents read from local first, fall back to hosted on miss, synth on double-miss.


Use it

As a library

bun add unsurf
// API capture (original): OpenAPI from network traffic
import { scout, worker, heal } from "unsurf";

// proof-spec executor
import { runSpec, verifySpec, type ProofSpec } from "unsurf";
const result = await runSpec(spec, { email: "[email protected]" });

// Effect service
import { Plan, PlanLive } from "unsurf";

// Vitest matchers
import { expectSpec } from "unsurf/testing";
expect(result).toPass();

As a CLI

bunx unsurf scout https://example.com/contact
# → writes proof-spec.v0.json to stdout

bunx unsurf run ./spec.json --args '{"email":"[email protected]"}'
# → runs the spec, prints EvidenceBundle, exits 0 on pass

As an MCP server

{
  "mcpServers": {
    "unsurf": { "url": "https://unsurf-api.coey.dev/mcp" }
  }
}

As an extension

examples/webmcp-extension/   # Chrome MV3, ~200 lines

Install the extension + @mcp-b local relay. Tools appear in your MCP client, run in your tab, as you.

As a daemon (no extension)

bunx unsurf-daemon

For managed Chromes that block extensions (ExtensionInstallBlocklist), attach via CDP instead.

examples/webmcp-daemon/      # Bun daemon, CDP-injected, ~450 lines

As a filepath harness

examples/filepath-harness-shim/

Agents inside a filepath workspace shell out to bunx unsurf like any other tool.

As a lab capability

import { spec } from "./contact-form.json";
const receipt = await lab.runProofSpec(spec, { email });
// canonical JSON at lab.coey.dev/results/:id.json

Self-hosted

Deploy to Cloudflare

git clone https://github.com/acoyfellow/unsurf && cd unsurf
bun install && bun run deploy

Two capture paths

  Agent                 unsurf                       Target site
  │                       │                            │
  │  scout(url)           │  capture network      ───▶ │  OpenAPI + paths
  │                       │  capture DOM          ───▶ │  proof-spec.v0.json
  │                       │                            │
  │  worker(id, args)     │  replay API via fetch ───▶ │
  │  or runSpec(spec)     │  invoke tool in tab   ───▶ │  runs as user
  │                       │                            │
  │  heal(id, error)      │  re-scout, patch      ───▶ │

Stack

Runs on Cloudflare primitives:

  • Workers — runtime
  • Workers AI — synthesis (Qwen 2.5 Coder 32B)
  • Browser Rendering — scout
  • D1 + R2 — Directory storage
  • MCP endpointunsurf-api.coey.dev/mcp

Adjacent tools sharing proof-spec.v0:

  • gateproof — HTTP + exec altitude
  • cloudeval — LLM-judge rubrics
  • lab — capability sandbox + canonical receipts
  • filepath — agent runtime (unsurf available as a harness)

Built with

Why Effect

| Problem | Effect solution | |---|---| | Browser container leaks | Scope + acquireRelease | | Transient failures | Schedule.exponential + retry | | Typed error routing | Schema.TaggedError + catchTag | | Inject synthesizer / store / browser | Layer + Context.Tag | | CDP event streams | Stream | | LLM fallback | ExecutionPlan | | Spec + OpenAPI + tool-spec from one source | Schema |


What works today

  • API capture + replay via scout / worker / heal
  • DOM capture via scout-dom — Workers AI synthesizes act[] + assert[] from any URL
  • CLIbunx unsurf scout / bunx unsurf run
  • Extension — Chrome MV3, inherits your session
  • Daemon — CDP-attached, works against managed Chromes
  • filepath harness — drop-in tool inside filepath workspaces
  • lab capabilitylab.runProofSpec(spec) ships canonical receipts
  • Directory — two-tier (local VCR cache + hosted public), dual-type (API + WebMCP)
  • Evidence bundles carry usage + timings

Receipts + benchmarks: experiments/SUMMARY.md.

License

MIT