stop method
Destroys the named session and cleans up its process tree (SIGTERM→grace→SIGKILL of the whole group). Idempotent: completes normally if the session does not exist.
Implementation
@override
Future<void> stop(String name) async {
stopped.add(name);
_live.remove(name);
// stop RELEASES the retained terminal (the terminalOf release contract).
_terminals.remove(name);
}