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

forma-sdk

v3.3.0

Published

FormaAI SDK for Node.js — AI agent governance. Capture · Approve · Kill · Prove · Redact

Readme

forma-sdk — FormaAI for Node.js / TypeScript

The oversight layer for AI agents — Capture · Approve · Kill · Prove · Redact

One line of code. Every LLM call captured, high-stakes actions paused for human approval, kill switch armed, every action HMAC-signed.

npm License: MIT

Install

npm install forma-sdk

Quickstart

import * as forma from "forma-sdk";

forma.init({
  apiKey:    process.env.FORMA_API_KEY,   // tl_live_...
  agentName: "loan-agent",
  humanSponsor: "[email protected]",
  killSwitch: true,

  // Gate high-value transactions for human approval:
  requireApprovalForTools: ["wire_transfer", "delete_*"],
  requireApprovalWhen: (ctx) => (ctx.toolArgs?.amount ?? 0) > 100_000,

  maxCostUsd: 5.0,
});

// Auto-patches OpenAI — every call captured + HMAC-signed:
const openai = forma.wrapOpenAI(new OpenAI());
await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Summarise Q3 revenue" }],
});

// Auto-patches Anthropic too:
const anthropic = forma.wrapAnthropic(new Anthropic());

// Verify connection:
const v = await forma.verify();
// { verified: true, capture: "active", killSwitch: "armed", approvals: "configured" }

Compliance mode (one parameter)

forma.init({
  apiKey: process.env.FORMA_API_KEY,
  complianceMode: "eu_ai_act_high_risk",
  // Automatically sets: requireApproval=true, killSwitch=true, approvalTimeout=1800s
});

Available profiles: eu_ai_act_high_risk · eu_ai_act_limited · nist_ai_rmf · hipaa · rbi_ml_guidelines · sox_fintech

Govern custom (non-LLM) tools

const transfer = forma.tool("wire_transfer", async (amount: number, to: string) => {
  return bank.transfer(amount, to);
}, { requireApproval: true, riskLevel: "CRITICAL" });

// Blocks until a human approves in the FormaAI inbox (fail-closed):
await transfer(250_000, "acct-77");

API

| Function | Description | |---|---| | forma.init(config) | Initialize — call once at startup | | forma.wrapOpenAI(client) | Patch OpenAI client — every call captured | | forma.wrapAnthropic(client) | Patch Anthropic client — every call captured | | forma.tool(name, fn, config?) | Govern a custom function (kill + approval + signed trace) | | forma.register(name, fn, config?) | Register a named agent | | forma.verify() | Check connectivity + feature status | | forma.status() | SDK version + state | | forma.kill(reason?) | Trigger kill switch programmatically |

Config

forma.init({
  apiKey:                    "tl_live_...",   // or FORMA_API_KEY env var
  agentName:                 "my-agent",
  humanSponsor:              "[email protected]",
  killSwitch:                true,
  requireApproval:           false,           // gate every call
  requireApprovalForTools:   ["wire_transfer", "delete_*"],
  requireApprovalForModels:  ["o1", "o3"],
  requireApprovalForKeywords:["terminate", "wire"],
  requireApprovalWhen:       (ctx) => ctx.toolArgs?.amount > 50_000,
  approvalMessage:           "Sign-off required",
  approvalTimeout:           3600,            // seconds (default 1h)
  maxCostUsd:                10.0,            // hard spend cap
  riskLevel:                 "HIGH",          // LOW | MEDIUM | HIGH | CRITICAL
  complianceMode:            "eu_ai_act_high_risk",
  redact:                    ["sk_live_...", "my-db-password"],
});

Links

  • Dashboard: https://formaai.in
  • Docs: https://formaai.in/developer-guide
  • Python SDK: pip install forma-sdk (import trustlayer as tl)
  • GitHub: https://github.com/amit5115/PROVN