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

@wisdomai/node

v0.1.0

Published

Server-side Node SDK for Wisdom AI

Readme

@wisdomai/node

Server-side Node SDK for Wisdom AI. Exchange a long-lived access token for a short-lived JWT that a browser frontend can use to authenticate against Wisdom's API.

Consumed inside this monorepo via the @wisdomai/node TypeScript path alias in javascript/tsconfig.base.json (same pattern as delta and utils).

Usage

import { WisdomAI } from '@wisdomai/node';

const wisdom = new WisdomAI({
  accessToken: process.env.WISDOM_ACCESS_TOKEN!,
  baseUrl: process.env.WISDOM_BASE_URL!,
});

const { jwt, baseUrl } = await wisdom.getAuthToken();
// Hand `jwt` (and `baseUrl`) to your frontend. The JWT is short-lived.

baseUrl is your Wisdom tenant origin — include the protocol, no path.

  • https://your-tenant.wisdom.ai
  • https://your-tenant.wisdom.ai/graphql (the SDK appends /graphql itself)
  • your-tenant.wisdom.ai (missing protocol)

Trailing slashes are stripped automatically.

Never call this SDK from a browser. The access token is a long-lived credential. The constructor throws if it detects both window and document in the global scope.

Errors

Two classes:

  • WisdomAuthError — the access token was rejected (invalid, expired, revoked, or the deployment has Descope disabled). Surface as 401.
  • WisdomError — everything else (network failure, timeout, 4xx/5xx, malformed response). Surface as 502/500.

Both preserve the original failure on a cause property. cause is a plain class field (not the ES2022 Error.cause option on Error), so it behaves the same at runtime regardless of the compile target.

Running unit tests

nx test node-sdk

Typecheck

nx typecheck node-sdk