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

@ouispec/agent-react

v0.10.0

Published

React bindings — view annotations, execution engine, agent UI components

Readme

@ouispec/agent-react

The agent in a React app: the provider that runs turns against the product's API and realtime server, the hooks a chat UI is built from, and the card where a person approves an irreversible action.

npm install @ouispec/agent-react
  • AgentProvider and useAgent: the conversation, its messages and tool calls, sending a turn, and the turn's stream. The socket is a seam (realtime.createSocket), so a product supplies its own connection and credentials.
  • stopTurn, isStopping and acceptedTurnId on useAgent: the person's Stop for the turn in progress, and the turn whose UI requests the tab runs now (give it to the tab's OUI runtime: accept: acceptCurrentTurn(agent.acceptedTurnId)). A message sent while a turn runs supersedes it; a stopped turn's message keeps what it had said, marked stopped.
  • sendMessage(content, options?) on useAgent: sends the person's message. options.attachments gives the message's files by reference (an array alone as the second argument does the same); without them it carries the composer's ready files. options.input says how a message was entered when it was not typed: { mode: 'voice', language } for one the person spoke, with the language the recogniser detected (ADR-0259 §2.6). It reaches config.sendMessage as context.input, for the platform to pass to the worker and store on the message; the message keeps it as AgentMessage.input, and a restored one from AgentStoredMessage.input. A spoken message sent while a turn runs supersedes it, as a typed one does. An input readMessageInput does not recognise is not sent.
  • history on useAgent: the person's earlier conversations, from config.listConversations. A listed conversation keeps previewInput, how the message its preview is taken from was entered, and each search match its input, when the person spoke it (ADR-0259 §2.6), so a list can mark it; what readMessageInput does not recognise is dropped (readConversationSummary).
  • attachments on useAgent: the files on the message being written. attach(files) checks each against the platform's limits and uploads it at once through config.attachments.upload (into the conversation, made then if there is none yet); each item shows its progress, or why it was refused; remove(key) cancels an upload or removes the file. sendMessage waits for uploads still running and sends the ready files' references; waitingToSend is true meanwhile. It sends nothing, and resolves notSent: { reason, content } so the composer keeps the draft, when a file on the message is refused, when a send already waits, or when the conversation changes or stopTurn gives the waiting send up. A file uploaded for a message that is not sent is removed through config.attachments.remove. A message's files are on AgentMessage.attachments.
  • ApprovalCard: shows what an irreversible call will do and takes the person's decision. It can't be bound to the agent: only a person's click approves.
  • useFeedback, storedToAgentMessages, and the view annotations.

React 18 or 19 is a peer dependency. It releases with the rest of the agent SDK, under one version: see VERSIONING.md.