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

@vitest-agent/ui

v1.0.0

Published

Shared event-sourced renderer for vitest-agent. React Ink view for humans, plain-string view for agents, both fed by the same reducer over a RunEvent stream.

Readme

@vitest-agent/ui

npm License: MIT TypeScript 6.0

Part of the vitest-agent ecosystem. Most users want @vitest-agent/plugin, which pulls this package in automatically. Install @vitest-agent/ui directly only if you build custom rendering on the primitives.

Pure rendering primitives for vitest-agent. Owns the RunEvent reducer, the shape-tailored 12-cell dispatcher matrix, two render paths (agent string and React Ink tree), a PubSub channel for live event transport, and the synthesizers that bridge live Vitest data and stored reports into the event taxonomy. React and Ink are required peer dependencies.

Features

  • Reducer — pure (state, event) => state fold over the RunEvent discriminated union; reduceRenderStateAll for one-shot replay
  • Dispatcher matrixdispatch and dispatchInk route a DispatchInputs to the matching (RunShape, RunOutcome) cell; classifyRunShape and classifyOutcome derive the coordinates
  • Ink componentsStreamApp and the supporting primitives (ModuleHeader, TestRow, CoverageBlock, TrendLine, FailureSection, etc.) for live stream-mode frames
  • PubSub channelRunEventChannel Effect tag and helpers (accumulateUntilFinished, forEachRenderState, renderStateStream) for live event transport
  • SynthesizerssynthesizeRunEvents from live Vitest modules; synthesizeFromAgentReport from a stored AgentReport
  • Footer builderbuildFooter assembles the L1 MCP-tool-pointer footer; dominantClassification picks the most actionable failure class

Install

npm install @vitest-agent/ui
# or
pnpm add @vitest-agent/ui

React and Ink are required peers:

npm install react ink

Quick start

import { reduceRenderStateAll } from "@vitest-agent/ui";
import { dispatch } from "@vitest-agent/ui";

const state = reduceRenderStateAll(events);
// state is a fully reduced RenderState

const agentString = dispatch(buildDispatchInputs(state, input), opts);
// agentString is the markdown-flavored final-frame string for the run

Documentation

Package reference at vitest-agent.dev/ui.

License

MIT