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

@intisy-ai/custom-auth

v0.3.1

Published

Generic provider for user-configured HTTP AI endpoints (IR <-> vendor wire via translator submodules), key via core-auth.

Readme

custom-auth

npm version npm downloads CI

A generic core-auth provider for user-configured HTTP AI endpoints. Instead of one upstream vendor, it drives any number of endpoints declared in its own config, each with its own wire format, translating canonical IR to and from that format via a translator submodule (openai-translator, more later). The API key for each endpoint is never stored in config: it lives in core-auth's account store, reachable only through the Accounts menu.

Under-the-Hood Architecture

flowchart LR
  A[IR request] --> B{split model}
  B -->|endpointId| C[select endpoint config]
  C -->|endpoint.format| D[select translator]
  D --> E[translator.encodeRequest]
  E --> F[fetch endpoint.baseUrl]
  F -->|stream| G[translator.decodeStream]
  F -->|non-stream| H[translator.decodeResponse]
  G --> I[IR event stream]
  H --> J[IR response]

Structure

  • src/
    • src/driver.ts, the provider: resolves the endpoint + translator for a model, calls handleIr(), and declares the endpoints setting.
    • src/endpoints.ts, endpoint config lookup, model-name splitting, and the key store bridge (saveKey/keyFor) into core-auth's accounts.
    • src/handler.ts, Claude entry (exposes the IR-native handleIr the proxy front-door calls).
    • src/index.ts, OpenCode entry (defineProvider(driver).opencode) and the /custom-auth-config CLI guard.
    • openai-translator/, core-auth/, core/, git submodules (the OpenAI wire translator; the auth engine; shared config/logging), bundled in.
  • dist/
    • dist/index.js, dist/handler.js, dist/driver.js, esbuild bundles the submodules in, producing self-contained entries; not committed.

Installation

Via plugin-updater (recommended)

npx plugin-updater@latest init https://github.com/intisy-ai/custom-auth

Via npm

npm install custom-auth

This package publishes under two names: custom-auth and @intisy-ai/custom-auth, both resolving to the same build.

Configuration

Config file: <configDir>/config/custom-auth.json (edit via the loader or /custom-auth-config set).

{
  "endpoints": [
    { "id": "local", "label": "Local endpoint", "baseUrl": "https://api.example.com/v1", "format": "openai", "models": ["gpt-4o"] }
  ]
}

| Field | Meaning | | --- | --- | | id | Short identifier used as the model prefix. | | label | Display name shown in the loader. | | baseUrl | The endpoint's base URL (its /chat/completions path is appended). | | format | The wire format to translate through (currently openai). | | models | The upstream model names this endpoint serves. |

The API key for an endpoint is never part of this file. It is stored via core-auth's account store (saveKey, reachable through the Accounts menu), keyed to the endpoint's id, so it never appears in a config diff or a shared config export.

Usage

Each endpoint's models are advertised namespaced as <endpointId>/<upstreamModel>, for example local/gpt-4o. Selecting one of these models routes the request through that endpoint's translator; the <endpointId> prefix is stripped before the request reaches the upstream service.

License

MIT.