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

@rigline/plugin-api

v1.0.0-alpha.10

Published

The context, manifest and identifier types a Rigline plugin is written against

Readme

@rigline/plugin-api

What a Rigline plugin is written against: the plugin context, the manifest type and its JSON schema, definePlugin, and the anchor names.

A plugin is one browser ES module and a rigline.json. This package is a devDependency — the build bundles everything the entry imports, so a published plugin has no runtime dependency to resolve, which is what lets rigline add install one without running a package manager.

npm install -D @rigline/plugin-api

What you write runs inside a modification of Anthropic's extension, so the plugin policy applies to it, published or not. Most of it is not left to you — the webview has no network egress, no filesystem and no route into the extension host — and the page is explicit about which half is which.

A plugin

import { definePlugin, type PluginContext, type Teardown } from "@rigline/plugin-api";

export default definePlugin({
  setup(ctx: PluginContext): Teardown {
    const stop = ctx.watch("footerSpacer", (spacer) =>
      ctx.mountBefore(spacer, () => {
        const badge = document.createElement("span");
        badge.textContent = "hello";
        return badge;
      }),
    );
    return stop;
  },
});
{
  "$schema": "node_modules/@rigline/plugin-api/schema/manifest.json",
  "api": 1,
  "name": "hello",
  "description": "A badge in the composer footer.",
  "entry": "dist/index.js",
  "surfaces": ["editor", "sidebar"],
  "uses": { "anchors": ["footerSpacer"], "mount": true }
}

What ctx carries

Every capability is declared in the manifest and granted from the declaration, so a plugin reaching for something it did not declare finds nothing there, and a plugin whose declaration no longer holds against the installed extension is refused by name rather than failing at runtime.

cls and anchor for class names; onMessage for the bus; mount, mountAfter, mountBefore and watch for the DOM; style; rewrite and resend for outbound messages; onToolUse and onToolResult; onSessionId; decorateTranscript; and surface. Anything declared under uses.optional arrives on ctx.optional instead, returning null where this extension version does not have it — so losing a borrowed class to an upstream change costs a plugin some polish rather than its load.

Never name a minified identifier. Class names are <local>_<hash> CSS-modules output and the hash is rebuilt on every upstream build, so reach for a curated anchor name, or cls(module, local) where the table has no entry yet.

Identifier types

rigline codegen --out generated.ts writes the identifiers harvested from your installed extension and augments this package's types with them, so the anchors and message types your editor actually has are the ones your editor offers you. No published type union doubles as a version pin.

Authoring guide · anchors

Changelog — every package in this workspace shares it, and one version number.

MIT.