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-tool-ports

v0.1.0

Published

Combine tool extensions as pluggable adapters in Pi

Downloads

157

Readme

Pi tool ports

Pi extension that lets you combine incompatible tool extensions as pluggable adapters fitting into defined ports.

Install

pi install npm:pi-tool-ports

Architecture

pi loads only this extension. The user picks which ports and adapters to use in config.

This keeps conflicting extensions from stepping on each other and avoids system prompt pollution.

Ports own tool registrations and execution flow. Currently edit and write are supported.

Adapters are extensions consumed as deep-imported libraries, not as pi extensions. The entry factories never run. This lets the host combine features without forking code or registering tools twice:

  • pi-semantic-edit: edit tool surface with fuzzy matching
  • pi-tree-sitter: pre-write syntax validation (WASM grammars + delimiter balance)

Configuration

Optional JSON config files. Project overrides global.

  • Global: ~/.pi/agent/pi-tool-ports.json
  • Project: .pi/pi-tool-ports.json
{
  "exclude": {
    "patterns": ["indentation jump"]
  },
  "ports": {
    "edit": { "adapters": ["semantic-edit", "tree-sitter"] },
    "write": { "adapters": ["semantic-edit", "tree-sitter"] }
  }
}
  • ports.<port>.adapters: which adapters each port uses
    • ["semantic-edit", "tree-sitter"]: default
    • []: disables the port
    • Missing tree-sitter: disables syntax gate for that port
    • Unknown adapter names are ignored
  • exclude.patterns: substring matches against tool result warnings (default: [])

Known issues

We install all adapters as npm dependencies but only activate selected ones.

Selective installation is planned if needed.

Licensing

  • Our code: MIT (see LICENSE)
  • Vendored adapter code (src/adapters/*/vendor/): licensed under their original terms:
    • pi-semantic-edit: MIT (copyright K2, see src/adapters/semantic-edit/vendor/LICENSE)
    • pi-tree-sitter: EPL-2.0 (copyright Marko Kocic, see src/adapters/tree-sitter/vendor/LICENSE)

Vendored files may be modified minimally (add exports, remove unused imports, cleanup).

Development

npm run test          # vitest
npm run typecheck     # tsc --noEmit
npm run format        # prettier
npm run format:check  # prettier check