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

@yarlisai/assistant

v0.2.0

Published

Yarlis site assistants: a streaming chat service grounded in a site's docs, one profile per site, and the widget that embeds it.

Readme

Yarlis Assistant

AI chat assistants for websites: a streaming chat service that answers from a site's own docs, with one profile per site, and the widget that embeds it. Sam (rulescascade.com) runs from this repository; Maxi (sdods.com) runs the same engine from npm with SDODS's own step tools.

site page ── <script src=…/widget.js> ── POST /chat (SSE) ──► Cloud Run <id>-assistant ──► Claude API
                                                                │   ├─ web_fetch (index mode, own domains)
                                                                │   └─ MCP connector → the product's MCP server
                                                                ├─ Secret Manager: <id>-anthropic-key
                                                                └─ Firestore: <id>Chats, <id>Usage

What a profile sets

assistants/<id>.yaml (schema and defaults: src/profile.ts): the persona, what it knows, its tools, the wording of its errors, who may call it and what its widget looks like.

| Assistant | Site | Knowledge | Tools | Service | | --- | --- | --- | --- | --- | | Sam | rulescascade.com | index: rulescascade.com/llms.txt, pages fetched with web_fetch (rulescascade.com only) | the hosted Rule Cascade MCP server (read-only), through the MCP connector | sam-assistant | | Maxi | sdods.com, docs.sdods.com | full: docs.sdods.com/llms-full.txt in the cached prompt | find_steps, validate_feature (SDODS's own, packages/maxi in sdods) | sdods-maxi, deployed from sdods |

Knowledge modes. full sends the whole corpus on every turn (cached for an hour), which fits a corpus up to roughly 150K tokens. index sends an index and lets the assistant fetch the pages a question needs, for anything bigger.

Embedding

Any site adds one tag; the script reads the service's /widget.json and mounts the chat in a shadow root, so neither page's CSS reaches the other:

<script src="https://<domain>/widget.js" defer></script>

<domain> is the profile's domain:, a subdomain of the product the assistant serves (Sam is sam.rulescascade.com). It is a Cloud Run domain mapping, which costs nothing, and it keeps the run.app URL out of every site, so a service can move to another project without a site change.

A React site can render the chat itself:

import { AssistantChat } from '@yarlisai/assistant/widget';
import '@yarlisai/assistant/styles.css';

<AssistantChat endpoint={process.env.NEXT_PUBLIC_SAM_URL} name="Sam" greeting="Hi, I'm Sam." />;

The package

@yarlisai/assistant on npm:

| Import | What | | --- | --- | | @yarlisai/assistant | the engine: startAssistant, buildAssistantServer, runChat, profiles, the corpus, the stores | | @yarlisai/assistant/widget | AssistantChat and its helpers (React 19) | | @yarlisai/assistant/styles.css | the widget's styles | | @yarlisai/assistant/widget.js | the built embed script, for an image that serves /widget.js | | @yarlisai/assistant/testing | fakeClient, a scripted stand-in for the Claude API |

Started from the package (not the image), a YAML profile needs ASSISTANTS_DIR pointing at the folder that holds <id>.yaml: the package ships the engine, not the profiles.

A host with tools that must run inside the service passes them in:

import { startAssistant } from '@yarlisai/assistant';

await startAssistant({ builtin: MY_PROFILE, tools: () => ({ definitions, run }) });

Develop

bun install
bun run type-check && bun run test && bun run build
ASSISTANT=sam ANTHROPIC_API_KEY=… bun run dev

Deploy

| Once per | Step | | --- | --- | | GCP project | a person creates yarlis-assistant and links billing; then bash deploy/setup-project.sh and set the two repository variables it prints | | assistant | a person makes its Anthropic key in its own Console workspace with a monthly spend limit, stored as <id>-anthropic-key (ykeep); then bash deploy/provision-assistant.sh <id>, and its Firestore rules pair (firebase deploy --only firestore:rules --project yarlis-assistant) | | assistant domain | set domain: in the profile; after the first deploy, run provision-assistant.sh <id> again (as a verified owner of the domain) to map it, add the CNAME to ghs.googlehosted.com. it prints (yarlis-networks scripts/dns-txt.sh cname), and declare the host in yarlis-networks apps/assistant.env | | change | merge to main: the deploy workflow builds one image and deploys every provisioned profile |

The site-assistant skill (.claude/skills/site-assistant) walks through adding and operating one. Publishing: bump version in package.json; merging it publishes to npm (release workflow).

Licence

Apache-2.0.