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

context-latch

v2.0.0

Published

Smooth out LLM cold starts with intelligent request latching!

Readme

context-latch

Smooth out LLM cold starts with intelligent request latching!

A local proxy for developers running local LLMs on GPUs with limited VRAM. It batches incoming requests into a queue so the GPU never exceeds num_parallel, while keeping client connections alive so they don't time out waiting for a slot.

How it works

When num_parallel is low (1–2), a GPU can only process a few requests at a time. Without context-latch, any extra requests arriving while the GPU is busy will fail or time out.

context-latch sits between your client (e.g. Claude Desktop, OpenClaude CLI) and the local LLM server (llama.cpp, ollama, llama-swap):

  1. Incoming requests are queued immediately.
  2. A background scheduler ticks every tickTime ms and forwards queued requests only when a GPU slot opens.
  3. If a queued request exceeds deadline (and is still waiting), the proxy returns a 529 — clients like OpenClaude treat a 529 as a signal to retry, which resets the cold start.
  4. Browser requests bypass the queue entirely and always go straight to the GPU.

Configuration

Copy config_sample/config.json to your project and adjust:

| Field | Required | Description | |---|---|---| | port | yes | Port the proxy listens on | | tickTime | yes | Interval in ms to check for free GPU slots | | deadline | yes | Max wait time in ms before returning 529 | | upstreamHost | yes | Target LLM server host (e.g. localhost:8080) | | maxInflightRequests | no | Parallel requests allowed on the GPU — matches num_parallel of the target LLM (default: no limit) |

Install

npm install -g context-latch

Usage

context-latch ./path/to/config.json