Skip to content

Pi Pocket 0.25.0: install from npm, background tasks on screen

Choose a tag to compare

@TannerMidd TannerMidd released this 26 Oct 16:09
c65cf99

Pi Pocket now installs from npm, and commands that Pi runs in the background show on screen while they run.

Important

To update: Menu → Update Pi Pocket, or pull, npm install, and restart. Details under Updating.

Highlights

  • Install from npm. npm install -g pi-pocket, then pi-pocket. To try it once, run npx pi-pocket. A git checkout still works as before, and it is still the way to change Pi Pocket's code. Fixes #164 (#165, reported by @yimeng)
  • Background tasks show while they run. A session with commands in the background shows N in background under the message box. A tap opens Running now, where you can stop them. (#166)

New

  • npm package. Pi Pocket runs from a global, local, or npx install on Node.js 22.19 and newer. An npm install updates with npm install -g pi-pocket@latest, and Menu → Update Pi Pocket says so.

  • Subagents can think harder than their session. Pi can start a subagent or a linked session at any thinking level, such as a cheap model at its highest, and a level you raise by hand stays. Fixes #172 (reported by @Haichiu)

Improved

  • Finished background tasks show as a card. When a background command ends, the conversation shows how it ended, how long it took, and the last lines of its output. (#170, by @piromagnus)
  • Background tasks. The session's row in the list shows a terminal mark with the count. The rail's Running now button counts sessions that run background commands, not only sessions where Pi works.
  • Pi knows an npm install is read-only. When Pi Pocket runs from npm, Pi reads its code and docs there. To change Pi Pocket, Pi clones the repository instead.

Fixed

  • Each model's own compaction point. Per-model compaction values in Pi's settings (compaction.modelOverrides) now count, so a model with a large context window can compact much earlier than the others. Fixes #174 (reported by @ogerets-glitch)
  • Gallery installs of small files. An extension whose small files GitHub sends compressed, such as Voice Message, failed to install with a false size and SHA-256 mismatch. (#168, by @piromagnus)

For theme and extension authors

  • Drop-in packages from npm installs. In an npx or local install, the drop-in folder's node_modules link points to the folder where npm put Pi Pocket's packages.
  • Linked sessions API. linkedSessions.start takes any thinking level; one the model lacks becomes its nearest lower one, else its lowest.
  • New status line item core:background (class background-now), and a session row mark (class session-background).

Updating

  1. Menu → Update Pi Pocket, or stop the server, pull, run npm install, and start it again.
  2. An npm install: npm install -g pi-pocket@latest, then start it again.
How this release was checked
  • Code review in 7 rounds by 14 reviewers, ending with a final review of the whole release, and a check of each fix. Reviews found one bug (drop-ins could not import Pi's packages when npm split them between folders) and some smaller issues, all fixed.
  • Installs from the packed package: global (also read-only), local, and npx, on Node.js 22.19, 24, and 26.
  • Live tests on copies by 8 testers: the background indicator and the end card at up to 6 screen sizes, dark and light, with guests; a gallery install; a regression pass over the core flows; and real models on an npm install and for subagent thinking levels.
  • Type check, lint, format, and 731 tests pass. One older test of the artifact viewer sometimes times out under load.
  • Not tested: Windows, macOS, pnpm, and yarn installs, real phones, and a restart of a real server with background tasks running.

Thanks to @piromagnus for the gallery fix and the background card, @yimeng for asking for npm, and @Haichiu for the thinking level report, and @ogerets-glitch for the compaction report.

Known limit: npm does not apply Pi Pocket's undici override to an npm install. Pi's own package keeps undici 8.10.2 there until Pi updates it.

Full changes: v0.24.0...v0.25.0