Repository navigation
v2.35.0: Daemons can report their current activity through OSC 7501; stop --all asks before stopping other projects
LatestDaemons can now report what they are doing, and pitchfork shows it in list, status, the TUI and the web UI. pitchfork stop --all now asks before it stops daemons that belong to other projects, and progress output stays readable when stderr is redirected.
Added
-
Daemons can report their status with OSC 7501 (#1125) by @jdx. Pitchfork reads Program Status Protocol (OSC 7501) reports from daemon output and shows the most recent one in
pitchfork list,pitchfork status, the TUI and the web UI. You can see which phase a long-running job or cron job is in without reading its logs.# in a script run by a daemon printf '\033]7501;state=working:progress=40:msg=%s\033\\' "$(printf 'Syncing GitHub issues' | base64)"
$ pitchfork list Name Status nightly-sync running working 40% Syncing GitHub issues- This is always on and needs no configuration. Daemons that never emit OSC 7501 behave as before. It works for piped and PTY daemons, and a report is picked up without waiting for a newline.
idle,workingandblockedreports are cleared when the process exits.doneanderrorreports stay until the next run starts.- Only the root record is tracked, so reports with an
idare ignored. Reports with an invalidmsg(control characters, bad base64, or anything over the spec limits) are also ignored. list --jsonandstatus --jsonnow include an optionalprogram_statusobject, and the web API includes aprogram_statusstring.- The new guide is at
docs/guides/program-status.md.
Fixed
-
pitchfork stop --allasks before stopping daemons outside the current project (#1123, fixes #1122) by @jdx. Before, runningstop --allto shut down one project's daemons also stopped every other project's daemons. Now, if it would stop daemons that the current project's config doesn't define, it lists them first:$ pitchfork stop --all This will stop the following daemons outside this project: * agent-env-docker/dockerd * agent-env-files/dufs Stop all daemons? [y/N]In an interactive terminal it stops them only if you answer
yoryes. Without a terminal it refuses and exits non-zero. The new-f/--forceflag, which only works with--all, skips the check. Behavior doesn't change when every running daemon belongs to the current project, or when you use--local,--global,--groupor name the daemons. Outside any project, every daemon counts as outside. -
Progress output no longer floods logs when stderr isn't a terminal (#1127, fixes #1126) by @jdx, with the patch suggested by @neilconway. When stderr goes to CI logs, files or pipes, pitchfork now prints one plain line per status change. Before, the spinner redraws produced thousands of repeated lines full of escape codes. Interactive terminals still get the animated spinner, and
CLX_TEXT_MODE=1still forces text mode. -
Windows process stats can no longer hang on parent-PID cycles (#1130) by @jdx. Windows can report a process tree that contains cycles. Collecting CPU and memory stats now visits each process only once, so it can't loop forever or count a process twice. The same PR makes
schema,usageandapi-schemastart without spinning up a worker thread pool.
Breaking Changes
- Scripts, CI jobs and agents that run
pitchfork stop --allwithout a terminal now fail if daemons from other projects are running. To keep the old machine-wide behavior, usepitchfork stop --all --force. To stop only the current project's daemons, usepitchfork stop --local.
Full Changelog: v2.34.0...v2.35.0
💚 Sponsor pitchfork
pitchfork is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.
If pitchfork has a place in your development workflow, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep pitchfork fast, free, and independent.