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

@mrclrchtr/supi-lsp

v1.10.0

Published

SuPi LSP extension — Language Server Protocol integration for pi

Readme

@mrclrchtr/supi-lsp

Adds Language Server Protocol support to the pi coding agent.

Install

pi install npm:@mrclrchtr/supi-lsp

For local development:

pi install ./packages/supi-lsp

What you get

After install, pi gets 10 focused expert tools for semantic language-server analysis:

  • lsp_hover — semantic type or symbol information at a given position
  • lsp_definition — go to definition at a known position
  • lsp_references — find all references to a symbol
  • lsp_implementation — find implementations of an interface or method
  • lsp_document_symbols — semantic declarations for one supported file
  • lsp_workspace_symbols — semantic symbol-name lookup across the project
  • lsp_diagnostics — current diagnostics for one file or a workspace summary
  • lsp_rename — semantic rename planning at a known position
  • lsp_code_actions — semantic fixes or refactors at a known position
  • lsp_recover — refresh stale diagnostics after workspace changes
  • /lsp-status — inspect detected servers, roots, open files, and diagnostics

LSP status overlay

LSP hover in action

Coordinates use 1-based line and character positions.

Automatic behavior

This package does more than register these tools:

  • starts detected language servers for the current project
  • rebuilds project-specific prompt guidance based on active servers
  • injects outstanding diagnostics into context before agent turns when issues exist
  • adds inline diagnostics after write and edit results
  • watches for workspace changes such as package.json, lockfile, tsconfig, generated types, and source-file edits so recovery can happen when diagnostics go stale
  • warns when configured language-server commands are missing

Settings

This package registers an LSP section in /supi-settings.

Available settings:

  • enabled — turn all LSP behavior on or off
  • severity — inline diagnostic threshold: 1 errors, 2 warnings, 3 info, 4 hints
  • active — choose which configured language servers are active; empty means all
  • exclude — gitignore-style patterns that suppress diagnostics for matching files

Config lives in the standard SuPi config files:

  • global: ~/.pi/agent/supi/config.json
  • project: .pi/supi/config.json

Architecture

@mrclrchtr/supi-lsp is the semantic substrate in SuPi's code-understanding stack. It depends on @mrclrchtr/supi-core and @mrclrchtr/supi-code-runtime for shared contracts, and provides a session-scoped LSP service that publishes semantic and diagnostic capabilities into the shared workspace runtime.

supi-code-runtime  ← shared contracts + workspace runtime
    ↑
supi-lsp           ← LSP client + session-scoped service + runtime capabilities

Package surfaces

  • @mrclrchtr/supi-lsp/api — reusable session-scoped LSP service and related types
  • @mrclrchtr/supi-lsp/extension — pi extension entrypoint
  • @mrclrchtr/supi-lsp/provider/lsp-semantic-provider — shared SemanticProvider adapter

Example:

import { getSessionLspService, toLspPosition } from "@mrclrchtr/supi-lsp/api";

const state = getSessionLspService("/project");
if (state.kind === "ready") {
  const defs = await state.service.definition("src/index.ts", toLspPosition(6, 11));
}

SessionLspService methods use raw 0-based LSP positions. The expert tools (lsp_hover, lsp_definition, etc.) keep the public 1-based coordinate UX.

Source

  • src/lsp.ts — extension wiring, session lifecycle, and /lsp-status
  • src/config/ — server config, defaults, capabilities, and exported LSP protocol types
  • src/session/ — session state, scanning, settings registration, tree persistence, and shared service registry
  • src/tool/tool-specs.ts — single source of truth for the public LSP tool surface
  • src/tool/guidance.ts — prompt surfaces derived from tool specs
  • src/tool/register-tools.ts — focused tool registration driven by tool specs
  • src/tool/service-actions.ts — service-backed tool execution and formatting
  • src/tool/names.ts — stable tool name constants
  • src/tool/overrides.ts — read/write/edit overrides for inline diagnostics
  • src/ui/ — custom diagnostic message rendering and the status overlay
  • src/client/, src/manager/, src/diagnostics/ — runtime engine subsystems
  • src/api.ts — reusable developer-facing surface