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

@premai/api-extension-pi

v0.1.0

Published

Pi extension that registers the Prem API inference provider (end-to-end encrypted via @premai/api-sdk createRvencClient).

Readme

@premai/api-extension-pi

A Pi extension that registers the Prem API inference provider. By default models route through @premai/api-sdk's createRvencClient, which encrypts payloads end-to-end before they reach the gateway. Set ENABLE_ZDR=true to route through the plain OpenAI-compatible ZDR path instead.

Documentation | API keys | npm

Modes

| ENABLE_ZDR | Transport | Model catalog | | --- | --- | --- | | false (unset) | Encrypted rvenc (/rvenc/chat/completions) | /rvenc/models (confidential) | | true | Plain OpenAI (/openai/chat/completions) | /openai/models (standard) |

Models are fetched from the gateway at runtime.

Install

Add to your Pi settings.json:

{
  "packages": ["npm:@premai/api-extension-pi@^0.1.0"]
}

or point extensions at a local checkout:

{
  "extensions": ["/path/to/api-extension-pi"]
}

Configuration

Create a Prem API key, then set the environment variables the extension reads:

export PREM_API_KEY="your-api-key"
export PROXY_URL="https://gateway.prem.io"
export ENCLAVE_URL="https://conf-engine.prem.io"

| Variable | Required | Default | Purpose | | --- | --- | --- | --- | | PREM_API_KEY | yes | — | Gateway API key | | ENABLE_ZDR | no | false | true routes through the plain OpenAI ZDR path | | PROXY_URL | no | https://gateway.prem.io | Gateway proxy endpoint | | ENCLAVE_URL | no | https://conf-engine.prem.io | Confidential enclave endpoint (confidential mode only) | | CLIENT_KEK | no | ephemeral | 32-byte key (64 hex) for persistent DEK caching across runs (confidential mode only) |

Without CLIENT_KEK, an ephemeral key-encryption key is generated per process. Keep the API key and KEK in a secret manager; never commit them.

Usage

Set defaultProvider in settings.json:

{
  "defaultProvider": "prem-api"
}

Pi picks a default model from the fetched catalog; set defaultModel to pin one:

{
  "defaultProvider": "prem-api",
  "defaultModel": "deepseek-v4-flash"
}

Security

  • Inference payloads are encrypted inside the Pi process before they leave the machine. The Prem gateway receives ciphertext plus operational metadata only.
  • Pi's repository access, shell commands, MCP servers, hooks, and tool results stay on the local machine or in their own external systems — the confidential boundary covers supported model traffic only.