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-auto-thinking

v0.1.2

Published

Pi extension that auto-sets the thinking level each turn via an online prompt-difficulty classifier.

Readme

pi-auto-thinking

npm version Tests license: MIT

A pi extension that auto-sets the thinking level each turn via an online prompt-difficulty classifier. The idea is borrowed from oh-my-pi's auto thinking level.

Each interactive turn, before the agent runs, a small classifier model rates the prompt low | medium | high | xhigh, clamps it into your configured bounds, and sets the thinking level for that turn. Trivial prompts stay cheap; hard ones get reasoning budget. Short continuations (continue, yes, ok) return keep and leave the level unchanged. On any failure (timeout, no key, unparseable reply) it preserves the current level and never throws.

The valid thinking levels are never hard-coded — they come from pi's getSupportedThinkingLevels(model), so the classifier only ever picks among levels the active model actually offers.

Install

pi install npm:pi-auto-thinking

Or from git:

pi install git:github.com/aesisify/pi-auto-thinking

Published with SLSA provenance — verify with npm audit signatures.

Configure

Config lives under a pi-auto-thinking/ folder in your pi config root. Project-local config shadows user-global.

  • User: ~/.pi/agent/pi-auto-thinking/config.json
  • Project: <project>/.pi/pi-auto-thinking/config.json
{
  "enabled": true,
  "classifier": "ollama/qwen2.5:3b",
  "classifierLevel": "off",
  "minLevel": "low",
  "maxLevel": "xhigh",
  "timeoutMs": 8000,
  "maxTokens": 512
}

ollama/qwen2.5:3b is recommended for a local ollama classifier — small and fast enough to rate each prompt near instantly, with no per-turn cost. Pull it with ollama pull qwen2.5:3b. Any cloud model (anthropic/claude-haiku-4-5, openai/gpt-5-mini, …) works too.

| field | default | notes | | ----------------- | --------- | ---------------------------------------------------- | | enabled | true | Master switch. false disables the classifier. | | classifier | (none) | "provider/model" — pi convention. Unset ⇒ inactive.| | minLevel | low | Floor. | | maxLevel | xhigh | Ceiling. | | timeoutMs | 4000 | Per-turn classification budget before fallback. | | maxTokens | 4096 | Reasoning-safe cap (headroom for thinking-on models).| | classifierLevel | off | Reasoning effort for the classifier call. |

Commands

/auto-thinking          # status (default): active, classifier, bounds, last decision
/auto-thinking status   # explicit status
/auto-thinking on|off   # toggle for this session

Config is re-read each turn; run pi's built-in /reload to re-initialize after editing.

A footer statusline shows auto→high (last decision) or auto:off.

Logs

Decision/fallback events are written to rolling log files:

  • ~/.pi/agent/pi-auto-thinking/logs/<date>.log

Rotation: daily, max 5 MB per file, keep 14 days.

Tests

Node-native (node:test), no framework. Requires Node ≥22.6 (unit) / ≥22.7 (integration).

npm test                 # unit tests (pure functions + config/logger/paths)
npm run test:integration # extension wiring via a loader + shims
npm run test:all         # both

License

MIT © aesisify