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/core-proxy

v1.0.0

Published

Generic routing and rate-limit proxy engine for the intisy-ai AI-proxy ecosystem.

Readme

core-proxy

The shared routing + HTTP-proxy engine for the intisy AI-tooling ecosystem. It holds the :34567 daemon logic (tier→provider routing chains, rate-limit fallback, model rewrite, the native-429 synthesis, and the node↔web request adapter) as a single source of truth, so both the loaders and the dashboard sidecar drive identical behavior.

This is a library repo compiled from a git submodule (the same treatment as core / core-auth / core-loader). It is also published as @intisy-ai/core-proxy, which is how a plugin installed from npm resolves it rather than inlining a copy.

Under-the-Hood Architecture

flowchart LR
  A[cc / oc request] --> S[createProxyServer :34567]
  S -->|/health| H[ok]
  S -->|/v1/models| C[catalogEntries]
  S -->|/v1/messages| R[resolveModelMap → tier chain]
  R --> W{walk chain}
  W -->|resolveHandler provider| P[provider handle]
  P -->|isRateLimited| W
  W -->|chain exhausted| N[rateLimitFinal → profile.nativeRateLimit]

Routing is parameterized by a RoutingProfile: everything app-specific (config filename, routing key, tier order/fallback, tier regex, env prefix, default context/output limits, and the native rate-limit response) lives in a profile supplied by the caller. This engine is generic: it contains no per-app logic. Each app's concrete profile lives in its own project (e.g. claude-code-proxy provides the Anthropic/Claude profile); a new proxy-using app adds its own <app>-proxy on top of this engine rather than forking it.

Structure

  • src/types.ts: the ABI (HandlerCtx, ProxyHandler, HandlerResolver, Assignment, Chain, ModelMap, CatalogEntry, RateLimitInfo, RoutingProfile, ProxyOptions, ProxyServer) + isValidProfile.
  • src/rate-limit.ts: isRateLimited, rateLimitResetMs, rateLimitFinal.
  • src/model-map.ts: resolveModelMap, claudeTiers, readModelMap, catalogEntries, normalizeChain, modelEnvPairs.
  • src/handler-resolver.ts: makeDynamicResolver (mtime-cache-busting dynamic import of provider handlers, provider list injected).
  • src/server.ts: createProxyServer(opts) (the daemon + node↔web adapter).
  • src/index.ts: the public barrel. (App profiles live in their own project, not here; see claude-code-proxy.)
  • dist/: compiled output (gitignored, never committed).

Usage

import { createProxyServer, makeDynamicResolver, type RoutingProfile } from "../core-proxy/src/index.js";

// `profile` is supplied by an app-specific project (e.g. claude-code-proxy's anthropicProfile()).
const resolveHandler = makeDynamicResolver(() =>
  listProviders().map((p) => ({ provider: p.provider, handlerPath: p.handlerPath }))
);
const server = createProxyServer({ configDir, profile, port: 34567, resolveHandler });
await server.listen();

Testing

npm run build && npx vitest run runs unit tests for each module plus an integration test that binds an ephemeral port and exercises /health, chain fallback past a rate-limited provider, and native-429 exhaustion.

License

MIT