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

@forge12interactive/silentshield-sdk-js

v1.2.0

Published

SilentShield SDK — form verification, AI-agent observation, and policy enforcement (block AI bots).

Readme

@forge12interactive/silentshield-sdk-js

One zero-dependency package for SilentShield in Node.js:

  • Verify — confirm a form submission came from a human.
  • Observe — passively report AI-agent / bot traffic as it hits your app.
  • Enforce — actually block disallowed AI bots per your dashboard policy.

Uses the global fetch built into Node, so there are no runtime dependencies.

Install

npm install @forge12interactive/silentshield-sdk-js

Requires Node.js >= 18.

Usage

Both capabilities come from the same client:

import express from "express";
import { createClient } from "@forge12interactive/silentshield-sdk-js";

const shield = createClient({ apiKey: process.env.SILENTSHIELD_API_KEY });
const app = express();
app.use(express.json());

// OBSERVE — mount once, near the top. Fire-and-forget, never blocks a request.
app.use(shield.observe);

// VERIFY — on your form submit route.
app.post("/signup", async (req, res) => {
  const { human } = await shield.verify(req.body.nonce);
  if (!human) return res.status(403).send("Verification failed");
  // ...proceed with a trusted human submission
  res.send("ok");
});

app.listen(3000);

Without a client

Top-level convenience helpers are also exported:

import { verify, observe } from "@forge12interactive/silentshield-sdk-js";

const { human } = await verify(nonce, { apiKey });
app.use(observe({ apiKey }));

verify(nonce) result

{
  human: boolean,      // true iff ok && verdict === "human" && confidence >= threshold
  verdict: string,     // e.g. "human" | "bot"
  confidence: number,  // 0..1
  requestId: string,   // server request id for support/debugging
}

A submission is treated as human only when ok === true, verdict === "human", and confidence >= humanThreshold (default 0.7).

Configuration

createClient, verify, and observe all accept the same options:

| Option | Env suggestion | Default | | ---------------- | ------------------------- | ---------------------------------------------------------- | | apiKey | SILENTSHIELD_API_KEY | — (required) | | verifyUrl | — | https://api.silentshield.io/v1/verify | | observeUrl | — | https://api.silentshield.io/api/v1/agent/telemetry | | directoryUrl | — | https://api.silentshield.io/api/v1/agent/bot-directory | | humanThreshold | — | 0.7 |

The known-agent token list (used to decide which requests are bot candidates) ships embedded and is refreshed from the bot directory at most once every ~24h, lazily and off the request path.

Fail-open behaviour

Everything is fail-open — if SilentShield is unreachable, your app keeps working:

  • verify() never throws. On any network or parse error it resolves with { human: false, verdict: undefined, confidence: 0, requestId: undefined }. Decide your own policy for that case (block, allow, or soft-challenge).
  • observe never throws and always calls next(). Telemetry is fire-and-forget; failures are silently ignored.

What gets sent (and when)

Telemetry is only sent for bot candidates — requests whose User-Agent matches a known agent token, or that carry an HTTP Message signature header. Human traffic is never reported. Each sighting contains: user-agent, IP, path (query stripped), method, and, when present, the HTTP Message Signature fields (signature, signature_input, signature_agent, authority, scheme).

GDPR / privacy note

  • Server-side only. No cookies, no client-side JavaScript, no browser fingerprinting — nothing is stored on the visitor's device.
  • IP handling. The raw IP is transmitted over TLS and hashed server-side; SilentShield does not retain raw IP addresses for telemetry.
  • Scope. Only bot-candidate requests are observed. Ordinary human traffic is neither inspected beyond a UA/header check nor transmitted.
  • Legal basis. Processing for bot/abuse detection rests on legitimate interest (Art. 6(1)(f) GDPR) in securing the service. Document it in your privacy policy and record of processing activities.

Enforcement — actually block AI bots (enforce)

observe only records visits. To block disallowed bots per the policy you set in the SilentShield dashboard, add the enforcer. It fetches the signed policy bundle, verifies its Ed25519 signature against the pinned keys, caches it, refreshes in the background, and decides per request — returning 403 for a denied bot and 429 for a throttled one. Fail-open: any error, an unverifiable bundle, or monitor mode lets the request through.

import express from "express";
import { enforce } from "@forge12interactive/silentshield-sdk-js";

const app = express();

// Put it first so blocked bots are turned away before your routes run.
app.use(enforce({ apiKey: process.env.SILENTSHIELD_SITE_KEY }));

app.get("/", (req, res) => res.send("hello"));
app.listen(3000);

Prerequisites for a real block: agent_gateway_enforce enabled and a Block rule set on the key in the dashboard (otherwise the bundle is monitor → nothing blocks). Bots are identified by User-Agent and treated as verified only when their source IP is in the operator's published range; behind a proxy, restore the real client IP into req.socket.remoteAddress.

createEnforcer(opts) returns { middleware, ready() } if you need the raw middleware or to await the first policy fetch (e.g. in tests).

License

MIT