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

@destiner/pi-subagents

v0.1.2

Published

Subagents for pi: delegate by intelligence level, and let your settings decide which model runs it

Readme

@destiner/pi-subagents

Subagents for pi, with one dial: intelligence.

The agent picks low, medium, or high. Your settings decide which model and thinking level that means, per parent model. The agent never picks a model name, and you never re-teach it your model preferences.

Install

pi install npm:@destiner/pi-subagents

The extension registers a single tool, agent. It won't load alongside another extension that registers a tool of the same name — remove the other one first.

Configure

Add one key to ~/.pi/agent/settings.json, keyed by the model driving the parent session. Nothing works until you do: an unmapped parent model is an error, not a fallback.

{
  "defaultModel": "claude-opus-5",

  "@destiner/pi-subagents": {
    "pi-claude/claude-opus-5": {
      "low": { "model": "pi-claude/claude-haiku-4-5", "effort": "medium" },
      "medium": { "model": "pi-claude/claude-sonnet-5", "effort": "medium" },
      "high": { "model": "pi-claude/claude-opus-5", "effort": "medium" },
    },
    "openai-codex/gpt-5.6-sol": {
      "low": { "model": "openai-codex/gpt-5.6-sol", "effort": "low" },
    },
  },
}
  • Keys and model values are exact provider/model-id. No fuzzy matching, no bare ids, no date-stamp tolerance — a typo is an error, not a surprise model. Only the first slash separates the provider, so openrouter/deepseek/deepseek-v4-flash-0731 works.
  • effort is a pi thinking level (off, minimal, low, medium, high, xhigh, max) and is optional; omitted, it uses your defaultThinkingLevel. pi clamps it to what the model supports.
  • Levels are independent. Define only low if that's all you want — asking for anything else then fails and tells the agent what it can have instead.
  • A project's .pi/settings.json overrides the global config per parent model.
  • Config is read on every call, so edits apply without restarting pi.

Use

agent({
  description: "audit auth flow",
  intelligence: "medium",
  prompt: "…everything the subagent needs to know…"
})

The subagent starts from an empty context: it sees the prompt and nothing else, returns one text response, and cannot ask questions. Several calls in one turn run concurrently.

Errors

All three arrive as tool errors, so the agent sees them and can adjust:

| Situation | Message | | ------------------------------ | ----------------------------------------------------------------------------------------------- | | Parent model not in the config | Not available for this model (pi-claude/claude-opus-5) | | Level not configured for it | This agent intelligence level is not available for this model. Available options: [low, high] | | Configured model has no auth | Configured subagent model "…" for intelligence "low" is not available. |

For RPC clients

details is the interface, streamed as tool_execution_update.partialResult and repeated on the final result:

{
  description: string;
  intelligence: "low" | "medium" | "high";
  model: string;            // resolved "provider/model-id"
  effort: ThinkingLevel;    // after pi's clamping
  status: "running" | "done" | "error";
  elapsedMs: number;
  toolCalls: number;
  currentTool?: string;
  text: string;             // the subagent's text so far
  usage: { input, output, cacheRead, cacheWrite };
}

Updates fire when the subagent starts, on each of its tool calls, and at the end of each of its messages — so text arrives in message-sized chunks rather than token by token.

What it deliberately doesn't do

No agent types or roles, no agent files, no background runs, no steering, no turn limits, no worktree isolation, no context inheritance. Subagents get the same tools as the parent minus agent itself, which is also the whole of the recursion guard. If the parent aborts, its subagents abort.

Two consequences worth knowing. The subagent inherits every extension and MCP tool configured in your settings, so a large MCP surface makes even a low call expensive in input tokens. And it loads extensions from settings only — extensions passed on the command line with -e don't reach it.