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

@jazzmine-ui/sdk

v0.1.5

Published

Framework-agnostic TypeScript client for Jazzmine agentic backends

Readme

@jazzmine-ui/sdk

Framework-agnostic TypeScript client for Jazzmine agentic backends.

Install

npm install @jazzmine-ui/sdk

Quick Start

1) Basic chat

import JazzmineClient from "@jazzmine-ui/sdk";

const client = new JazzmineClient("https://your-jazzmine-api.example.com", {
  apiKey: "your-api-key",
});

const reply = await client.chat({ message: "Summarize this dataset." });
console.log(reply.response);

2) Streaming chat

import JazzmineClient from "@jazzmine-ui/sdk";

const client = new JazzmineClient("https://your-jazzmine-api.example.com");

const final = await client.chatStream(
  { message: "Plan a 5-day trip to Tokyo." },
  {
    onIntermediate: (event) => {
      console.log("intermediate", event);
    },
    onDone: (response) => {
      console.log("done", response.response);
    },
    onErrorEvent: (event) => {
      console.error("stream error event", event);
    },
  },
);

console.log(final.conversation_id);

3) Convenience sendMessage flow

import JazzmineClient from "@jazzmine-ui/sdk";

const client = new JazzmineClient("https://your-jazzmine-api.example.com", {
  defaultUserId: "alice",
});

const { response, conversationId } = await client.sendMessage("Start a new thread", {
  autoCreateConversation: true,
  conversationTitle: "Project planning",
});

console.log(conversationId, response.response);

Constructor

new JazzmineClient(baseEndpoint: string, options?: JazzmineClientOptions)

Constructor options

| Option | Type | Default | Description | | --- | --- | --- | --- | | apiKey | string | undefined | Bearer token added as Authorization: Bearer <apiKey>. | | timeoutMs | number | 20000 | Request timeout in milliseconds. | | retries | number | 2 | Default retry attempts for retryable requests. | | retryBackoffMs | number | 350 | Linear backoff base in milliseconds. | | autoDiscoverEndpoints | boolean | true | Auto-load endpoint routes from /info when available. | | defaultUserId | string | "user" | Fallback user_id for requests. | | fetchImpl | typeof fetch | runtime fetch | Custom fetch implementation for non-browser runtimes. |

Public API

getHealth(requestOptions?: RequestOptions): Promise<HealthResponse>
getInfo(requestOptions?: RequestOptions): Promise<InfoResponse>
createConversation(payload?: ConversationCreateRequest, requestOptions?: RequestOptions): Promise<ConversationCreateResponse>
deleteConversation(conversationId: string, requestOptions?: RequestOptions): Promise<ConversationDeleteResponse>
chat(payload: ChatRequestPayload, requestOptions?: RequestOptions): Promise<ChatResponse>
chatStream(payload: ChatRequestPayload, handlers?: StreamHandlers, requestOptions?: RequestOptions): Promise<ChatResponse>
sendMessage(message: string, options?: {
  conversationId?: string;
  userId?: string;
  explicitContext?: string[];
  metadata?: Record<string, unknown>;
  autoCreateConversation?: boolean;
  conversationTitle?: string;
  requestOptions?: RequestOptions;
}): Promise<{ response: ChatResponse; conversationId: string }>
resolveServerEndpoints(requestOptions?: RequestOptions): Promise<{
  chat: string;
  stream: string;
  conversations: string;
  health: string;
  info: string;
}>

Error Handling

Errors thrown by the client are instances of JazzmineClientError.

class JazzmineClientError extends Error {
  status?: number;
  code?: string;
  details?: unknown;
}
  • status: HTTP status code when available.
  • code: Optional semantic code (for example stream error event codes).
  • details: Parsed response payload or low-level details when available.

Framework Compatibility

@jazzmine-ui/sdk is framework-agnostic and can be used from React, Vue, Svelte, Next.js, and vanilla JavaScript/TypeScript apps.

Node.js Note

  • Node.js 18+ includes fetch globally and works out of the box.
  • For Node.js versions below 18, provide a fetch implementation via fetchImpl (for example from undici or cross-fetch).