@finngi/pi-background

Managed Bash and session-owned background processes for Pi

Packages

Package details

extension

Install @finngi/pi-background from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@finngi/pi-background
Package
@finngi/pi-background
Version
0.1.0-alpha.0
Published
Oct 16, 2026
Downloads
285/mo · 20/wk
Author
finngi
License
MIT
Types
extension
Size
105.6 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./node_modules/pi-background/dist/extensions/background-process.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@finngi/pi-background

Experimental alpha; tested with Node 24 and stock Pi 1.2.0.

pi install npm:@finngi/pi-background@0.1.0-alpha.0

This download includes its workspace dependencies. No sibling packages are required.

Background Bash jobs for stock Pi. It works on its own, without delegation, goals or a custom launcher. Commands run with your normal user permissions; the optional permission package can check them first.

  • bash keeps Pi's usual schema and results, and adds background: true to return a job ID at once.
  • background_process lets the model list, inspect, read and cancel this session's jobs.
  • /jobs does the same for you. /background, or a steering message, ends a foreground wait while the command keeps running.

Output is kept up to a limit. Shell jobs and child agents have separate limits, four and sixteen by default. Delegation can share this manager or use the process library directly. Children get the selected Bash and background tools and own their jobs; they cannot see a sibling's jobs. Shutdown stops jobs, old handles cannot touch a new session, and jobs are not restarted on resume. Process groups clean up ordinary child processes, but not ones that deliberately detach.

Tests

npm test --workspace=pi-background
npm run test:standalone --workspace=pi-background

The standalone test starts stock Pi with only this package, runs, reads and cancels jobs, and checks cleanup on shutdown. It makes no provider requests and changes no installation.

See the jobs guide, tool reference, service and testing.