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

pi-arc-caffeine

v0.3.0

Published

pi extension for Arc workspaces: stable skill paths and tool list, guidance on waiting for long-running work, and a guard against long sleeps

Readme

pi-arc-caffeine

A small pi extension for Arc workspaces that tells pi to sleep less. Add npm:pi-arc-caffeine to the workspace's pi packages; there is nothing to configure. It does four things:

  • Stable skill paths. Arc copies /workspace/.pi into a new .pi/resources/snapshot-<random>/ for every pi launch, so skills loaded from there get a new <location> in the system prompt whenever pi starts, and nothing after it can be read from the prompt cache. Each such skill is listed at the same file under $ARC_WORKSPACE_ROOT/.pi/skills instead (default /workspace), if it exists there. If an earlier extension already replaced the prompt, the same rewrite is applied to its text.
  • Stable tool list. Arc lists some tools' fields (such as a schema's required) in a different order each time it starts pi. pi records that as a patch removing the tool and adding it back at the end of the list, so the provider's whole prompt cache misses. Patches that change nothing apart from key or required order are left out of each request.
  • Waiting guidance. The main session's system prompt gets a short section on waiting for long-running work: Arc's bash hands anything slower than 60 seconds to the background, and its result starts the agent's next turn, so the agent should end its turn rather than poll. Subagents and workflow agents, whose turn can't resume, don't get it.
  • Sleep guard. A bash call whose command starts with sleep (after any cd … && or cd …;) for longer than 5 seconds is refused. The model is told to end its turn to wait for a command it started (subagents and workflow agents aren't), or to run one bounded loop that exits on a condition, such as timeout 900 sh -c 'until <check>; do sleep 5; done'; a sleep inside a loop like that is allowed.

It also records, as an arc-extension-telemetry custom entry in the pi session file (never sent to the model), whether each of its fixes had anything to change: at most twice per pi process, the first time a fix changes nothing and the first time it changes something. tool_patches also records each new reorder patch it drops, so the check can tell which requests it covered. Workflow agents (sessions without a file) record nothing. Demeter's check-arc-prompt-cache skill summarizes the entries, to show which fixes are still needed.

This is a subset of pi-arc-lifecycle, which does all of the above and much more. Don't load both.

Development

pnpm i
pnpm test        # vitest; never calls a model
pnpm type-check
pnpm format

To release, bump version in package.json in your PR. When it merges to master, .github/workflows/publish-arc-caffeine.yaml stages it on npm with trusted publishing (OIDC, GitHub environment npmjs-pi-arc-caffeine); a maintainer then approves it on npmjs.com (or npm stage approve <id>) with 2FA. ./publish.sh is the manual fallback.