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

@marketnow/trust-gateway

v1.0.3

Published

UTA Trust Gateway — MCP middleware enforcing trust decisions on agent tool calls (12-stage pipeline, Ed25519/JCS, signed receipts). Zero deps, self-contained.

Downloads

632

Readme

@marketnow/trust-gateway

MCP middleware for enforcing trust decisions on agent tool calls.

@marketnow/trust-gateway sits between an agent runtime and its tool servers: every tools/call passes through a configurable trust gate that verifies the caller's credential (Agent Trust Card / EAT), scores trust with a 12-stage verification pipeline, and emits signed audit receipts for every decision.

agent ──tools/call──▶ [ TrustGateway.check() ] ──▶ tool server
                          │  credential verify (Ed25519 + JCS)
                          │  policy (min score, stage gates)
                          ▼
                    ReceiptStore (signed, hash-chained)

Install

npm install @marketnow/trust-gateway

Zero runtime dependencies. Node ≥ 16 (uses node:crypto Ed25519 only).

Quick start

const { TrustGateway, withTrustGateway } = require('@marketnow/trust-gateway');

const gateway = new TrustGateway({
  min_trust_score: 5,
  require_pinned_ca: true,   // card must chain to a pinned CA
});

// Decision object: { allowed: boolean, reason, trust_score }
const decision = await gateway.check(agentCredential, 'search_web', { q: 'weather' });
if (!decision.allowed) console.error('DENY:', decision.reason);

// Or wrap a handler — denials throw TRUST_GATEWAY_DENY:<reason>
const secured = withTrustGateway(myToolHandler, gateway);

Signed receipts

Every allow/deny is recorded by ReceiptGenerator / ReceiptStore: hash-chained, Ed25519-signed audit receipts you can replay later to prove what was allowed and why.

const { ReceiptStore } = require('@marketnow/trust-gateway');
const store = new ReceiptStore('/var/log/uta/receipts.jsonl');

What's inside

| Export | Purpose | |---|---| | TrustGateway | Policy gate for tools/call (allow/deny + reason) | | withTrustGateway(handler, gw) | One-liner middleware wrapper | | DEFAULT_CONFIG | Reference policy (min score 5, pinned CA, stage gates) | | ReceiptGenerator / ReceiptStore | Signed, hash-chained audit trail | | verifyCredential | Standalone 12-stage credential verification |

Verification pipeline

The gate delegates to a 12-stage pipeline (signature → canonical form (RFC 8785 JCS) → PoP → validity window → CA pinning → ... → trust score). Fail-closed: any stage error denies the call with the stage name in reason.

Project

Part of the Universal Trust Adapter stack — live public infrastructure at marketnow.site:

  • MCP endpoint with trust tools: https://www.marketnow.site/api/mcp
  • OCSP-style revocation: https://www.marketnow.site/api/ocsp
  • Signed CRL: https://www.marketnow.site/api/crl

Sister packages: @marketnow/trust-core, @marketnow/trust-adapters, @marketnow/cline-trust-plugin (interceptor with revocation gate).

1.0.2 — what changed

  • Fix: published 1.0.1 tarball was missing the core/ runtime files (dist/index.js required ../core/*require() threw on a clean install). The needed core modules are now vendored under core/ — the package is fully self-contained.
  • README, LICENSE (AL-1.0) and NOTICE now ship in the tarball (npm page was blank).
  • Dependencies removed — zero-dep install.

License

AL-1.0 (AliceLabs Source-Available). See LICENSE-AL-1.0. Commercial licensing: [email protected]