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

brydge-core

v0.1.0

Published

BRYDGE's verification client: ask before an agent acts, then check against the destination's own records whether the work happened. The shared core every BRYDGE framework adapter is built on.

Readme

brydge-core

The verification client at the centre of BRYDGE: ask before an agent acts, then check against the destination system's own records whether the work actually happened.

This is the shared core every BRYDGE framework adapter is built on — brydge-langchain, brydge-mcp, the CrewAI tool and the n8n node all turn their own tool shape into these calls and the answers back into their own. It imports nothing from any framework, so a new integration is a thin wrapper, not another copy of the engine.

Most people use a framework package instead of this one directly. Reach for brydge-core when you are wiring BRYDGE into a framework it does not yet have an adapter for.

Install

npm install brydge-core

Requires Node.js 20 or later.

Use

import { BrydgeClient } from "brydge-core";

const brydge = new BrydgeClient(); // reads BRYDGE_API_KEY, and BRYDGE_URL if set

// 1. Ask before acting.
const decision = await brydge.supervise({
  actor: "agent:refund-ops",
  action: "refund",
  target: "ch_3QxF8c…",
  facts: { amount: 4200 },
  idempotencyKey: "refund:ch_3QxF8c…",
});

if (decision.decision === "ALLOWED") {
  // 2. Carry the action out, writing decision.id into the record it creates,
  //    then tell BRYDGE what you believe happened.
  await brydge.report(decision.id, "SUCCEEDED");
}

// 3. Check it against the destination's own records.
const finding = await brydge.verify(decision.id);
finding.state; // "VERIFIED" | "FAILED" | "MISMATCH" | "UNKNOWN" | "PENDING"

ESCALATED means a person decides and the work must not be done yet. Asking again with the same idempotencyKey returns their answer once they have given it: ALLOWED, or settled: "REFUSED".

The client

const brydge = new BrydgeClient({
  apiKey: "brydge_sk_…",          // default: BRYDGE_API_KEY
  baseUrl: "https://…",           // default: BRYDGE_URL, then BRYDGE's hosted service
  timeoutMs: 30_000,              // default
  integration: "brydge-acme/1.0", // how this integration names itself to BRYDGE's logs
});

await brydge.supervise({ actor, action, target, facts, idempotencyKey }); // ask before acting
await brydge.report(authorization, "SUCCEEDED");                          // what the agent says happened
await brydge.verify(authorization);                                       // read the records now
await brydge.finding(authorization);                                      // what BRYDGE has found so far, free
await brydge.headroom(actor, action);                                     // how much the agent may do without a person today

The client sends your key only over https, except to localhost. BRYDGE's decisions come back as values; anything that stopped BRYDGE from answering — a missing key, an unreachable server, a refusal — is a BrydgeError, never a decision about the action itself. BrydgeError.find(error) recovers it from a framework's wrapping error.

Development

npm install
npm test
npm run build

License

MIT