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

@the-librarian/pi-extension

v1.0.0-rc.2

Published

Pi coding-agent package for The Librarian: the 7 memory/handoff tools + primer injection, backed by a remote Librarian MCP server.

Readme

The Librarian — Pi extension

A Pi package that gives the Pi coding agent durable memory and cross-harness handoffs, backed by a remote Librarian MCP server.

Pi's core has no MCP support, so this extension does the wiring itself: it registers the Librarian's 7 agent verbs as native Pi tools (each one a thin, fail-soft proxy over the server's stateless /mcp endpoint) and injects the Librarian primer into the system prompt. One install, zero config files.

What you get

  • 7 tools, identical to every other harnessrecall, remember, flag_memory, store_handoff, list_handoffs, claim_handoff, search_references. Descriptions and schemas mirror the server's (a drift-guard test pins them), so the model is taught the same protocol in Pi as in Claude Code, Codex, OpenCode, and Hermes.
  • Primer injection — the operator-editable vault/primer.md (≤2KB) is fetched once per process from GET <server>/primer.md and appended to the system prompt via before_agent_start.
  • Four slash commands (optional sugar): /handoff, /takeover, /learn, /toggle-private — thin prompt templates that drive the corresponding tool flows. See docs/slash-commands.md.
  • Fail-soft everywhere — if the Librarian is down, tools return a short error string (never a thrown harness error), the primer is skipped, and the user's turn is never blocked.

Install

From npm (once published — see "Publishing" below):

pi install npm:@the-librarian/pi-extension

From source (works today):

git clone https://github.com/JimJafar/the-librarian
pi install /path/to/the-librarian/integrations/pi

(pi install git:… of the monorepo root won't work — the package lives in the integrations/pi subdirectory, so install from a local clone path.)

Configure

Set two environment variables in the shell that launches pi:

| Variable | Meaning | | --- | --- | | LIBRARIAN_MCP_URL | The server's MCP endpoint, e.g. https://your-librarian/mcp | | LIBRARIAN_AGENT_TOKEN | A per-agent bearer token issued by your Librarian | | LIBRARIAN_TIMEOUT_MS | (optional) per-call timeout, default 15000 |

Without both required variables the extension stays dormant: no tools, no network calls — only the four slash commands register, and they explain what's missing.

Security posture (inherited from the security-reviewed clients in this family): the bearer token travels only in the Authorization header, redirects are refused so a 3xx can't carry the token cross-origin, the endpoint scheme is allowlisted to http(s), and response bodies are size-capped.

Develop

This package is part of the the-librarian pnpm workspace:

pnpm install
pnpm --filter @the-librarian/pi-extension test        # vitest
pnpm --filter @the-librarian/pi-extension typecheck   # tsc --noEmit

The schema-parity suite imports the compiled @librarian/mcp-server, which is built automatically on pnpm install (its prepare script).

Publishing

The package is publishable ("private": false) and carries the pi-package keyword, so npm publish from integrations/pi/ both releases it and lists it in Pi's gallery at pi.dev/packages. Publishing is a repo-owner action — it is deliberately not part of any automated flow here. Until it's published, use the "from source" install above.