OnPanic: when set, slave stderr is tailed through a fixed-size ring
buffer and scanned by panicparse on exit; matching snapshots are
delivered to the user callback in a goroutine so a slow consumer can't
stall the fork loop.
ShouldRestart: gates auto-restarts after a fetch. When it returns false
the restart is recorded as pending and re-evaluated on each fetch-loop
iteration. Manual Restart()/RestartSignal bypass the gate.
Restart orchestration now claims restarting/pendingRestart under
restartMux so the fetch loop, signal handler and fork goroutine don't
race on shared state.
Panic detection lives in its own opanic subpackage and re-exports the
panicparse snapshot types so consumers only import opanic.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>