export function shouldRestoreClawdComposerAfterFailure({ explicitlyCanceled, }: { explicitlyCanceled: boolean; }) { return explicitlyCanceled; } export function isClawdTransportInterruption(error: unknown) { if (!(error instanceof Error)) return false; return ( error.name === "AbortError" || /aborted|failed to fetch|fetch failed|network|interrupted/i.test(error.message) ); }