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

@varo-ui/ai

v2.2.0

Published

Shared event protocol, streaming controller, and safe Markdown primitives for Varo Agent UI.

Downloads

411

Readme

@varo-ui/ai

Provider-neutral Agent event protocol, SSE/chunk decoding, streaming controller, and safe Markdown view model for Varo applications.

Install

pnpm add @varo-ui/ai

Usage

For an application-owned chunked request, feed its bytes to the transport and connect the normalized event stream:

import { createAgentSseEventSource, createAgentStreamController } from '@varo-ui/ai'

const transport = createAgentSseEventSource()
const controller = createAgentStreamController()

requestTask.onChunkReceived(({ data }) => transport.feed(data))
await controller.connect(transport.source)

connect() owns the iterator lifecycle: protocol done/error events settle the connection and request iterator cleanup, while natural iterator exhaustion synthesizes done.

The application must call transport.end() on normal transport completion or transport.fail(error) on request failure. Unsubscribe UI listeners and call controller.destroy() at teardown. Controller cancellation closes its iterator and local streaming lifecycle; it does not authorize a purchase, execute a tool, abort an application's network request, or choose a retry policy.

The root export provides the compiled protocol/controller API; @varo-ui/ai/source remains an explicit source entry. Neither entry is a provider SDK or a renderer. Shared presentation types/helpers live in the Registry agent-presentation unit, while target lifecycle/render code remains in H5 or native source.

Thread versions

import { createAgentThreadController } from '@varo-ui/ai'

const thread = createAgentThreadController()
thread.append({ id: 'root', label: 'Initial answer' })
thread.fork('root', { id: 'verified', label: 'Verified branch' })
thread.select('root')

The controller owns an immutable acyclic version graph. append() and fork() activate the new version; invalid ids, missing parents, cycles, and post-destroy mutations fail immediately.

Install presentation source separately

# Conversation-only dependency closure
pnpm dlx @varo-ui/cli add --target h5 blocks/agent-chat
pnpm dlx @varo-ui/cli add --target weapp blocks/agent-chat

# Optional individual units
pnpm dlx @varo-ui/cli add --target h5 components/agent-workspace
pnpm dlx @varo-ui/cli add --target weapp components/agent-rag

# Intentional full suite
pnpm dlx @varo-ui/cli add --target h5 components/agent-ui

| Registry item | Responsibility | | ------------------------------- | ---------------------------------------------------------------------------------------- | | components/agent-presentation | Pure presentation types and helpers shared by renderers | | components/agent-conversation | Conversation, Markdown, streaming, reasoning, tools, approvals, and composition | | components/agent-workspace | Context/retrieval receipts, task presentation, thread versions, and workspace placement | | components/agent-advanced | Optional diffs, media, citations, tables, workflows, fine-tuning controls, and artifacts | | components/agent-rag | Retrieval pipeline progress and source-linked answers | | components/agent-ui | Deliberate composition of the full suite, not a compatibility alias |

blocks/agent-chat selects the conversation closure and does not pull advanced/RAG/fine-tuning source. When migrating from an all-in-one install, choose the unit you actually use; manually reconcile existing local customizations before any --force replacement. The CLI reports npm dependencies without installing them.

Rendered Agent units depend on optional themes/agent; themes/base no longer carries Agent tokens/helpers. H5 source brings dependency CSS imports. Native source consumers load all installed src/styles/*.css globally through weapp.styles with include: 'app.vue', varo.css first, including varo-agent.css. Do not import page/global CSS from component-local WXSS.

These units declare H5/Weapp renderer support. The experimental alipay, tt, xhs, donut-android, donut-ios, and donut-ohos profiles do not gain Agent admission merely by sharing the native renderer; the complete selected manifest closure must explicitly admit a profile.

Registry source and styles are canonical. pnpm sync:registry projects them into the playgrounds and docs Agent source; pnpm check:generated detects drift. After generation and package builds, pnpm check:consumers checks the minimal Chat closure in actual CLI consumers. None of these commands asserts provider/network execution policy or device certification.

Documentation · Repository