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

pi-thread-buddy

v0.1.0

Published

On-demand, branch-aware working memory for Pi sessions

Readme

Pi Buddy

An on-demand, session-local working-memory sidecar for Pi. It summarizes the current conversation lineage into a validated local document without injecting anything into Pi's main model context.

Install

Requires Node.js 22.19+ and Pi 0.85.1 or a compatible release.

pi install npm:pi-thread-buddy

For development without changing Pi configuration:

pi -e ./src/index.ts

Use

/thread                         open saved summary; create it if absent
/thread refresh                 rebuild from compatible prior memory + current lineage
/thread reset                   confirmed rebuild from current lineage only
/thread full                    show the complete memory
/thread <question>              ask saved memory, optionally with latest Pi response
/thread edit <instruction>      revise memory with natural language
/thread undo                    undo the last memory edit once
/thread focus [instruction]     show or set next-rebuild focus
/thread focus clear             clear focus
/thread export [md|json]        export into the current working directory
/thread steer <intent>          show a copyable prompt; never send it
/thread model [id]              show or set this thread's Agy model
/thread effort [default|low|medium|high] show or set this thread's reasoning effort (`default` is for fixed-effort models)
/thread doctor                  check Agy and Pi fallback readiness

Generation, editing, Ask, and Steer use Agy independently of Pi's selected model and authentication. The per-thread defaults match Bro: gemini-3.7-flash with low effort. Agy runs in a temporary sandbox directory with slash commands disabled; prompts use NDJSON on stdin, responses stream into the same modal, and structured memory output is hidden until it validates. Escape cancels the child process.

Only a spawn ENOENT (Agy is absent from PATH) falls back once to an isolated request through Pi's selected model. An explicit thread effort is passed to Pi; default inherits Pi's current thinking setting (or low if unavailable). Authentication, quota, model, timeout, cancellation, process, and malformed-output failures stay visible and never trigger fallback. A persistent footer notice identifies an ENOENT fallback; install/sign in to Agy and use /thread doctor, /thread model, and /thread effort to resolve it. The extension never installs Agy or edits global Pi configuration.

The modal keeps loading, streaming, result, and error states in one overlay. Summary and Full are instant local tabs (Tab/Shift+Tab) with independent scroll positions. Use arrows, Page Up/Down, mouse wheel, or trackpad to scroll; C copies only the displayed view, R retries the same captured inputs, L expands a captured latest Pi response when Ask included one, and Esc closes or cancels. Steer never copies automatically.

Memory-changing operations run one at a time, validate the whole returned JSON document, and atomically replace the previous file only after success. A failed retry keeps the previous successful result visible.

Cancellation is honored through the final check immediately before the atomic rename. The rename is the commit boundary; once dispatched, a completed commit cannot be rolled back by a later abort.

State is stored under Pi's agent directory in buddy-memory/, keyed by a hash of the Pi session ID. It contains the profile/version, generated memory and summary, focus, captured Pi head and coverage, edit status, one-step undo state, and per-thread Agy model/effort. Older state without those settings remains readable and receives defaults only when next saved. Exports use the full session hash and an exclusive numeric suffix when needed, so an existing export is never overwritten.

Boundaries and limitations

  • v0 is interactive-TUI only and ships one software-development profile; the core document shape is profile-neutral.
  • Source capture keeps a bounded newest portion of the active branch. Earlier material may survive through prior memory or Pi compaction summaries, but preservation is not lossless.
  • Compatibility is deliberately coarse: prior memory is reused only when its captured entry is still on the active lineage. Rewinds, divergence, session mismatch, or unknown ancestry discard it after confirmation; branches are not merged.
  • Repeated consolidation can preserve mistakes or lose detail. User edits can be superseded by explicit newer conversation.
  • Memory reflects conversation claims and corrections, not fresh repository, ticket, PR, or CI verification.
  • There is no background indexing, automatic context injection, cross-session aggregation, durable correction ledger, item-level provenance, or dedicated diagram system.