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

@wasserstoff/aitutor

v1.0.0

Published

TypeScript SDK for AI Learning API

Readme

@wasserstoff/aitutor

A TypeScript SDK for interacting with the AI Learning API. This SDK provides a clean, type-safe interface for creating and managing learning sessions.

Installation

npm install @wasserstoff/aitutor

Configuration

To use the AITutor SDK, you need an API token. You can generate a new token by visiting the AITutor platform.

Once you have your token, you can set it using the setToken method as shown in the Usage section below.

Usage

First, import the tutorAI SDK instance and set your authentication token.

import { tutorAI } from '@wasserstoff/aitutor';

// Set your auth token
tutorAI.setToken('YOUR_AUTH_TOKEN');

// Create a new learning session
const createSession = async () => {
  try {
    const session = await tutorAI.createSession('devops', {
      experience: 'beginner',
      learning_style: 'visual'
    });
    
    console.log('Session created:', session);
    return session;
  } catch (error) {
    console.error('Error creating session:', error);
  }
};

// Submit an answer
const submitAnswer = async (sessionId: string, answer: string) => {
  try {
    const response = await tutorAI.submitAnswer(sessionId, answer);
    console.log('Answer feedback:', response);
    
    // If the answer is incorrect, get learning resources
    if (response.correctness === 'incorrect' && response.needs_resources) {
      const resources = await tutorAI.getResources(
        sessionId,
        response.question,
        answer
      );
      console.log('Learning resources:', resources);
    }
  } catch (error) {
    console.error('Error submitting answer:', error);
  }
};

// Get session personas
const getPersonas = async (sessionId: string) => {
  try {
    const personas = await tutorAI.getPersonas(sessionId);
    console.log('Session personas:', personas);
  } catch (error) {
    console.error('Error getting personas:', error);
  }
};

Development

To run the SDK locally for development:

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Start the development server with hot-reload:
npm run dev

This will run the test script (src/test.ts) which demonstrates all SDK functionality:

  • Creating a session
  • Submitting answers
  • Getting learning resources
  • Retrieving session personas

The development server uses nodemon to automatically restart when you make changes to the source files.

API Reference

The SDK is exported as a pre-configured instance tutorAI.

setToken(token: string)

Sets the authentication token required for all API calls.

createSession(topic: string, userPersona: UserPersona)

Creates a new learning session for the specified topic.

submitAnswer(sessionId: string, answer: string)

Submits an answer for the current question in the session.

getResources(sessionId: string, question: string, answer: string, useCombinedSearch?: boolean)

Retrieves learning resources for incorrect answers.

getPersonas(sessionId: string)

Retrieves the user and teacher personas for the current session.

Available Scripts

  • npm run build - Build the SDK
  • npm run dev - Run the development server with hot-reload
  • npm run test - Run tests
  • npm run lint - Run ESLint
  • npm run prepare - Build before publishing

License

MIT