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

@realvendex/pi-compat

v1.0.0

Published

Pi-native version compatibility checker for pi.dev extensions — detects which pi APIs an extension uses, validates against known version constraints, warns about deprecated/removed APIs, and suggests migration paths.

Readme

pi-compat

Pi-native version compatibility checker for pi.dev extensions — detect which pi APIs you use, check version support, and get migration suggestions.

Installation

pi install npm:@realvendex/pi-compat

What It Does

pi-compat analyzes your extension's TypeScript source code to detect pi.dev API usage patterns, then checks them against a versioned API catalog to tell you:

  • Which pi versions your extension supports (compatibility matrix)
  • Which APIs you're using that are deprecated (with replacement suggestions)
  • What migration changes are needed to target a specific pi version

It fills the version compatibility gap in the pi.dev QA toolchain:

  • pi-lint → checks API anti-patterns
  • pi-extension-toolkit → checks structure/scaffolding
  • pi-test-harness → runs runtime tests
  • pi-compat → checks version compatibility ← this package

Tools

compat_check

Analyze extension source for pi API usage and validate against known version constraints. Returns a compatibility matrix.

Parameters:

  • source (string, required) — TypeScript source code to analyze
  • targetVersion (string, optional) — Specific pi version to check against (e.g. '1.2.0'). If omitted, checks all known versions.

Example:

Use the compat_check tool with source="<your TypeScript code>"

compat_report

Generate a detailed compatibility report with deprecated API usage, version matrix, and migration suggestions.

Parameters:

  • source (string, required) — TypeScript source code to analyze
  • targetVersion (string, optional) — Target pi version. Defaults to latest.
  • includeCatalog (boolean, optional) — Include the full API catalog reference. Default: false.

Example:

Use the compat_report tool with source="<your TypeScript code>" includeCatalog=true

compat_migrate

Auto-suggest migration changes for deprecated or removed APIs between two pi versions.

Parameters:

  • source (string, required) — TypeScript source code to analyze
  • fromVersion (string, optional) — Current pi version. Defaults to detected minimum.
  • toVersion (string, required) — Target pi version to migrate to.

Example:

Use the compat_migrate tool with source="<your TypeScript code>" toVersion="1.4.0"

API Catalog

pi-compat maintains a versioned catalog of pi.dev APIs covering:

  • Core APIs: registerTool, registerCommand, ExtensionAPI
  • Schema: Type.Object, Type.String, Type.Boolean, Type.Array, Type.Optional, Type.Union, Type.Enum
  • Return patterns: content_text_return, details_field, string_return (deprecated)
  • UI/Context: ctx.hasUI, ctx.workspace, ctx.env, onUpdate
  • Imports: All @earendil-works/* peer deps, typebox, deprecated @mariozechner/*

Versions tracked: 1.0.0 through 1.4.0

How It Works

  1. Static analysis — regex-based scanning of TypeScript source for pi API patterns
  2. Catalog lookup — each detected API is checked against the versioned catalog
  3. Matrix generation — builds a compatibility matrix across all known pi versions
  4. Migration engine — maps deprecated/removed APIs to their replacements

Integration

Fits into the existing pi.dev QA pipeline:

pi-commit-lint → pi-changelog → pi-lint → pi-compat → pi-release

Resources

License

MIT