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

intact-gateway

v0.1.34

Published

intact: a credential proxy for LLM providers, one base URL for every account

Readme

intact

intact is a credential proxy for LLM providers. It keeps every account's credential on one host and serves them all behind one base URL. A request goes to the provider as intact received it, and the provider's answer comes back in full: intact does not drop fields a gateway does not know.

It was built as a lighter, more faithful alternative to a large gateway, for one operator who holds many accounts (API keys and the OAuth sign-ins of coding tools) and wants to use them all from any client.

Install

intact is on npm as intact-gateway. The package installs one binary for your platform: Linux, macOS or Windows, x64 or arm64.

npm install -g intact-gateway
intact -db ./intact.db -addr 127.0.0.1:20142

To build from source, see Getting started.

Features

  • One base URL. Every client points at /v1. The model in the body picks the provider and its accounts: groq/llama-3.3-70b-versatile, or a bare id that any provider lists. Routing

  • OpenAI and Anthropic shapes. /v1/chat/completions and /v1/messages reach any provider. intact translates the request and the answer (streamed or whole) when the shapes differ. When they match, the bytes pass through untouched.

  • Bifrost. When a coding tool calls an account of its own provider, intact changes only the token. The headers and the body of the tool stay as sent, and the blacklist does not run. This applies to Claude Code, the Codex CLI and the Antigravity CLI (agy). For agy, intact also writes the project of the account. intact turns Bifrost on by itself from the User-Agent. Every request still requires an authorized intact credential (Bearer token or x-api-key); User-Agent selects native passthrough behavior but never bypasses authentication. llm-switcher reads bifrost_ua from /v1/models and also sends the request unchanged. Claude Code · Antigravity CLI

  • Rotation and failover. Requests rotate across a model's accounts. A busy answer (429, 500, 503, 409, 404) moves to the next account. A 429 on a long conversation retries with the history shortened, clears cached tool translations to re-map tool calls cleanly for the shortened body, and fails over to the next account. An expired OAuth token is refreshed and the request retried. A Claude Code session stays on one account, so its prompt cache hits. An account with spent quota is skipped until its window resets. Routing

  • Codex compaction. A compaction request from Codex is answered here, with the single output item Codex requires, instead of being passed to a provider that does not know the item type and leaving the thread unresumable. Rebuilt compaction items follow normalized protocol shapes (output_text/input_text message structures for Responses, full parts arrays for Gemini). Codex compaction

  • Providers. API-key providers (Groq, NVIDIA, OpenRouter, Cloudflare Workers AI, TypeSafe), the sign-ins of coding tools (Claude Code, Codex, Antigravity, GitHub Copilot). Any other provider is declared from the dashboard without code: API key, browser OAuth or device-code OAuth, with the fields each kind needs, or pasted as JSON. Providers

  • Web search and server tools. A client that declares Anthropic's hosted web_search tool gets the search run here: intact searches, gives the model the results, and hands the client the blocks Anthropic's servers would have sent. With an active Antigravity account it searches through Google Search grounding and needs no key; otherwise name a search service (INTACT_SEARCH_PROVIDER and INTACT_SEARCH_KEY). The same loop runs the tools Anthropic runs on its own servers: the MCP connector, tool search and web fetch.

  • Model management. A table per provider shows each model with an on/off switch, its thinking support and effort levels, and its last test.

    • Lists are fetched every hour.
    • Auto test keeps on only the models that answer.
    • Only free keeps on only the free models.
    • Antigravity's per-level models are folded into one model, picked by effort.
    • Each model shows its LMArena rating, rank and tier (S–D) on the Overall, Coding and WebDev boards, so a strong model stands out from a weak one.

    Models

  • Blacklist. Editable rules remove what a provider refuses (a body field, a tool-schema key, a system-prompt line, a header) before the request leaves. Blacklist

  • Drift alerts. For providers reached as a coding tool, intact learns the structure of requests (per client) and answers, and records when a field appears, disappears or changes type.

    • Auto-resolve drift settles every change with no person involved:
      • a configured decision model (such as TypeSafe's Jev) closes the benign ones it is sure of;
      • a configured resolver chat model (such as Gemini 3.8 Flash) settles the rest, acknowledging or blacklisting a field a provider refuses.
    • The switch needs a decision model.
    • The same review closes Contract Lab findings that a converter drops by design. Only a real loss stays open.

    The decisions and the trial behind them are in Drift.

  • Contract Lab. Evaluates converter loss and schema drift across client tools and providers without storing prompt or answer text. Evaluates shapes, detects changes, and generates test fixtures. Contracts

  • Error log. Every error a provider answers is kept for 14 days, with the request that was sent, the answer, the headers and the latency. That includes the attempts intact failed over from.

    • Errors are grouped by signature.

    • A 429 is marked a real limit or a fake one: a fake one comes back at once while the account's quota is left.

    • Auto-fix errors: a configured chat model proposes a fix for each recurring group (blacklist what the provider refuses, switch off a dropped model or a revoked account). intact replays the failing request to prove a rule before keeping it.

    Errors

  • Alerts. intact tells the channels you declare what it fixed on its own and what it could not fix: a Telegram chat or topic, or a webhook. Alerts

  • Quota and usage. Quota is read from each provider (rolling windows, resets, weekly pools, per-model shares). Manual resets can be claimed from the dashboard. Token usage is counted per account, model and day. Quota and usage

  • Management API and MCP. Every dashboard action has a route under /api/*, and a tool on the MCP server at /mcp. The routes that change intact need the dashboard session or the master token. A dashboard key calls /v1 and reads what is not admin-only. API

  • Dashboard. A single embedded page with sign-in by a TOTP code and nothing else. No password. API keys are created there. Security

    • It is in English and Vietnamese.
    • It has light, dark and automatic (system) themes.
    • Both choices are made at the bottom of the menu and kept in the browser.

Quick start

npm install -g intact-gateway           # or: CGO_ENABLED=0 go build -o intact ./cmd/intact
intact -db ./intact.db -addr 127.0.0.1:20142

On its first start, intact makes a new TOTP secret for this install and prints it with the steps to add it to an authenticator app. Each install gets its own secret, kept in its database. To print the steps again, run intact -db ./intact.db -show-totp.

The first Antigravity sign-in of an install can take one minute: intact gets the client secret of the Antigravity app from Google one time. See The Antigravity client secret.

Open the dashboard, sign in with the code from the app, add an account under Providers, create an API key under Endpoint → API keys, then:

curl http://127.0.0.1:20142/v1/chat/completions \
  -H "Authorization: Bearer $INTACT_KEY" -H "Content-Type: application/json" \
  -d '{"model":"groq/llama-3.3-70b-versatile","messages":[{"role":"user","content":"hi"}]}'

Getting started covers configuration and a systemd and Cloudflare Tunnel deployment.

Self-improvement with llm-switcher

llm-switcher runs on each developer machine. It lets Claude Code and Codex use intact as their provider, and it converts each request to the format of the target model. The two tools find and correct their own faults, in two loops.

  • intact corrects what providers refuse. Drift learns the structure of requests. The error review groups recurring errors. For a fake 429, intact replays the failing request and removes the system prompt text in halves. It keeps the smallest text that the provider refuses as a filter in its database. All clients get the fix at once, with no client update. Two examples: the sentence "You are Codex, an agent based on GPT-5" and the sentence "You are a Claude agent, built on Anthropic's Claude Agent SDK". Antigravity answered both with a fake 429.
  • llm-switcher corrects what its converter loses. When the contract lab is on, llm-switcher sends a sample of complete exchanges to intact. It masks the client content on the machine first. intact compares the two halves of each exchange and records each field that the conversion lost. switch contract-check then writes one failing test for each finding, and the fix goes into the converter.

For a coding tool on an account of its own provider, the two tools use Bifrost instead. Neither tool converts or filters the request. Only the token changes.

The rules stay in configuration, not in code. A person reads the alerts and the verdicts, and does not find each fault by hand. Errors · Contracts

Documentation

| Page | Contents | | --- | --- | | Getting started | Build, flags, environment, first account, deployment | | Routing | Model resolution, translation, rotation, failover, variants | | Providers | Every built-in provider, sign-in flows, declaring a provider | | Models | The model table, fetching, switches, tests, auto test, only free, thinking | | Blacklist | Request filters: kinds, scope, seeded rules | | Drift | Structure learning and change alerts | | Errors | The error log: what is kept, classes, fake 429s, the automatic review | | Alerts | Alert channels (Telegram, webhook) and events | | Quota and usage | Quota sources, the Quota page, usage counting | | API | Every HTTP endpoint and MCP tool | | Security | Sign-in, API keys, where credentials live |

Research notes from building the provider integrations:

Layout

cmd/intact            the binary: flags, TOTP enrollment, listener
internal/httpapi      routes, /v1 routing and failover, dashboard API, MCP, OAuth login, quota, model tests
internal/translate    OpenAI ⇄ Anthropic, Responses and Gemini request/answer/stream translation
internal/provider     the provider registry (base URL, auth, identity headers, list endpoint)
internal/filter       the blacklist engine
internal/drift        structure learning and change detection
internal/store        SQLite (pure Go): connections, models, filters, keys, drift, usage, settings
internal/oauth        the refresh-token grant
internal/upstream     the outbound HTTP client
internal/web          the dashboard (index.html) and icons, embedded in the binary

Tests

go test ./...
go vet ./...

The tests run against fake upstreams. None of them calls a real provider.

License

intact is released under the MIT License (SPDX identifier MIT). The full text is in LICENSE.

To report a security fault, read SECURITY.md.