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

@guardianclaw/stripe-agent-toolkit

v1.0.0

Published

GuardianClaw safety validation for the Stripe Agent Toolkit — CLAW protocol for AI agent payment safety (ClawPay Sprint 3)

Readme

@guardianclaw/stripe-agent-toolkit

GuardianClaw safety validation for the Stripe Agent Toolkit. TypeScript counterpart of the Python guardianclaw.integrations.stripe module — same four CLAW gates (Credibility · Limits · Avoidance · Worth), same audit shape, same risk vocabulary. Use whichever runtime fits your agent.

Why

The Stripe Agent Toolkit lets an AI agent call paymentIntents.create, refunds.create, transfers.create, and more via function-calling. That is extremely powerful and extremely easy to misuse — a prompt-injected agent can move money on the user's behalf before anyone reviews it. This package is the decision firewall that sits between the agent's outgoing payload and the Stripe SDK.

Install

npm install @guardianclaw/stripe-agent-toolkit
# or
pnpm add @guardianclaw/stripe-agent-toolkit

@stripe/agent-toolkit is an optional peer dependency — the validator operates on a plain StripePaymentInput object, so any caller can use it even without the toolkit installed.

Quick start

import Stripe from "stripe";
import {
  createValidator,
  StripeIntentKind,
} from "@guardianclaw/stripe-agent-toolkit";

const validator = createValidator("standard");
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);

const result = validator.validate(
  {
    intentKind: StripeIntentKind.PAYMENT_INTENT_CREATE,
    amount: 4900,
    currency: "usd",
    customer: "cus_NksY4M0bM4FfXg",
    description: "Daily API budget refill for the support agent",
    apiKey: process.env.STRIPE_SECRET_KEY,
  },
  "agent-1", // wallet / agent identifier
);

if (!result.isApproved) {
  console.warn("ClawPay blocked:", result.blockedReason);
  return;
}

if (result.requiresConfirmation) {
  // Surface result.facts + result.gates to the human reviewer.
}

await stripe.paymentIntents.create({
  amount: 4900,
  currency: "usd",
  customer: "cus_NksY4M0bM4FfXg",
});

What gets validated

| Gate | Checks | |------|--------| | Credibility | API key prefix (rk_* recommended), ISO-4217 currency, positive amount, cus_*/acct_* ID shape, idempotency-key length. | | Avoidance | Static blocklists, suspicious description terms (seed phrase, drain wallet, …), urgency markers as risk factors. Drainer-intel lookup is wired on the Python side via the shared DrainerLookup; the TypeScript build keeps that hook as a future extension. | | Limits | Single-payment USD cap + rolling daily / hourly counts. The caller supplies the rolling context via getContext — the validator never tracks spending itself. | | Worth | Description ≥ 20 chars with at least 3 words for money-moving intents; flags first-time customers/destinations. Strict mode promotes flags to blocks. |

Configuration profiles

| Profile | Single cap | Daily cap | Strict mode | |---------|-----------|-----------|-------------| | permissive | $1,000 | $5,000 | no | | standard (default) | $100 | $500 | no | | strict | $25 | $100 | yes | | paranoid | $5 | $20 | yes, sandbox-only |

import { ClawValidator, defaultConfig } from "@guardianclaw/stripe-agent-toolkit";

const config = {
  ...defaultConfig("standard"),
  blockedCustomers: ["cus_BAD0001", "cus_BAD0002"],
  spendingLimits: { ...defaultConfig("standard").spendingLimits, maxSinglePayment: 75 },
};
const validator = new ClawValidator({ config });

License

MIT. Part of GuardianClaw.