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

fishball-heartbeat

v1.0.0-alpha.1

Published

Keeps Fishball's prompt cache warm while it is idle with useful heartbeat turns; off until both of its timer settings are set; when it stops, it compacts a long context once. Needs fishball-core in the same DSH.

Readme

fishball-heartbeat

Keeps Fishball's prompt cache warm while it is idle, and gives each warming turn useful work.

  • Off until you set both timer settings (Fishball cannot change any of its settings). Installed through the fishball-amenities umbrella, set them on the heartbeat's component page there; a saved change applies at once. Installed alone it has no settings page: set them in its row's config in the profile's cordis.patch.yml.
    • intervalSeconds: seconds with no Fishball turn before a heartbeat turn is sent. Set it below your model's cache lifetime (for example 240 for a 5-minute cache).
    • maxConsecutive: heartbeat turns allowed in a row with no other turn between them. After that no heartbeat is sent and the cache cools until a real turn.
    • compactThresholdTokens (default 256000, DSH's "256K"): see Compaction on cooling. It has a default, so it never turns heartbeats on or off.
  • Timer. Every Fishball turn resets it, heartbeat turns included: it starts when a turn ends and is cleared when a turn starts, so a heartbeat never arrives during a turn.
  • Count. A turn is a heartbeat turn when it carried the heartbeat message and no work: nothing you typed, no batch of connector events, no reminder, no other plugin's notice. A heartbeat turn adds one; any other turn resets the count to zero. A turn that made no model request changes neither the count nor the timer.
  • Batched events. fishball-core hands connector events to Fishball in batches (one turn per batch). Each batch turn resets the timer and the count like any real turn; events still waiting in core's quiet window are not a turn yet, so a heartbeat can fire meanwhile.
  • Focus. Fishball's heartbeat_focus tool sets what the next heartbeat should focus on ({focus: string}, at most 2000 characters, empty clears). It is stored in <profile home>/fishball-heartbeat/focus.json. Every heartbeat message carries the focus and tells Fishball to call heartbeat_focus at the end of that turn, from the current state (for example its managed sessions' progress).
  • Restart. When Fishball's session next opens, the count and the last turn's end are read back from its log. A heartbeat that came due while DSH was down, or whose timer fires late because the machine slept, is not sent (the cache is presumed cold); the next turn re-arms the timer.
  • A failed send is logged and not retried; the next turn re-arms the timer.
  • Compaction on cooling. Whenever the heartbeat gives up warming the cache (the limit reached, an overdue or late heartbeat dropped, a failed send), it measures Fishball's context with DSH's token meter (tokenMeter.measure, the size DSH's own compaction compares against). If it is longer than compactThresholdTokens, it compacts it once, with DSH's idle compaction (compaction.compactNow, what /compact runs), after Fishball's turn has finished. The next real turn pays a cold cache write anyway, so this is when a shorter context costs least. Once per cooling: after an attempt (compacted, nothing to compact, or failed) nothing more is compacted until a real turn; a heartbeat turn does not reset it, and an idle compaction already in the log counts after a restart. At or below the threshold nothing happens. A failure is logged and not retried. A message arriving while it runs waits for it, as during /compact. It needs a compaction service in Fishball's composition (fishball-core's own preset carries DSH's compaction-basic with automatic compaction off); without one, or without the token meter, it logs that once and only keeps the heartbeats.

Each heartbeat is a real model turn over Fishball's cached context: cache-read input plus whatever Fishball does in it. maxConsecutive bounds the heartbeats between two real turns. A connector event batch is a real turn, so a heartbeat that pokes a managed session whose reply wakes Fishball starts a fresh count.

Install it on its own, or with the other amenities through the fishball-amenities umbrella. It needs fishball-core in the same DSH; without it the row loads, logs fishball-core-missing once and stays idle. It has no browser code.