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

@centerforagenticai/pi-adaptive-thinking

v0.2.0

Published

Agent-driven dynamic thinking effort scaling for pi: set_thinking_effort, status/bounds commands, and prompt guidance for adaptive reasoning depth.

Readme

@centerforagenticai/pi-adaptive-thinking

Kind: extension · Status: experimental · Pi: * · Node: >=22.19.0

Adaptive thinking lets an agent adjust how much reasoning its active model uses while keeping the user in control of the allowed range.

What it does

The extension gives an agent a bounded way to raise or lower Pi's thinking effort, which is the amount of reasoning the model may use. It keeps a user-selected baseline, applies temporary agent overrides, and checks every level against the active model's capabilities.

  • The set_thinking_effort tool changes effort for this response, the next N responses, or until changed.
  • Prompt guidance tells the agent when to adjust effort and which levels are available.
  • Commands and shortcuts let the user set the baseline, bounds, and direction.
  • A status item shows the current level and the source of its ceiling.
  • Read-only event-bus protocols expose current-session state and accept narrower delegate-worker policy.

How it fits

How adaptive thinking fits into a Pi session

Pi sends lifecycle and model events to the extension. The agent can call the registered tool, while the user controls the baseline and bounds through commands or ~/.pi/agent/adaptive-thinking.json. Environment and pi-delegate policies can narrow those bounds but cannot widen them. The extension then updates Pi's thinking level, prompt guidance, and status item for that session.

Install and enable

pi install npm:@centerforagenticai/pi-adaptive-thinking

Restart Pi or run /reload after installation. The package declares the Pi peer range *, is developed against Pi 0.84.2, and requires Node >=22.19.0.

Surface

| Kind | Name | Purpose | | --- | --- | --- | | Tool | set_thinking_effort | Set an agent override with a reason and a bounded scope. | | Command | /thinking-baseline <level\|status> | Set or show the user's baseline. | | Command | /thinking-higher, /thinking-lower | Move one supported level without wrapping. | | Command | /thinking-bounds <min> <max> | Set or show the agent-selectable range. | | Command | /thinking-status | Show baseline, effective level, bounds, model support, and policy source. | | Command | /thinking-reset | Clear the current override and return to baseline. | | Command | /thinking-toggle | Enable or disable agent-controlled changes. | | Shortcut | Alt+., Alt+, | Run /thinking-higher or /thinking-lower. | | Status | Adaptive thinking level | Show the effective level and ceiling source. | | Export | @centerforagenticai/pi-adaptive-thinking/integration-seam | Export the versioned snapshot protocol and its TypeScript types. | | Events | adaptive-thinking:snapshot:*:v1 | Request and observe read-only current-session snapshots. | | Events | pi-delegate:adaptive-thinking-policy | Accept and acknowledge a narrower worker policy. |

The directional controls rebuild their candidates from the active model before each move. They preserve non-contiguous capability sets and use no endpoint wrapping. Force-adaptive models such as claude-opus-5 omit off. The Alt+. and Alt+, chords use terminal escape sequences that avoid common window-manager shortcuts. Shift+Tab remains Pi's reserved thinking-cycle shortcut.

The package registers no skills or standalone command-line program.

Configuration

Settings live in ~/.pi/agent/adaptive-thinking.json. Missing or invalid values fall back to these defaults:

{
  "baseline": "medium",
  "enabled": true,
  "minLevel": "low",
  "maxLevel": "xhigh"
}

| Key | Default | Meaning | | --- | --- | --- | | baseline | "medium" | Level used when no agent override is active. | | enabled | true | Whether Pi offers set_thinking_effort to the agent. | | minLevel | "low" | Lowest level the agent may select. Also accepts "model-min". | | maxLevel | "xhigh" | Highest level the agent may select. Also accepts "model-max". |

The default ceiling is xhigh. The model's capabilities can narrow the configured range but cannot widen it. To explicitly permit agent-selected max, set maxLevel to "max", or to "model-max" when max is the active model's highest level. Session-local delegate and inherited environment policies can narrow configuration further.

When it runs

The extension starts no daemon and performs no periodic background work. It reacts inside the current Pi session:

  • session_start restores state, resolves policy, applies a safe level, and publishes a snapshot.
  • input and before_agent_start refresh model support, tool availability, inherited bounds, and the <thinking-effort> prompt block.
  • before_provider_headers rejects a late level that would escape active policy.
  • agent_start and agent_end track a run and decay response-scoped overrides.
  • turn_end, model_select, and thinking_level_select refresh state, status, and snapshots.
  • session_shutdown clears status and releases that session's inherited range.

The tool runs only when the agent calls it. Commands and shortcuts run only when the user invokes them. Snapshot requests and delegate-policy events run only when another loaded extension emits them.

Develop

The source is maintained in a private repository and published as release snapshots; contributions are welcome as pull requests on GitHub, which maintainers carry into the source repository.

npm install
npm run test:public

Documentation

License

MIT. See LICENSE.