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

@agentic-react/core

v0.3.0

Published

Bundler-agnostic Agentic React runtime selection and MCP primitives

Readme

@agentic-react/core

Bundler-agnostic Agentic React runtime primitives.

Use this package when you need browser-side React selection and inspection without Vite, Webpack, or Next.js adapter wiring.

import { createSelectionToolkit } from '@agentic-react/core';

const toolkit = createSelectionToolkit();
toolkit.enable();

For full local-dev MCP features, install an adapter instead:

  • @agentic-react/vite
  • @agentic-react/webpack
  • @agentic-react/next

Adapters depend on @agentic-react/core internally and add runtime injection, bridge transport, MCP endpoints, and source-root context.

Settings Availability

@agentic-react/core contains the browser UI and shared types for toolbox Settings, but persistent Settings require an adapter-hosted bridge. Direct runtime usage cannot read or write ~/.agentic-react/settings.json, cannot persist a custom toolbox icon, and cannot save shortcut changes unless you provide your own AgenticReactSettingsClient.

Without that bridge, the selection toolkit can still use package defaults and code-provided toolkit defaults. The package shortcut defaults are Ctrl+Alt+Shift+S for single select, Ctrl+Alt+Shift+M for multiselect, Ctrl+Alt+Shift+A for toggling the toolbox, and Enter for Done. Escape is reserved for cancelling pending selection.

Adapter-backed Settings resolve values as:

global user override
  > project configuration default
  > package default

Project defaults are supplied by adapters through toolkit.settings.shortcuts and toolkit.iconUrl. Runtime-only integrations should treat those as code defaults, not persisted user preferences.

Selection Confirmation

Single selection is pending until the user confirms it. Clicking a target captures and highlights the context, but does not copy it. Clicking Done, or pressing the configured Done shortcut, copies that pending context and commits it as the last selection. If clipboard writing fails, the pending context stays available for retry.

Multiselect collects pending contexts until Done copies the complete set. Escape cancels pending single and multiselect contexts without copying and leaves the last committed selection intact.

Tuning Modal Runtime API

The browser runtime exposes the tuning modal through the selection toolkit and window.__AGENTIC_REACT__.

window.__AGENTIC_REACT__?.setToolkitConfig({
  tuningModal: {
    classNames: {
      panel: 'my-tuning-panel',
      control: 'my-tuning-control',
    },
    styles: {
      panel: { border: '1px solid rgba(15, 23, 42, 0.18)' },
      sectionTitle: { color: '#0f766e' },
    },
    tokens: {
      panelRadius: '14px',
      controlRadius: '10px',
      primaryButtonBackground: '#0f766e',
      primaryButtonColor: '#ffffff',
    },
  },
});

tuningModal.classNames and tuningModal.styles target modal slots: root, surface, panel, arrow, title, body, targetTag, customPromptForm, customPromptInput, customPromptButton, sectionTitle, row, label, controlWrap, control, colorInput, numberInput, stepperButton, select, textarea, suffix, and closeButton.

tuningModal.tokens are converted to CSS variables with the --agentic-react-tuning- prefix. panelRadius becomes --agentic-react-tuning-panel-radius; primaryButtonBackground becomes --agentic-react-tuning-primary-button-background.

Use registerTuningModalExtension() for structural changes that cannot be handled by classes, inline styles, or tokens.

const unregister = window.__AGENTIC_REACT__?.registerTuningModalExtension({
  id: 'modal-footer-hint',
  footer({ container, actions }) {
    const button = document.createElement('button');
    button.type = 'button';
    button.textContent = 'Add design-system review';
    button.addEventListener('click', () => {
      actions.addPrompt('Review this selection against the design system.');
      actions.close();
    });
    container.appendChild(button);

    return () => {
      button.remove();
    };
  },
  wrapModal({ surfaceElement, actions }) {
    surfaceElement.dataset.agenticWrapper = 'design-system';
    actions.requestReposition();
  },
});

The extension context includes the selected element, tagName, targetLabel, computed styles, and the current selection context. Actions can add tuning prompts, close the modal, or request a position recalculation. Call the returned unregister function when your integration unloads.