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

@induction/pi-induction

v0.1.5

Published

A context-compression extension for Pi that runs Induction Subset on tool results before the model sees them.

Readme

@induction/pi-induction

A context-compression extension that runs Induction Subset on tool results before the model sees them. The extension reduces incoming tool results to only what your main model needs.

Every tool the model can call gains a required pare_query parameter along with instructions in the system prompt. When a call comes back with a query, the extension sends the result and part of the context to the Induction Subset endpoint and hands the model the subset in place of the raw result. The endpoint stores the raw result and returns an id for it, which the extension records in the Pi session, and a praxis_query tool uses that id to return the result whole or answer a new query against it. The endpoint keeps a stored result 30 days after its last use, so praxis_query works after a restart or a compaction too.

Setup

Install it into Pi:

pi install npm:@induction/pi-induction

Then, start up a Pi session and run /induction_login. It opens the API Keys page at https://app.induction.ai/?page=api_keys and asks you to paste a key, saves it to ~/.pi/agent/induction.json, then starts Subset in the same session.

With no key saved, the extension does nothing but warn in Pi.

To change the 2048-character size under which results are shown whole, add min_size_chars to the same file:

{ "api_key": "...", "min_size_chars": 4096 }

Subset activity

In interactive Pi, a panel above the editor shows concurrent subsets:

Induction Subset · 2 active
  ⠹ read               1.2s  42.0KB  Find authentication settings
  ⠹ web_search         1.2s  86.0KB  Compare weekend forecasts
  • Up to three rows, with active subsets first and a count of additional rows. Including the heading and overflow count, the panel uses at most five lines.
  • Animated activity indicators, elapsed time, tool names, and queries. MCP tool names omit their server prefix.
  • Completed rows show the outcome and, when available, input/output size and text reduction. Each disappears three seconds after completion.
  • Text reduction compares the source sent to Subset with its returned text, not Pi's truncated preview. Percentages round down; reductions below 1% omit the percentage.
  • Sizes count UTF-8 bytes, not tokens. Queries on stored results omit the input size because it is not returned by the endpoint.
  • The animation indicates activity, not percentage complete. The endpoint returns a final result without progress updates.

RPC clients receive a plain active-subset count instead. Print and JSON modes have no activity UI. The panel is not added to the model's context or session history.

To hide the panel and the Induction: <input> → <subset> line above each subset result, add "show_ui": false to ~/.pi/agent/induction.json. Subset still runs, and warnings still show. The setting takes effect on the next session or /reload.

What the model sees

  • A <calling_tools> block appended to the system prompt, which instructs the model on how to use pare_query.
  • pare_query on every tool, including MCP tools. On a tool whose own schema forbids extra properties, the extension takes pare_query out of the call before Pi checks it, and puts it back in what the model sees on later turns.
  • Every text result with a pare_query that is over min_size_chars (2048 characters by default) goes to the endpoint, which returns the text the model reads in place of the raw tool result.

A result with no pare_query, with images, or at or under min_size_chars never reaches the endpoint: the model gets it as the tool returned it, or, for an MCP or bash result Pi cut, the saved text cut at 100KB. The endpoint reads only text.