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

@actera/sdk-react

v0.0.3

Published

React components for embedding the Actera chat widget in a SaaS dashboard.

Readme

@actera/sdk-react

React components for embedding the Actera chat widget in a SaaS dashboard.

Actera lets your users ask an AI assistant to inspect data and run approved actions in your product. The React SDK renders the widget, collects missing tool inputs, shows approval prompts, and sends requests to your Actera gateway with a short-lived delegated token from your backend.

Install

npm install @actera/sdk-react

The package expects React and React DOM to be installed by your app:

npm install react react-dom

Basic usage

Wrap the part of your app that should show Actera with ActeraProvider, then render ActeraChat.

import { ActeraChat, ActeraProvider } from "@actera/sdk-react";

async function getAccessToken() {
  const res = await fetch("/api/actera-token", { method: "POST" });
  const data = (await res.json()) as { token: string };
  return data.token;
}

export function App() {
  return (
    <ActeraProvider
      endpoint="https://api.actera.tech"
      getAccessToken={getAccessToken}
    >
      <ActeraChat />
    </ActeraProvider>
  );
}

Your backend should mint the token. Do not expose your Actera API key in browser code.

Provider options

<ActeraProvider
  endpoint="https://api.actera.tech"
  getAccessToken={getAccessToken}
  integrationConfig={integrationConfig}
  resolveResultAction={resolveResultAction}
  resolveResultRowActions={resolveResultRowActions}
>
  <ActeraChat />
</ActeraProvider>

endpoint is the Actera gateway URL.

getAccessToken returns a short-lived delegated token for the signed-in user and workspace.

integrationConfig customizes how tool results map to your product resources, including labels, fields, routes, preview limits, and row actions.

resolveResultAction and resolveResultRowActions let your app attach links to tool results at runtime.

Customize the widget

<ActeraChat
  title="Actera"
  statusLabel="Ready"
  emptyState="Ask Actera to inspect a workspace."
  placeholder="Ask Actera..."
  dialogLabel="Actera chat"
  openLabel="Open Actera"
  closeLabel="Close Actera"
/>

ActeraChat renders as a floating chat button that expands into a panel. Tool selection, permission checks, approvals, and execution happen server-side.

Result links

Use integration config when your app has stable resource routes:

const integrationConfig = {
  sdk: { resultPreviewLimit: 8 },
  resources: {
    projects: {
      label: "projects",
      route: "/projects",
      titleField: "name",
      displayFields: ["name", "status", "createdAt"],
      collectionAction: {
        label: "Open projects",
        href: "/projects",
      },
      rowActions: [
        {
          label: "Open",
          href: "/projects/{id}",
          requiresPermission: "projects:read",
        },
      ],
    },
  },
  tools: {
    list_projects: {
      resultResource: "projects",
    },
  },
};

Or resolve actions dynamically:

<ActeraProvider
  endpoint="https://api.actera.tech"
  getAccessToken={getAccessToken}
  resolveResultRowActions={({ item }) => {
    if (!item || typeof item !== "object" || !("id" in item)) return [];
    return [{ label: "Open", href: `/projects/${String(item.id)}` }];
  }}
>
  <ActeraChat />
</ActeraProvider>

Exports

import {
  ActeraChat,
  ActeraProvider,
  ClarificationForm,
  ConfirmationCard,
  useActeraContext,
} from "@actera/sdk-react";

The package also exports TypeScript types for provider configuration, chat messages, approvals, clarifications, and formatted collection results.