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

@walkeros/server-transformer-bot

v4.1.0

Published

Server-side bot and AI-agent detection transformer for walkerOS

Readme

@walkeros/server-transformer-bot

Server-side bot and AI-agent detection transformer for walkerOS.

Annotates events with user.botScore (0-99, higher = more bot), user.agentScore (0-99, higher = more AI agent), and optionally user.agentProduct (matched UA substring). Never drops events — downstream destination mappings decide policy.

Install

npm install @walkeros/server-transformer-bot

Quick start

import { startFlow } from '@walkeros/collector';
import { transformerBot } from '@walkeros/server-transformer-bot';

await startFlow({
  sources: {
    express: {
      package: '@walkeros/server-source-express',
      config: {
        ingest: {
          userAgent: 'req.headers.user-agent',
        },
      },
    },
  },
  transformers: {
    bot: { code: transformerBot },
  },
  destinations: {
    ga4: {
      package: '@walkeros/server-destination-google-ga4',
      before: 'bot',
      // mapping can filter: if (event.user.botScore > 50) drop
    },
  },
});

After the transformer runs:

{
  "user": {
    "botScore": 0,
    "agentScore": 0
  }
}

What it detects (v1)

| Visitor | botScore | agentScore | agentProduct | |---|---|---|---| | Real browser (Chrome, Firefox, Safari, Edge) | 0 | 0 | — | | Empty / missing User-Agent | 70 | 0 | — | | curl / wget / python-requests / well-known crawlers | 80 | 0 | — | | AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider, etc.) | 95 | 95 | e.g. "GPTBot" | | AI search-index crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) | 95 | 95 | e.g. "PerplexityBot" | | AI user-action agents (ChatGPT-User, Claude-User, Perplexity-User, etc.) | 90 | 95 | e.g. "ChatGPT-User" |

Output paths

All three outputs are configurable via settings.output:

| Field | Default path | Notes | |---|---|---| | botScore | user.botScore | Set to "ingest.bot.score" to route to pipeline scratch instead of the event. Set to "" to skip writing. | | agentScore | user.agentScore | v1 emits 0 or 95 only. | | agentProduct | (off) | Set to "user.agentProduct" or similar to enable. |

Destination filtering recipes

Drop all bots:

event.user.botScore > 50

Drop crawlers but keep user-action AI traffic:

event.user.botScore > 50 AND event.user.agentProduct NOT LIKE '%-User'

AI traffic report:

event.user.agentScore > 50, grouped by event.user.agentProduct

Not in v1 (planned for v1.1+)

These signals are deferred. The settings.input schema reserves the relevant input field names so adding them in v1.1 will not be a breaking change.

  • Header consistency heuristicsSec-Fetch-* missing on Chromium UAs, Sec-CH-UA major version mismatch with UA, missing Accept-Language. Requires a structured-headers parser, GREASE filtering, and a captured-headers fixture suite to avoid false positives on WebView, Tor, corporate proxies, and old Safari.
  • ASN / datacenter-IP detection — bring-your-own lookup function (the package will stay dependency-free; MaxMind GeoLite ASN's CC-BY-SA license precludes embedding).
  • Reverse DNS verification for true verified-bot status (e.g. confirming Googlebot is actually Google).
  • Web-side runtime checksnavigator.webdriver, userAgentData from a browser source.
  • Behavioral signals (rate, session shape) — needs a store.
  • TLS / JA4 fingerprinting — not application-layer reachable; would consume an upstream-injected ja4 header if provided.
  • agentScore graduation — v1 emits 0 or 95. v1.1 will use intermediate values (e.g. 70 for unverified UA claim, 99 for IP-reverse-DNS verified).

Limits

Will not catch: residential-proxy + stealth-patched Chrome + realistic behavior; paid CAPTCHA-solver farms (2Captcha residential, etc.); real-browser-as-a-service providers (Bright Data, ScrapingBee, Browserbase, Hyperbrowser, Browserless). For that threat model use Cloudflare Bot Management, DataDome, or HUMAN.

License

MIT