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

@aio-proxy/plugin-sdk

v0.39.0

Published

Public contracts for extending aio-proxy with provider and OAuth plugins.

Readme

@aio-proxy/plugin-sdk

Public contracts for extending aio-proxy with provider and OAuth plugins.

Runtime compatibility

Plugin runtime hooks execute inside the aio-proxy Bun host. Bun >=1.4.0 is the v1 runtime compatibility target. Plugin authors may use Node-based tooling for development and type checking, but execution under Node or undici is not part of the v1 compatibility promise.

Using a sign-in already on this machine

An OAuth adapter can declare localSignIn?: OAuthLocalSignIn<AccountOptions, Credential> to offer a vendor tool's existing local sign-in as an alternative to its browser OAuth flow. source is a LocalizedText label for the tool, such as Codex. The capability is optional; existing adapters keep their browser flow.

  • detect(context: OAuthLocalSignInContext) returns Promise<boolean> and checks presence only. It must never parse the host store, read secrets, or return account details. The context contains only signal.
  • read(context: OAuthCredentialImportContext, options: AccountOptions) returns Promise<OAuthLoginResult<Credential>>. Read the host store only after explicit user consent for the account. The context supplies progress, signal, and an optional fetch, as with credential imports.
  • write?(context: OAuthLocalSignInContext, next: Credential, previous: Credential) returns Promise<void>. Implement it only for stores whose refresh tokens rotate; omit it for stores that need only a one-time credential copy.

For adapters with write, identical host-store contents must produce identical credential values from read: the framework compares canonical credential digests between reads. Do not synthesize credential fields from the current time or generate random values on each read.

Before an atomic replacement, write must re-check that the host still holds previous, including the same account and refresh token. If either changed, return without writing. Finish writeback even if the signal was aborted after rotation consumed the token. Removing a Provider never calls write or changes the host store. Keep host credentials out of logs, traces, diagnostics, errors, and API responses.

Catalog model metadata

ModelDescriptor.modelMetadata reports typed model information that the host can merge into its upstream metadata layer. Its DescriptorModelMetadata type is a subset of the published @aio-proxy/types ModelMetadataInput: name, description, limit, capabilities, and cost. extend remains a user-config feature and is not available to plugins. Unknown keys are stripped; an invalid modelMetadata value is dropped fail-soft so the rest of the descriptor and catalog remain usable.

import type { ModelCatalog } from '@aio-proxy/plugin-sdk';

const catalog: ModelCatalog = {
  language: [
    {
      id: 'upstream-model-id',
      displayName: 'Upstream Model',
      modelMetadata: {
        limit: { context: 200_000, output: 32_000 },
        capabilities: { reasoning: true, toolCall: true },
        cost: { input: 1, output: 4 },
      },
      extra: { wireFamily: 'example-v2' },
    },
  ],
  image: [],
  video: [], // Optional; served by a plugin raw resolver for openai-video.
  embedding: [],
  speech: [],
  transcription: [],
  reranking: [],
  extra: { catalogRevision: 2 },
};

extra is opaque, plugin-private JSON data. It replaces the former free-form metadata field on ModelDescriptor and ModelCatalog, and the raw resolver input now provides extra instead of metadata. Use modelMetadata only for host-consumed model metadata and extra for wire hints or other plugin state.