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

@robcopeland/bb-statusbar-section-protocol

v0.3.0

Published

Wire contract shared by the Statusbar BB plugin and its section providers.

Readme

@robcopeland/bb-statusbar-section-protocol

The wire contract between the Statusbar BB plugin and any plugin that contributes a section to it.

npm install @robcopeland/bb-statusbar-section-protocol

Why this is a package

BB has no plugin dependency mechanism — no dependsOn, no load ordering, no way for one plugin to require another. So a section provider cannot "require" the statusbar. What it can do is speak a shared protocol, and this package is that protocol, published once so the bar and every provider compile against the same thing instead of each carrying a hand-copied schema.

Shipping TypeScript source, not compiled JavaScript

main and types both point at src/index.ts. That is deliberate, not an oversight:

  • bb plugin build bundles a plugin's TypeScript from its own entry point, so a package that ships .ts is consumed normally.
  • The alternative — a build step emitting .js plus .d.ts — would mean this package's published output could drift from its source, and would add a compilation step to a package whose entire job is to define types and schemas.

If a future consumer needs compiled output, change main/types and add a build script; nothing else here depends on shipping source.

What's in it

| Export | Purpose | | --- | --- | | sectionSnapshotResponseSchema | The output of section.v1.snapshot | | sectionPayloadSchema | One section reading | | SECTION_METHOD_SNAPSHOT / SECTION_METHOD_ACTION | Method names | | metricsSection, textSection, unavailableSection | Builders for a payload | | orderTopics | The bar's display ordering rule | | KNOWN_TOPICS / SECTION_TOPIC_ORDER | Topics the bar gives a fixed position in the row |

Changelog

0.3.0

Breaking: BUILTIN_TOPICS is renamed to KNOWN_TOPICS, and BuiltinTopic to KnownTopic.

The old name claimed the bar ships a reader for those topics. It does not — the bar computes no readings at all, and every section is supplied by a provider plugin. What the constant actually describes is layout identity: which slots the bar knows by name and where they sit in the row.

To migrate, rename the import. Nothing else changed — the values are identical, so there is no behavioral difference:

-import { BUILTIN_TOPICS } from "@robcopeland/bb-statusbar-section-protocol";
+import { KNOWN_TOPICS } from "@robcopeland/bb-statusbar-section-protocol";

If you never imported it, this release needs no changes from you. None of the reference providers did.

0.2.0

Open topics: SectionTopic became an open string rather than a fixed enum, so a provider can contribute a topic the bar has never heard of. Added section-level importance, textSection, and orderTopics.

Quick start

import { defineRpcContract, type BbPluginApi } from "@get-bb/plugin-sdk";
import { z } from "zod";
import {
  SECTION_METHOD_SNAPSHOT,
  sectionSnapshotResponseSchema,
  metricsSection,
} from "@robcopeland/bb-statusbar-section-protocol";

export default async function plugin(bb: BbPluginApi) {
  bb.rpc.register(
    {
      [SECTION_METHOD_SNAPSHOT]: {
        input: z.null(),
        output: sectionSnapshotResponseSchema,
      },
    },
    {
      [SECTION_METHOD_SNAPSHOT]: async () => ({
        generatedAt: new Date().toISOString(),
        section: metricsSection({
          topic: "lanes",
          metrics: [{ label: "Codex", value: "18%", tone: "neutral" }],
        }),
      }),
    },
    { experimental_discoverable: true },
  );
}

The experimental_discoverable: true is what lets the bar find your provider.

License

MIT