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

@sepoul-packages/sdk

v0.1.7

Published

TypeScript client for ai-platform. Mirror of the Python PlatformSession API plus a Next.js BFF proxy helper.

Readme

@sepoul-packages/sdk

TypeScript client for ai-platform. Mirror of the Python PlatformSession plus a Next.js BFF proxy helper.

Consumers (math-ui, platform-ui, any friend's domain UI) install this once and stop hand-rolling openapi-fetch + a BFF proxy + per-repo gen-api.sh. The OpenAPI schema is generated inside this package, committed to dist/ at build time, and re-exported as types so downstream consumers get them transitively via npm install.

Surface

import {
  PlatformSession,           // session object
  JobHandle,                  // submit + wait + result handle
  createBffMethods,           // Next.js BFF route handler
  type JobDefinitionRecord,   // typed catalog records
  type ArtifactTypeRecord,
  type CodePackageRecord,
  type JobStatusResponse,
  type JobResultResponse,
} from "@sepoul-packages/sdk";

const session = new PlatformSession({ apiUrl: "http://platform:8000" });
const jds = await session.listJobDefinitions();
const handle = await session.submitJob("math_qa", { question_text: "..." });
const result = await handle.result({ timeoutMs: 120_000 });

Next.js BFF proxy

// app/api/[...path]/route.ts
import { createBffMethods } from "@sepoul-packages/sdk";

export const { GET, POST, PUT, DELETE, PATCH } = createBffMethods({
  upstreamUrl: process.env.PLATFORM_API_URL!,
});

Build / consume

The SDK ships compiled dist/ output. Consumers add it to their package.json:

{
  "dependencies": {
    "@sepoul-packages/sdk": "file:../sdk-ts"
  }
}

…and pin install-links=true in their .npmrc so the file: dep is hard-copied (Next 16's Turbopack resolver can't follow symlinked file: deps).

In the consumer's package.json, add a prebuild (and ideally predev) hook so the SDK is built before Next bundles:

{
  "scripts": {
    "sdk:build": "npm --prefix ../sdk-ts run build",
    "predev": "npm run sdk:build",
    "prebuild": "npm run sdk:build"
  }
}

Regenerate the schema after API changes

cd sdk-ts
npm run gen:api           # rewrites src/schema.d.ts
npm run build             # rewrites dist/

gen:api resolves the OpenAPI source the same way math-ui's gen-api script does: $OPENAPI_SOURCE$MATHAPP_REPO/scripts/dump-openapi.sh → monorepo parent → http://127.0.0.1:8000/openapi.json fallback.