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

@adia-ai/a2ui

v0.8.50

Published

The A2UI protocol — runtime (renderer, registry, streams, surface manifest, wiring primitives, dockable base classes) plus protocol-side validation. Framework-agnostic and dependency-free; pairs with any A2UI-conformant component set. Folded from @adia-ai

Readme

@adia-ai/a2ui

Formerly @adia-ai/a2ui-runtime; renamed at ADR-0048 P3, which folded the runtime into this package root and added protocol-side validation at ./validate. Runtime subpath exports are unchanged.

The A2UI protocol — renderer, registry, streams, surface manifest, and wiring primitives for A2UI (Agent-to-UI), plus protocol-side validation. Framework-agnostic and dependency-free; pairs with any A2UI-conformant component set.

Install

npm install @adia-ai/a2ui

Typically paired with @adia-ai/web-components (which provides the custom-element catalog the renderer resolves against):

npm install @adia-ai/a2ui @adia-ai/web-components

What's in the box

  • A2UIRenderer — processes A2UI protocol messages and writes custom elements to a container.
  • registry / resolveTag / registerType — A2UI protocol component name → custom-element tag map. Extensible via registerType.
  • TransportssseStream, wsStream, mockStream, mcpStream, jsonlStream. Normalize inbound A2UI messages from SSE, WebSocket, mock fixtures, MCP tool calls, or JSONL logs.
  • SurfaceManifest / Surface — design-time surface shape + runtime lifecycle for cross-surface data flow.
  • Wiring primitivesWiringEngine, wiringRegistry, createDockables, plus the dockable base classes (ControllerDock, DataSourceDock, ActionDock, ProviderDock, LifecycleDock).
  • Controllers — lazy-loaded runtime state managers at controllers/: FormController, DataStreamController, SelectionController, ToggleController, AccordionController, StateMachineController, plus BaseController. Registered in the wiring registry for lazy resolution; surface only imports what it declares.

Minimal usage

import { A2UIRenderer, jsonlStream } from '@adia-ai/a2ui';
import '@adia-ai/web-components';   // register the custom elements

const container = document.querySelector('#app');
const renderer = new A2UIRenderer(container);

for await (const msg of jsonlStream(fetch('/api/ui-trace.jsonl').then(r => r.body))) {
  renderer.process(msg);
}

For declarative embedding in HTML, use the <a2ui-root> element from @adia-ai/web-modules/runtime — it wraps A2UIRenderer + stream wiring in a custom element. (Was @adia-ai/web-components/patterns/ prior to the package split per ADR-0012.)

Public entry points

The default export bundles the common surface. Granular subpath imports are available if you want to tree-shake:

import { A2UIRenderer }    from '@adia-ai/a2ui/renderer';
import { resolveTag }      from '@adia-ai/a2ui/registry';
import { sseStream }       from '@adia-ai/a2ui/streams';
import { SurfaceManifest } from '@adia-ai/a2ui/surface';
import { WiringEngine }    from '@adia-ai/a2ui/wiring';
import { ActionDock }      from '@adia-ai/a2ui/dockables';
import { validateSchema } from '@adia-ai/a2ui/validate';

import catalog   from '@adia-ai/a2ui/catalog'        with { type: 'json' };
import tierIndex from '@adia-ai/a2ui/catalog/tiers'  with { type: 'json' };

./catalog is the contract (ADR-0050): one freestanding JSON Schema document listing every component, its props, and its taxonomy — enough to emit valid A2UI with nothing else installed. ./catalog/tiers is the derived L0–L4 ladder index (L0 primitives · L1 widgets · L2 layouts · L3 shells · L4 flows), under one law: every tier-N entry is a declared composition of tier-(N−1) entries. L0 (every component) and L1 (curated widget compositions) are populated today; L2–L4 are reserved while curation lands. ./catalog/common-types and ./catalog/functions are the catalog's authoring sources. All of it is exported data — this package stays dependency-free. The harvested chunk corpus that derives from the catalog is generation fuel and lives in @adia-ai/gen-ui.

./validate is the protocol-side validator — structural + wiring/registry coherence checks against the A2UI protocol, no catalog and no LLM, so it keeps this package dependency-free. Catalog-aware validation and the LLM semantic judge live in @adia-ai/gen-ui (./validate/catalog, ./validate/semantic) per ADR-0048.

Relationship to other packages

  • @adia-ai/web-components — the custom-element catalog the renderer resolves tags against. Depends on this package at runtime (as of web-components v0.0.4).
  • @adia-ai/web-modules/runtime/a2ui-root — the declarative <a2ui-root> custom element; wraps this package's renderer + stream. Extracted from @adia-ai/web-components/patterns/ per ADR-0012.

License

(See repository root.)