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

@spheredata/embed

v0.0.1

Published

Embeddable SPHERE agent UI — the <sphere-agent> Web Component + optional tool packs.

Readme

@spheredata/embed

The embeddable SPHERE agent UI — a framework-agnostic <sphere-agent> Web Component any web page can drop in, plus optional in-browser tool packs. Shadow DOM keeps the host's CSS isolated; the agent loop runs client-side.

The product/brand is SPHERE — this package is published under the @spheredata npm scope. The custom element is <sphere-agent> and the design tokens are --sphere-* (unchanged).

Install

npm i @spheredata/embed @spheredata/sdk

A partner needs both: @spheredata/sdk provides createSphere (the backend client), and this package provides the UI element you wire it into.

Quick start

<sphere-agent id="agent" layout="split" attachments>
  <span slot="title">SPHERE Agent · ADRC</span>
  <span slot="notice">Python runs locally; your data never leaves the page.</span>
</sphere-agent>

<script type="module">
  import { createSphere } from "@spheredata/sdk";
  import { pyodideTools, learningStore } from "@spheredata/embed/tools";
  import "@spheredata/embed"; // registers the <sphere-agent> element

  const sphere = createSphere({ portal: "adrc" });
  const mem = learningStore(sphere.portal);

  const el = document.getElementById("agent");
  el.sphere = sphere;
  el.systemPrompt = "You are a SPHERE data analyst…";
  el.examples = ["What datasets are available?"];
  el.tools = [...pyodideTools({ baseUrl: "/data/", datasets: { scrna: "scrna.csv" } }), mem.tool];
  el.seed = mem.seed;   // inject prior learnings at the start of each conversation
  el.memory = mem;      // drive the memory badge (count())
</script>

Element API (properties)

| Property | Type | Purpose | | --- | --- | --- | | sphere | client | The @spheredata/sdk client (required). | | systemPrompt | string | System message for the agent. | | tools | array | Tool objects { name, description, input_schema, run() }. | | examples | string[] | Starter prompts shown in the welcome state. | | model | string | Model id override. | | maxTokens | number | Completion cap (default 4096). | | layout | "chat" | "split" | Single pane, or two-pane with a results panel for figures. | | attachments | boolean | Enable file attach in the composer. | | accountUrl | string | Where the "Add credits" link redirects (billing is never embedded). | | seed | () => messages[] | Inject prior messages/learnings at conversation start. | | seedMessages | array | Static alternative to seed(). | | memory | { count() } | Drives the memory badge. |

Reflected attributes: layout, attachments, account-url. Slots: title, notice.

Tool packs — @spheredata/embed/tools

  • pyodideTools({ baseUrl, datasets, dataDictionary, packages }) — Python/pandas in the browser (load datasets, run code, return figures). No server round-trip.
  • learningStore(namespace, storage?) — persistent per-portal memory; exposes .tool, .seed, and .count().
  • calculatorTool — safe arithmetic.
  • resolveDatasetUrl(baseUrl, datasets, name) — helper for dataset URL resolution.

Theming

Defaults are the SPHERE brand and match @spheredata/design token values, so a host that imports @spheredata/design/tokens.css looks identical. To re-skin per partner, override any of this Tier-2 contract on a host ancestor (e.g. :root or the element):

:root {
  --sphere-accent: #1d4ed8;
  --sphere-accent-hover: #1e40af;
  --sphere-radius: 6px;
  --sphere-font: "Inter", sans-serif;
  --sphere-surface: #ffffff;
  --sphere-panel: #eef2ff;
  --sphere-user-bg: #e0e7ff;
}

Full contract: --sphere-accent, --sphere-accent-hover, --sphere-radius, --sphere-font, --sphere-surface, --sphere-panel, --sphere-line, --sphere-text, --sphere-text-muted, --sphere-user-bg, --sphere-good, --sphere-warn, --sphere-danger, --sphere-results-bg, --sphere-results-width.

License

MIT