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

@soa-harness/chat-ui

v1.3.3

Published

Direct-to-Runner chat UI per Core §16.6 streaming dispatcher. React + Vite. SSE consumer, permission prompt overlay, audit tail viewer. Single-session, session-bearer auth; no Gateway (M11), no OAuth (M11). Targets WCAG 2.1 AA for v1.2.0 ship.

Downloads

811

Readme

@soa-harness/chat-ui

Direct-to-Runner chat UI for SOA-Harness v1.2. React + TypeScript. Zero dependencies beyond React and @soa-harness/runner type imports.

What's in the box

  • ChatView — full chat interface. Textarea input, message list, SSE-streamed assistant replies via §16.6 dispatcher. Auto-scrolls, shows terminal stop_reason when not NaturalStop.
  • AuditTailViewer — polls /audit/tail on an interval, renders rows with role="feed". Hash-chain this_hash preview visible for verification.
  • PermissionPromptOverlay — modal overlay surfacing §10.3 / §14.1 PermissionPrompt events. Focus-trapped, Escape denies, Allow/Deny buttons carry tool-specific aria-labels.
  • useDispatchStream — the SSE consumer primitive. Fires POST /dispatch with Accept: text/event-stream, parses each frame per §16.6.2, aggregates ContentBlockDelta.text into a text string, tracks terminal stop_reason. Returns { start, cancel } so callers can manually drive lifecycle.

Scope for v1.2

Direct-to-Runner only — no Gateway (that's M11), no OAuth (also M11). The UI authenticates via a session bearer that the embedding app is responsible for minting via POST /sessions. One session per mount.

Accessibility

Targets WCAG 2.1 AA:

  • Message list is role="log" + aria-live="polite".
  • Chat input has a visible <label> + keyboard shortcuts hint (Enter sends, Shift+Enter newlines).
  • Permission prompt is role="dialog" + aria-modal="true" with focus trap.
  • Audit tail polling announces new rows via a visually-hidden role="status" region.
  • Buttons have explicit aria-labels when the visible text doesn't carry full context (Cancel button, Allow/Deny).
  • Colors are not hardcoded; data-attributes (data-role, data-testid) let adopters theme without patching the package.

Adopters SHOULD run axe-core or equivalent against their shell app, since keyboard contrast and reduced-motion responsiveness depend on the wrapping CSS.

Example

import { ChatView, AuditTailViewer } from "@soa-harness/chat-ui";

export function App({ runnerUrl, sessionBearer, sessionId }) {
  return (
    <main>
      <ChatView
        runnerUrl={runnerUrl}
        sessionBearer={sessionBearer}
        sessionId={sessionId}
        model="example-adapter-model-id"
        billingTag="tenant-a/env-prod"
      />
      <AuditTailViewer runnerUrl={runnerUrl} sessionBearer={sessionBearer} />
    </main>
  );
}

Out of scope for v1.2

  • Multi-session chat (M9+)
  • Tool-use mid-stream UI (requires richer ContentBlockDelta handling when delta.partial_json fires)
  • Dispatch history / replay (requires admin-bearer to /dispatch/recent — not in the adopter-auth path)
  • Localization beyond lang="en"

None of the above change the v1.2 wire contract; they're all additive UI work that can land in a v1.2.x patch or M9+.