Centralize pending-run, waiter, and finalized-turn bookkeeping in a new ForegroundRunState module so streamAgent, replaceAgentRun, cancelAgentRun, reload/close, and stream dispatch share one coordinator instead of hand-rolling the lifecycle in five places.