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

@yaebal/conversation

v0.2.0

Published

yaebal conversation — coroutine-style multi-step dialogs with a durable, restart-safe replay engine as a drop-in upgrade.

Readme

@yaebal/conversation

write multi-step dialogs as a straight line — await cv.waitFor(...) resolves with the next matching update for that key. a coroutine by default (the builder runs once, detached, no replay, no duplicated side effects); opt into a durable, restart-safe replay engine with one option.

install

pnpm add @yaebal/conversation

usage

import { conversation, createConversation } from "@yaebal/conversation";
import { createBot } from "yaebal";

const greet = createConversation(async (cv, ctx) => {
	await ctx.send("what's your name?");

	const answer = await cv.waitFor("message:text"); // narrowed: answer.text is a plain string
	await answer.send(`hi ${answer.text}! nice to meet you.`);
});

const bot = createBot(token).install(conversation({ greet }));

bot.command("greet", (ctx) => ctx.conversation.enter("greet")); // names are typed
bot.command("cancel", (ctx) => ctx.conversation.active && ctx.conversation.leave()); // works mid-conversation

behavior

  • typed waitingwaitFor(query) narrows like composer.on(), waitUntil(predicate) takes any sync/async predicate (with a type-guard overload); cv.form.text/int/choice/confirm are ready-made ask-validate-reask loops on top, with standard-schema support.
  • polite routing — an update that doesn't match the parked wait() falls through to normal handlers (passthrough), and /commands bypass the conversation (passCommands), so a global /cancel keeps working with zero per-step boilerplate.
  • cancellation and timeoutsleave() rejects a parked wait() with ConversationExitedError (the builder's finally still runs); every wait accepts a timeout, rejecting with ConversationTimeoutError. cv.signal is an AbortSignal for fetch.
  • the durable engine — pass options.storage (any StorageAdapter, see @yaebal/sklad) and the builder is replayed from a recorded log on every update instead of parking in memory, so it survives a restart. requires a deterministic builder: route every side effect through ctx or cv.external(), never branch on outside mutable state.
  • hooksonEnter, onLeave(ctx, { reason, result, error }) with reasons finish | left | replaced | timeout | error, onError, onOverflow.
  • enter() doesn't wait for completion — only for the conversation to start (bounded, fast), so calling it as a bare, unawaited command-handler return value never deadlocks. read the result back via onLeave's info.result.

part of yaebal — a type-safe, runtime-agnostic Telegram Bot API framework. MIT.