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

@stigmer/react-core

v0.3.2

Published

React hooks for Stigmer, the open-source backend for the agents in your product: the conversation layer, with no rendering package

Readme

@stigmer/react-core

React hooks for Stigmer, the open-source backend for the agents in your product. This is the conversation layer of Stigmer's React kits: the client context, the fetch cache, and the hooks that start a run, follow a session, answer an approval and review a file change, with nothing that draws. A chat that does not render HTML (a terminal, a native app) builds on this package alone; @stigmer/react-sdk builds its components over it, and @stigmer/ink-ui its terminal views.

Install

npm install @stigmer/react-core @stigmer/client @stigmer/apis @bufbuild/protobuf react

Its peers are react 19, @stigmer/client, @stigmer/apis and @bufbuild/protobuf. It installs no rendering package: no react-dom, no component library, no icons.

If you already use @stigmer/react-sdk, you have this package: the React kit re-exports every name here from its root and ./headless, so import from whichever you install.

Use

Give the hooks a client through StigmerContext (the React kit's StigmerProvider and the terminal kit's InkStigmerProvider do it for you), then call them:

import { Stigmer } from "@stigmer/client";
import { StigmerContext, useSessionConversation } from "@stigmer/react-core";

const client = new Stigmer({ baseUrl: "http://localhost:7234" });

function Conversation({ sessionId, org }: { sessionId: string; org: string }) {
  const conversation = useSessionConversation(sessionId, org);
  return <pre>{conversation.turns.at(-1)?.answer ?? "Waiting for the agent"}</pre>;
}

export function App() {
  return (
    <StigmerContext.Provider value={client}>
      <Conversation sessionId="ses_01j..." org="acme" />
    </StigmerContext.Provider>
  );
}

The hooks are documented in the React SDK reference, which lists them where the React kit re-exports them.

Entries

| Entry | What it holds | | --- | --- | | @stigmer/react-core | The public hooks, contexts and helpers. Every name here is a public API. | | @stigmer/react-core/test | Sample data for tests, galleries and screenshots (samples, sampleInstant), built through the same schemas the server answers with, at a fixed instant. | | @stigmer/react-core/internal | The React kit's own plumbing (the data-fetch hook and cache, the error mapper, the paging walks). For @stigmer/react-sdk only. |

@stigmer/react-core/internal carries no compatibility promise: a name may change or leave in any release. It exists so the React kit's hooks and components share one fetch cache and one error mapping with the conversation hooks. It is safe for the kit because every @stigmer/* package ships in lockstep and pins the others at the exact same version. Nothing else imports it, and a repository test (scripts/react-core-internal.test.mjs) fails if anything does. It stays one entry with one consumer: a second internal entry, or a second package reading this one, is a design change to make in the open, not a convenience.

Develop

npm run typecheck -w @stigmer/react-core
npm run test -w @stigmer/react-core

src/__tests__/boundary.test.ts holds the package's line: its sources import only their own files and the packages above.

The package's TypeDoc run (npm run tsdoc:check) checks what it exports but not where its comments link: they link to the React kit's components that use each hook, which only the React kit's run can resolve, and that run checks them, since it documents every name here.