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

v0.1.1

Published

Pi Adaptive Thinking extension

Readme

pi-adaptive-thinking

Bring adaptive reasoning-effort control to Pi agents.

pi-adaptive-thinking is a Pi extension that lets the agent change Pi's thinking level through a tool named set_thinking_level.

It mirrors the user-facing behavior of opencode-adaptive-thinking while using Pi-native APIs: pi.getThinkingLevel(), pi.setThinkingLevel(), and thinking_level_select.

Installation

pi install npm:pi-adaptive-thinking

For local development:

pnpm install
pnpm build
pi -e ./dist/index.js

Behavior

The extension registers a tool with these parameters:

  • level: one of the valid Pi thinking levels for the current model.
  • persist: optional boolean, default false.

Temporary changes:

{ "level": "high", "persist": false }

This changes thinking level for the current agent turn and restores the prior/baseline level when the turn ends.

Persistent changes:

{ "level": "low", "persist": true }

This changes the session baseline until another persistent change is made or the user changes thinking level manually.

Configuration

Configuration files are loaded in this order:

  1. Project: .pi/adaptive-thinking.json
  2. Global: ~/.pi/agent/adaptive-thinking.json
  3. Built-in defaults

Project configuration takes precedence over global configuration.

{
  "enabled": true,
  "quiet": false,
  "toolName": "set_thinking_level",
  "toolDescription": "Set your thinking level",
  "systemPrompt": "You MUST manage thinking level actively. Lower it before trivial or routine turns; raise it for ambiguity, debugging, risky changes, or multi-step synthesis. Reassess at turn start, after meaningful new evidence, and when the task shifts. NEVER leave the current level unchanged by inertia, and NEVER reply to a trivial turn before considering a downshift."
}

Development

pnpm install
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm build

Run all checks:

pnpm verify