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

@postcept/relay

v0.1.1

Published

Customer-side relay for Postcept. Reads your system of record with credentials that never leave your environment, signs what it saw as an observation envelope, and submits it for verification. Postcept judges completion without holding your provider keys.

Readme

@postcept/relay

Read your system of record where it already lives and send Postcept a signed observation instead of your credentials.

The relay runs in your environment. It reads the system of record (Stripe today, or a mock ledger for trying it out) with a key you control, normalises what it saw, signs it, and sends that signed observation to Postcept. Postcept checks the signature against a public key you registered, rejects replays and stale or tampered submissions, and verifies the agent's claim against what your relay reported. The receipt names the relay as the source.

Your provider key and the relay's signing seed never leave your environment.

Quick start (mock ledger, no provider account)

npx @postcept/relay keygen

Register the printed public key with POST /v1/relay-keys to get a relay id, then:

export POSTCEPT_API_KEY=pcpt_sk_...
export POSTCEPT_ORG_ID=org_...
export POSTCEPT_RELAY_ID=rly_...
export POSTCEPT_RELAY_SEED=...        # from keygen, keep it secret

npx @postcept/relay observe refund --operation op_1 --refund-id re_4md82k

Then verify against the observation:

curl -X POST https://api.postcept.com/v1/verifications \
  -H "Authorization: Bearer $POSTCEPT_API_KEY" -H "Content-Type: application/json" \
  -d '{"operation_id":"op_1","agent_id":"my-agent","connector":"relay",
       "claim":{"refund_id":"re_4md82k","amount_cents":12000,"currency":"usd",
                "customer":"[email protected]"}}'

The receipt's connectors_checked reads relay:rly_..., so the evidence shows the source was your observation and not a Postcept-held credential.

Stripe (read-only)

Create a restricted Stripe key with read access to Refunds and Charges. That is everything this connector calls. Then:

export CONNECTOR=stripe
export STRIPE_API_KEY=rk_live_...     # restricted, read-only
export EVIDENCE_MODE=minimal          # optional, omit the customer identity

With EVIDENCE_MODE=minimal the customer field is left out and Postcept skips the customer check rather than passing it, so sending less evidence never raises confidence.

Durability

Signed observations are written to a local queue (POSTCEPT_RELAY_DATA, JSONL) before any network call, so a crash or an unreachable control plane loses nothing. flush (or the run loop, every 15 seconds) retries transient failures and moves permanently rejected observations to dead.jsonl for inspection. run serves GET :8477/healthz with the queue depth.

Docker

npm run build
docker build -t postcept-relay packages/relay
docker run -e POSTCEPT_API_KEY=... -e POSTCEPT_ORG_ID=... \
  -e POSTCEPT_RELAY_ID=... -e POSTCEPT_RELAY_SEED=... \
  -v relay-data:/relay/data postcept-relay

Deploying

deploy/helm is a Helm chart. It creates no Service or Ingress, uses a PVC for the queue, and reads secrets from a Secret you manage. deploy/cloud-run covers a serverless worker, with a note on queue durability on ephemeral filesystems.

What a signed observation proves

An accepted observation shows it came from your registered relay, unchanged, recently, and once. It does not show that the provider's answer was itself correct, which is why the receipt names the relay and why revoking a relay key (DELETE /v1/relay-keys/{id}) takes effect right away.