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

@cresva/sdk

v0.1.0

Published

Official TypeScript SDK for the Cresva Agent Commerce Protocol (ACP) storefront API. Lets brand engineers and AI agent builders query ACP storefronts directly from Node.js.

Readme

@cresva/sdk

Official TypeScript SDK for the Cresva Agent Commerce Protocol (ACP) storefront API. Lets brand engineers and AI agent builders query ACP storefronts directly from Node.js — no MCP runtime required.

The SDK is a thin wrapper over api.cresva.ai. It uses native fetch (Node 18+), ships dual ESM + CJS bundles, and surfaces typed responses for every endpoint.

Install

npm install @cresva/sdk

Requires Node.js 18 or later.

Quick start

import { CresvaClient } from "@cresva/sdk";

const client = new CresvaClient();

const acp = await client.discover("demo_acp_store_v1");
const { products } = await client.products.list("demo_acp_store_v1");
const results = await client.products.search("demo_acp_store_v1", "running marathon");

console.log(acp.brand_name, products.length, results.products[0]?.title);

An API key is optional — public endpoints work without one but are rate limited to 100 requests/minute per IP. Authenticated keys lift the limit to 1000/minute:

const client = new CresvaClient({
  apiKey: process.env.CRESVA_API_KEY,
  timeoutMs: 15_000,           // default: 10s
  baseUrl: "https://api.cresva.ai", // default
});

API reference

| Method | HTTP | Description | | --- | --- | --- | | client.discover(brandId) | GET /.well-known/acp.json?brand=… | Discovery document with capabilities, currencies, rate limits. | | client.products.list(brandId, opts?) | GET /api/storefront/{brandId}/products | Paginated catalog (page, limit). | | client.products.get(brandId, productId) | GET /api/storefront/{brandId}/products/{id} | Single product card with review summary. | | client.products.search(brandId, q, opts?) | GET /api/storefront/{brandId}/search | Relevance-ranked search results. | | client.products.compare(brandId, productIds) | GET /api/storefront/{brandId}/compare?ids=… | Side-by-side comparison of 2–5 products. | | client.trust.get(brandId) | GET /api/storefront/{brandId}/trust | Trust score, tier, component breakdown. | | client.negotiate(brandId, payload) | POST /api/storefront/{brandId}/negotiate | Agent-to-agent negotiation. Requires agent.session_id. |

Full API reference: developers.cresva.ai/docs/api.

Reserved for the Management API

The following surfaces exist on the client for autocomplete and forward compatibility, but throw NotImplementedError until the Management API ships. Track progress on the protocol changelog.

  • client.transactions.create / get / list / cancel / confirm
  • client.escrow.hold / release / refund
  • client.feedback.submit / list

Errors

import { CresvaApiError, CresvaNetworkError } from "@cresva/sdk";

try {
  await client.products.get("demo_acp_store_v1", "missing");
} catch (err) {
  if (err instanceof CresvaApiError) {
    console.error(err.status, err.code, err.message, err.details);
  } else if (err instanceof CresvaNetworkError) {
    console.error("network/timeout:", err.message);
  } else {
    throw err;
  }
}
  • CresvaApiError — HTTP 4xx/5xx from the storefront. Carries { status, code, message, details }.
  • CresvaNetworkError — DNS, connection, or timeout failure before a response was received.
  • NotImplementedError — thrown by Management API surfaces that are not yet public.

License

MIT © Cresva