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

@aseity/agent-ui-protocol

v0.9.0

Published

Shared protocol schemas and types for agent UI event streams and interactions.

Downloads

1,155

Readme

@aseity/agent-ui-protocol

Shared Zod schemas and TypeScript types for agent UI event streams and interaction responses.

pnpm add @aseity/agent-ui-protocol zod
import {
  UIEvent,
  type UIEvent as UIEventType,
} from '@aseity/agent-ui-protocol';

The package is intended to be consumed by both the API and UI so the streaming event and interaction contracts stay aligned.

Persisted assistant messages in SessionMessages may include an optional error using the same ProtocolError shape as turn_end: code, message, and optional max_attempts. An empty message is valid and is preserved during parsing. Messages without error remain valid; parsing does not invent a failure reason.

session_event optionally carries current_turn (or null when idle): { turnId, status, pendingInteractions: [{ interactionId, data }] }. Its status is running or a TurnStopStatus; hosts map waiting and stopping to running. Interaction data uses InteractionRequestData. The event type list is unchanged. TurnStopStatus and historical TurnStatus now also accept interrupted.

Workspace artifacts

The host emits turn_artifacts after collecting a turn's workspace artifacts and before turn_end. The event name, turn identity and collection timing are unchanged:

{
  type: 'turn_artifacts',
  turn_id: 'turn_1',
  artifacts: [
    { entryPath: 'reports/index.html', artifactType: 'webpage' },
    { entryPath: 'slides/index.html', artifactType: 'presentation' },
  ],
}

ArtifactReference contains a nonempty entryPath and an artifactType of document, webpage, presentation, spreadsheet or image. The host supplies the full relative entry path within the session workspace. Identity is scoped to the session: the same path in another session identifies a different artifact. Paths are kept intact; matching filenames in different directories are distinct.

The store replaces the referenced turn's collection and deduplicates by full entryPath, retaining the last reference for a repeated path. An empty array clears that turn's collection. The same path can appear independently in multiple turns. AssistantMessage.artifacts and SessionTurnSummary.artifacts preserve these references through history loading and pagination, including turns with no assistant text. Hydration applies the same per-turn deduplication as event replay.

References identify current workspace files, not library entries or content snapshots. The host resolves content and access permissions; the SDK does not save files to a library or define preview routes.

Migrating from 0.6.x

Upgrade @aseity/agent-ui-protocol and @aseity/agent-chat-react together to 0.7.0. Replace { id } in events and historical turn summaries with { entryPath, artifactType }; the old shape is no longer supported. Attachments and other message fields are unchanged.

The SDK's transport reads history afresh on every listMessages call and has no persistent history cache or cache format version. Hosts that cache history must bump their own cache/projection format version and discard old { id } data before hydrating the store, including when protocol validation is disabled. The default transport validation rejects legacy references; it does not migrate them. Harnex must upgrade its server history projection and client cache together.