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

@zihanw/pi-forge-subagents

v0.5.3

Published

Optional pi-forge subagent integration: discovers the active pi-forge host through the versioned /subagent host port and owns subagent execution/config.

Readme

pi-forge-subagents (optional)

Optional subagent integration for pi-forge. Discovers the active main pi-forge host through the versioned @zihanw/pi-forge/subagent host port and owns subagent execution and config.

This package depends only on the published host-port contract — resource selectors, prompt-compilation access facts, and backend facts in; immutable preparation artifacts out. It never imports main-package internals.

Surfaces

  • forge_subagent_profiles: model-callable, no-egress discovery of enabled profiles.
  • forge_subagent: model-callable foreground delegation with approval.
  • /forge-agent backends|plan|run: human command surface for backend discovery, dry planning, and approved execution.
  • /subagent list|plan: minimal host-port smoke surface.

Subagent configuration lives in .pi/forge/subagents.json (project) and ~/.pi/forge/subagents.json (global). Legacy config.json.subagents is accepted as a read-only fallback with a warning.

Profile keys are scope selectors, not just profile names. Use canonical project:<id> or global:<id> keys. A bare key is retained for compatibility with project profiles only and never grants authority to a same-named global profile:

{
  "backend": "pi-rpc-readonly",
  "timeoutMs": 120000,
  "allowAgentInvocationWithoutApproval": true,
  "profiles": {
    "global:image-viewer": { "enabled": true },
    "global:reviewer": { "enabled": true },
    "project:fixer": {
      "enabled": true,
      "backend": "pi-bwrap-write"
    }
  }
}

pi-bwrap-write is an opt-in Linux backend. Selecting it is the write authorization: it projects isolated workspace-write access, exposes read/search/edit/write/bash, and edits the current git work tree directly. The approval dialog shows the effective access and read-write mount. Commit or stash existing work before delegation and review the result with git diff. Combining this backend with allowAgentInvocationWithoutApproval: true is an explicit unattended/YOLO choice: writes proceed without a fresh human prompt. The backend rejects non-git workspaces by default and protects top-level local .git metadata inside Bubblewrap.

For the first dogfood lane, stored or ambient credentials are projected only for the selected model for Anthropic, OpenAI, Google Gemini, OpenRouter, and OpenCode. OAuth-only providers whose child cannot consume Pi's --api-key override remain outside this first lane. Other providers can supply bubblewrap.env or bubblewrap.envForModel through the programmatic runtime options until provider coverage is expanded.

pi-inprocess is a workspace-write backend that runs the subagent directly in the host model runtime. It provides the same tool surface as pi-bwrap-write, but with a shared-user boundary: there is no OS isolation, so the subagent runs with your user's permissions instead of inside Bubblewrap. Use it for profiles that need extension-registered providers, such as OAuth-based or custom-streaming providers, because those providers are available in the host process and cannot resolve in fresh-process backends that spawn children with --no-extensions.

When a profile uses an extension-registered provider with pi-subprocess-readonly, pi-rpc-readonly, or pi-bwrap-write, preparation fails with a host.model-not-portable diagnostic. Switch that profile to a built-in or models.json-declared provider, or route it to pi-inprocess.

The web editor exposes separate Subagents · Project and Subagents · Global settings pages. Each page edits only the displayed subagents.json file, uses the live Forge profile catalog for its profile picker, and treats empty values as removal of that scope's override. New entries for missing profiles are rejected; previously configured missing or legacy entries remain visible so they can be removed or migrated.

Development

npm install
npm run verify