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

@gagandeep023/support-chat-core

v0.1.3

Published

Shared types, wire protocol, and provider interfaces for support-chat.

Readme

@gagandeep023/support-chat-core

The shared vocabulary of support-chat: domain types, the wire protocol both ends speak, and the reconnect backoff they agree on.

npm i @gagandeep023/support-chat-core

zod is the only dependency. Every other support-chat package depends on this one, so you rarely install it directly. Reach for it when you are writing your own server, your own widget, or a provider, and need to be sure you agree with everything else about what a message is.

What is in it

import type {
  Conversation, Message, Actor, Event, Knowledge,
  ChatProvider, EmbeddingProvider, DiagnosisProvider,
} from "@gagandeep023/support-chat-core";

Domain (conversation, message, actor, event, knowledge) is the state both ends reason about. Providers are the interfaces you implement to plug in a model, an embedding backend, or a diagnosis routine; the server depends on these interfaces rather than on any vendor.

Ids and errors are shared so an id minted on the server is the same shape the widget validates, and a failure means the same thing on both sides.

The protocol

import { /* frame schemas */ }
  from "@gagandeep023/support-chat-core/protocol";

A separate entry point covering the widget frames, the agent frames, the envelope that wraps both, and the reconnect backoff.

The backoff living in the protocol rather than in each client is deliberate. A deploy drains every socket at once, so if each client reconnected on its own timer the result is a thundering herd against a server that has just restarted. Both clients import the same schedule, and the server tells them when to come back.

Frames are zod schemas, not interfaces, so a malformed frame is rejected at the boundary with a real error instead of becoming undefined three layers in.


The rest of support-chat

| Package | What it is | | --- | --- | | @gagandeep023/support-chat-core | Types, wire protocol, reconnect backoff | | @gagandeep023/support-chat-server | The engine: socket gateway, retrieval, routing, host tools, stores | | @gagandeep023/support-chat-widget | Customer-facing chat: web component, React, or headless | | @gagandeep023/support-chat-agent-console | Agent side, as a React component for your dashboard | | @gagandeep023/support-chat-cli | dev, doctor, eval |

The repository README is the full walkthrough, and DESIGN.md records what was rejected and why.

Requests and feedback

Request a feature Report a bug

Ideas and questions go to Discussions, bugs to Issues.

License

MIT