1bad1014da
Two more teardown stdout writes (besides the paste-disable fixed in #126) were gated only on isTTY, which stays cached-truthy after destroy()/end() — so a teardown on an already-gone stdout threw ERR_STREAM_DESTROYED: log-update's show/hide-cursor restore and kitty-keyboard's async disable-kitty write. Both now also require !destroyed && !writableEnded, matching Ink's canWriteToStdout (App.tsx:620, ink.tsx:792). The writeBestEffort-routed restores (alt-screen exit, non-interactive last frame, final commit) were already safe. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>