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

@indx-workspace/react

v0.6.9

Published

The hosted surface chat as React: <Chat/> with replaceable parts, and the headless useConversation() hook.

Readme

@indx-workspace/react

The hosted surface chat as React. <Chat/> is the chat GET /p/s/<name> renders, with its message list, message, composer and tool result each replaceable; useConversation() is the same conversation without any markup. react (19) is a peer dependency; the transport is @indx-workspace/sdk.

import { Chat, useConversation } from '@indx-workspace/react';

<Chat surface="main" baseUrl="https://agents.example.com" components={{ Composer: MyComposer }} />;

// or fully headless:
const { messages, send, status } = useConversation({ surface: 'main', baseUrl });

Import the stylesheet once, import '@indx-workspace/react/styles.css'. Under aw dev the local draft of a surface admits pages on http://localhost:* and http://127.0.0.1:* while it lists no allowedOrigins of its own, so a dev server needs no CORS setup. The guide is Your own React.

<Chat/>

| Prop | Type | Meaning | | ------------ | ---------------------------------------------------- | --------------------------------------------------------------------------------------------- | | surface | string | The surface's name, as in /p/s/<name>. | | agentName | string? | The surface's own agent. Defaults to definition.agent, then to surface. | | definition | SurfaceDefinition? | What defineSurface returns: the title, theme, layout and parts. Absent is the default look. | | baseUrl | string? | The Agent Workspace (or a proxy of it; a path prefix is kept). Defaults to the page's origin. | | notice | ReactNode? | A row inside the frame, above the header. | | components | { MessageList?, Message?, Composer?, ToolResult? } | Parts to draw instead of the defaults. |

Each part receives the props its exported type declares, and nothing else:

| Part | Props type | Props | | ------------- | ------------------ | -------------------------------------------------------------------------------------- | | MessageList | MessageListProps | children: the messages. | | Message | MessageProps | message; tools and feedback, the nodes to draw before and after it (or null). | | Composer | ComposerProps | value, onChange(value), onSubmit(), disabled, canSend, label, sendLabel. | | ToolResult | ToolResultProps | output (the tool's raw output) and component (table, card or text). |

useConversation()

Takes the same surface, agentName, definition and baseUrl, and returns messages, status ('idle' | 'restoring' | 'sending' | 'ended'), runStatus (the last run's badge), failure, turns (each run's tool steps), send(prompt), rate(runId, rating), rated, failedRatings, agentName, agents and switchAgent(agent). A surface's 429 refusals come back as failure; at the turn limit status is ended.

What it does not do yet

  • A proxy for an origin the surface does not list. baseUrl points the chat at a deployed Agent Workspace (an http: or https: URL; anything else throws). The session bootstrap and the four visitor run routes (/api/agents/:id/runs, /api/runs/:id, /api/runs/:id/events, /api/runs/:id/feedback) answer a page on one of the surface's allowedOrigins, with no credentials. The list in force is the served version's: production once the agent is promoted, so an origin added to the draft later needs aw promote first. For any other origin, serve the page from the workspace's origin, or proxy /p/s/* and /api/* to it and set baseUrl to the proxy. No cookie is ever sent to another origin.
  • Your own theme beyond the surface's. The default look is @indx-workspace/react/styles.css (import it once); it is plain CSS driven by the theme's custom properties. To change more than the theme, override the aw-* class names or replace the parts.