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

@michi-vz/insights

v0.2.10

Published

Opt-in, client-side AI insights (forecast/fan, anomaly, validate, narrate, embeddings, agent + MCP) for michi-vz

Readme

@michi-vz/insights

Opt-in, client-side AI / predictive / agent layer for michi-vz charts.

The chart engine (@michi-vz/core) stays zero-AI-dependency. This package adds forecasting, anomaly detection, narration, embeddings, an agent/MCP surface, and more - each as its own tree-shakeable sub-path, so a chart that uses none of it ships zero extra bytes. The statistical features need no model download; model features are opt-in and local-first (they fall back gracefully).

npm i @michi-vz/insights

At a glance

| Import | What you get | | --- | --- | | @michi-vz/insights/forecast | forecast() plugin (dashed prediction + confidence band + backtested accuracy), scenarios, trendline, threshold + "fall point", Monte Carlo, seasonality/STL, changepoints, goal-seek, forecastFan() | | @michi-vz/insights/anomaly | anomaly() / detectAnomalies() - z-score / IQR / forecast-band outliers | | @michi-vz/insights/validate | validate() - richer data-quality warnings | | @michi-vz/insights/narrate | narrate() / explainChart() - plain-English "explain this chart" (rules baseline, opt-in SLM/remote) | | @michi-vz/insights/embeddings | findSimilar() / createEmbedder() - semantic search (hash fallback, opt-in BERT/MiniLM) | | @michi-vz/insights/sql | aggregate() - group-by/measures wrangling (opt-in DuckDB-Wasm) | | @michi-vz/insights/sonify | sonify() - hear a series as pitch (accessibility) | | @michi-vz/insights/agent | createAgent() + tool registry - an in-page agent that reads & drives charts | | @michi-vz/insights/mcp | createMcpServer() - an MCP server so Claude Code / Codex / Cursor can read & drive charts |

Forecasting (the headline)

Add the plugin to a chart - nothing else changes:

import { mountLineChart } from "@michi-vz/core";
import { forecast } from "@michi-vz/insights/forecast";

const chart = mountLineChart(el, { dataSet: revenue, xAxisDataType: "date_annual" }, {
  plugins: [forecast({ method: "holt-winters", horizon: 4, level: 0.95 })],
});
chart.getContext().summary;
// "...Forecast: Revenue projected to 189 by 2027 (holt-winters, MAPE 6.1%)."

It works on Line, Fan, Range, Area, Vertical-Stack-Bar, Ribbon, and Bar-Bell (per-chart adapters extend each into the future). Line/Range/Fan render the uncertainty natively (dashed tail / band); the Fan chart is the richest presentation - build its data in one call with forecastFan(history, opts).

Scenarios, threshold & alerting

forecast({
  horizon: 8,
  scenarios: [{ name: "optimistic", growth: 0.15 }, { name: "pessimistic", growth: -0.1 }],
  threshold: { value: 0, label: "Break-even" },
  onThresholdBreach: (b) => alertOps(b), // fires when the forecast is projected to cross the line
});

Agents & MCP - charts AI can read and drive

Every chart already emits a structured ChartContext. The agent layer turns that + the chart's controls into tools an LLM can call.

// In-page agent (bring your own LLM caller)
import { createAgent, chartHandle } from "@michi-vz/insights/agent";
const agent = createAgent({ charts: [chartHandle("revenue", chart, props)], llm: myCaller });
await agent.ask("Filter to the top 5 and forecast next quarter");

// MCP server (Claude Code / Codex / Cursor / Claude Desktop)
import { createAgentRegistry, chartHandle } from "@michi-vz/insights/agent";
import { createMcpServer, stdioTransport } from "@michi-vz/insights/mcp";
const reg = createAgentRegistry();
reg.register(chartHandle("revenue", chart, props));
createMcpServer(reg, stdioTransport());

Principles

  • Opt-in & tree-shakeable - unused capabilities ship zero bytes.
  • Graceful degradation - statistical/rule-based paths need no model; model paths fall back.
  • Privacy by default - data stays in the browser; remote backends are opt-in.
  • Permissive-OSS only - no model is ever bundled.

Full guide: michi-vz docs → Insights.

For AI assistants

The whole library is documented in one machine-readable file: llms-full.txt (compact index: llms.txt). Point a coding agent at it for correct props, usage per framework, and the ChartContext shape.

MIT © Beany Vu