Skip to content

v0.4.0

Choose a tag to compare

@lloydsk lloydsk released this 09 Sep 15:02
· 25 commits to main since this release
2ed56b7

Highlights

  • Slash commands — /bgstatus [id] [done], /bgtail <id> [lines], /bgclean [days] [all] are now available directly in the TUI (registered via pi.registerCommand, sharing core logic with the agent tools). /bgrun stays agent-only.
  • Zombie-proof session resume — jobs that finished while pi was down no longer reconstruct as "running" forever: stale records (no live child handle) are revalidated via the log's exit marker + pid liveness, and a done entry is backfilled to the transcript. Reconstruction also honors state: "done" with a missing exit code (signal kills).
  • Session-scoped cleanup by default — bgclean only removes this session's old logs unless you pass all: true. Session-boundary auto-sweeps are session-scoped plus a global orphan sweep (default on) that removes finished, week-old logs from crashed/abandoned sessions, throttled to once per cleanupDays via a .last-clean marker. Running jobs are always pid-protected. Opt out with globalAutoClean: false / PI_BGRUN_GLOBAL_AUTO_CLEAN=0.
  • Date-aware widget — the "since" timestamp now includes the date when a job started on a previous day (and the year when it differs).

Configuration additions

Knob Default Env var
globalAutoClean true PI_BGRUN_GLOBAL_AUTO_CLEAN

Full Changelog: v0.3.0...v0.4.0