cyberine
UsageRun recipes

TUI/chat — update notifier (T533)

On cyberine agents / npm run tui and cyberine chat startup, a background check (src/core/updateCheck.ts) compares the running version against the latest available and, if newer, shows one muted line once the check resolves:

update available 0.2.0 -> 0.3.0  <changelog headline>

The source depends on the install shape — whichever the checkout exposes:

  • git checkout (running from this repo — .git present next to package.json): the origin remote's GitHub releases API (tag_name -> version, name -> the changelog headline shown alongside).
  • installed package (no .git, e.g. a global npm install): the npm registry's <package>/latest.

The check is fire-and-forget and never blocks startup — it runs from the same post-first-paint deferred effect that kicks off the memory preamble / MCP discovery in cyberine chat (and an equivalent mount effect in the fleet TUI), and every network call is timeout-bounded (~2.5s) so a slow/unreachable network never delays anything else. The result is cached under <CYBERINE_HOME>/update-check.json, so the network call itself runs at most once per day; the cached "newer version available" verdict is still shown on every startup within that window. Set CYBERINE_NO_UPDATE_CHECK=1 to disable the check entirely (no cache read/write, no network call).

Run npm run selftest:update-check to exercise the opt-out, the once-per-day cache short-circuit, and the version-compare logic without touching the network.