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

@senomas/proxy-provider

v0.1.4

Published

A [pi-coding-agent](https://github.com/earendil-works/pi-coding-agent) extension that registers a **deepseek** provider via a configurable AI proxy.

Readme

@senomas/proxy-provider

A pi-coding-agent extension that registers a deepseek provider via a configurable AI proxy.

What it does

This package extends pi with a "deepseek" provider (always registered). On every session:

  1. Discovers .pi-project.json: walks up from the current directory; if not found, checks the main git worktree root (so linked worktrees work); if still not found, fails with a descriptive error
  2. Reads the project, proxy, and optional providers fields from that file
  3. Fetches model definitions from ${proxy}/static/providers/deepseek.json and registers the default "deepseek" provider
  4. If a providers map is present, fetches and registers each additional provider
  5. All providers get the proxy as baseUrl and the project name as the AI-Proxy-Project header

Prerequisites

  • Node.js 18+ (for global fetch)
  • pi-coding-agent installed (npm install -g @earendil-works/pi-coding-agent)

Installation

pi install npm:@senomas/proxy-provider

Configuration

Create a .pi-project.json file in your project root:

{
  "project": "my-project",
  "proxy": "https://proxy.example.com"
}

| Field | Type | Description | |-------|------|-------------| | project | string | Project name sent as the AI-Proxy-Project header | | proxy | string | Base URL of the AI proxy server | | providers | object (optional) | Map of provider names→config filenames served by the proxy at {proxy}/static/providers/ |

Multiple providers

You can register additional providers by adding a providers map. Each entry registers a provider with the same baseUrl and AI-Proxy-Project header as the default "deepseek".

{
  "project": "my-project",
  "proxy": "https://proxy.example.com",
  "providers": {
    "deepseek-work": "deepseek.json",
    "deepseek-chat": "deepseek-chat.json"
  }
}

Behavior details:

| Aspect | Detail | |--------|--------| | Default | "deepseek" from deepseek.json is always registered | | Override | If you include a key named "deepseek" in providers, it overrides the default (last registerProvider wins) | | Empty {} | Treated as "no additional providers" — default "deepseek" is still registered | | Config files | Each value must be a non-empty JSON filename served by the proxy under {proxy}/static/providers/ | | Validation | Keys and values must be non-empty strings. Invalid entries throw a descriptive error at startup | | Fail-fast | If fetching any config file fails, the entire extension throws — no partial registration |

Config file content — each referenced JSON file contains the provider's model definitions, which are merged with baseUrl and headers.AI-Proxy-Project before registration. The exact format depends on your proxy server's provider schema (typically a list of models with their capabilities).

Server-side dependency

This extension requires a running AI proxy server that exposes provider configuration files under /static/providers/.
Refer to the ai-team-proxy project for the reference proxy implementation and deployment instructions.

Verification

After installation, list available models to confirm the provider is registered:

pi --list-models | grep deepseek

You should see the deepseek models exposed by your proxy.

How it works

The extension exports an async default function that:

  1. Finds .pi-project.json in two steps:
    • Walks up from the current directory (process.cwd()) looking for .pi-project.json
    • If not found, resolves the main git worktree root via git rev-parse --path-format=absolute --git-common-dir (falling back to parsing git worktree list --porcelain for git < 2.31) and checks <root>/.pi-project.json — so a config kept only in the main worktree is found from any linked worktree. Outside a git repo this step is skipped, and if no config exists anywhere the extension fails with a descriptive error.
  2. Parses the file with fs.readFileSync/JSON.parse and validates the project, proxy, and optional providers fields
  3. Calls fetch() to retrieve the default "deepseek" provider metadata from the proxy
  4. If a providers map is present, fetches and registers each additional provider in the same way
  5. Calls pi.registerProvider(name, config) for each provider with the fetched models, proxy baseUrl, and AI-Proxy-Project header

Testing

npm install
npm test

Runs the unit/integration tests (Node's built-in test runner via tsx) against test/*.test.ts.

License

MIT