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

@agents-js/a2ui-renderer

v0.4.0

Published

Maps A2UI component trees onto the acp-* Lit primitives shipped by agents-js.

Readme

@agents-js/a2ui-renderer

Maps A2UI component trees onto the acp-* Lit primitives shipped by agents-js.

Installation

bun add @agents-js/a2ui-renderer

API

Classes

  • A2uiRendererError — Error thrown by the A2UI renderer when it cannot map an A2UI component onto a concrete host primitive (unknown catalog id, unknown component name, or property-binding failure).

Functions

  • bindAuthSelector
  • bindChatApp
  • bindCodeBlock
  • bindConnectDialog
  • bindDebugPanel
  • bindElicitationForm
  • bindMessage
  • bindModelSelector
  • bindPermissionModal
  • bindPermissionModeSelector
  • bindPromptInput
  • bindStatusBar
  • bindStreamingText
  • bindTranscript
  • bindWriteGateModal
  • renderA2uiComponent — Render a single A2UI component node into a Lit TemplateResult. Throws A2uiRendererError when the catalog id is unknown or when the component name is not present in the ACP catalog.
  • renderSurface — Render a full A2UI surface (or every surface in a group) into a single Lit TemplateResult.

Interfaces

  • A2uiComponentNode — Minimum shape this renderer needs from an A2UI component entry.
  • BindingContext — Context passed to every binding function.
  • ComponentLike — Minimal shape of a /web_core ComponentModel that the surface view reads. Both real models and plain-object fakes satisfy this shape.
  • RenderOptions — Options accepted by the renderer.
  • RenderSurfaceOptions — Options for {renderSurface}.
  • SurfaceGroupLike — Minimal shape of a SurfaceGroupModel as the renderer needs it.
  • SurfaceLike — Minimal shape of a surface as the renderer needs it.

Types

  • A2uiAction — An A2UI Action — either an action name string or a { action: string } object.
  • A2uiEventHandler — Handler fired whenever an ACP primitive emits an event that should be forwarded.
  • BindingResult — Type-shape returned by the binding functions.
  • DynamicValue — An A2UI DynamicString / DynamicBoolean — a literal or a { path } binding.

Constants

  • ACP_BINDINGS — Map from A2UI ACP component name (per ComponentApi.name) to binding function. Populated once at module load — matches the frozen 15-component ACP catalog.
  • DEFAULT_SURFACE_ID — Surface id used by {renderA2uiComponent} when callers omit an explicit surfaceId. Hosts that render a single surface can rely on this value when wiring up their action-event handlers.

Dependencies

  • @agents-js/a2ui-types
  • @agents-js/ui-components

Peer Dependencies

  • lit

License

MIT