hasRunningCommand
Returns true while shell integration reports a command between command-start and command-finished markers.
Idle prompts, sessions that have not emitted shell integration markers, finished commands, and commands abandoned by a newer prompt all return false. The query is allocation-free and safe for host close-policy checks.
Return
true when an active foreground command is known to be running.