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

bb-plugin-auto-archive

v0.1.4

Published

Auto-archives threads that have seen no activity for a configurable number of days.

Readme

bb-plugin-auto-archive

A BB plugin that keeps your thread list clean by auto-archiving threads that have had no activity for a configurable number of days (default 2).

Screenshots

auto-archive

The plugin's settings page: inactivity threshold and archive policy.

What it's for

Thread lists accumulate. An issue you investigated once, a one-off question you got an answer to, a background task that finished — none of them need to sit in your active list forever. This plugin sweeps every hour and archives anything that has been completely quiet for the whole window, so your sidebar stays a list of things you're actually working on.

It is deliberately conservative: only threads that are fully idle and completely quiet for the full window get archived. Nothing you're working on, waiting on, or keeping handy gets touched.

Quickstart

bb plugin install git:https://github.com/slogsdon/bb-plugin-auto-archive.git

That's it — the plugin records an install timestamp and sweeps hourly. Check what it has done:

bb auto-archive status          # current config + last sweep result
bb auto-archive run --dry-run   # preview what the next sweep would archive

First-run safety

A fresh install is deliberately conservative: it records when it was installed and only considers threads that became idle after that point. Threads that were already sitting idle in your backlog when you installed are never auto-archived, and nothing is touched until the full inactivity window has elapsed since install. So enabling it on a stale list of threads won't silently archive them behind your back.

What counts as activity

The sweep uses bb's latestAttentionAt — the most recent turn completion, error, or thread creation. Reading a thread, renaming it, or moving it between sections does not count as activity, so merely opening a thread never keeps it alive.

A thread is only a candidate when all of these hold:

| Condition | Default | | --- | --- | | No activity for the full window (latestAttentionAt older than threshold) | required | | Last activity happened after the plugin was installed | required | | Root thread — child threads are never archived directly; they follow their parent's archive | required | | Not pinned | skipped unless archivePinned | | Not a hidden background-worker thread | skipped unless archiveHidden | | Not running (starting / active / stopping) — archiving stops running work | skipped unless archiveRunning | | Not already archived or deleted | required |

Configuration

bb plugin config auto-archive set inactivityDays 3     # threshold (days), default 2
bb plugin config auto-archive set archivePinned true   # also archive pinned threads
bb plugin config auto-archive set archiveHidden true   # also archive hidden workers
bb plugin config auto-archive set archiveRunning true  # also archive running work
bb plugin config auto-archive set dryRun true          # log candidates, never archive

Settings are re-read on every sweep, so changes apply on the next hourly run without a reload. dryRun is the safe way to preview before enabling anything aggressive. New installs only watch threads that go idle after install; pre-existing idle threads are never archived.

CLI

bb auto-archive run            # run a sweep now
bb auto-archive run --dry-run  # preview without archiving anything
bb auto-archive status         # configuration + last sweep result

How it works

  • bb.background.service("sweeper") sweeps once on load, then sleeps until the next top-of-hour and repeats (abort-aware on reload/disable).
  • Each sweep pages through non-archived root threads, selects stale candidates, archives them one at a time (a failure is logged and counted, the rest continue), and records the outcome for bb auto-archive status.
  • Per-thread and per-sweep logs: bb plugin logs auto-archive.

Development

npm test          # vitest: pure sweep logic + fake-host backend tests
npx tsc --noEmit  # typecheck
bb plugin build   # emit dist/ before publishing

License

MIT — see LICENSE.