// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { TerminalCloseReason } from "./TerminalCloseReason";

/**
 * Final event for a terminal session, emitted exactly once
 * on `terminal:closed` when the underlying child exits. The
 * frontend reacts per [`TerminalCloseReason`]: shell exits
 * (the user's own Ctrl+D / `exit`) close the tab, environment
 * losses keep it and offer to respawn. Subsequent
 * `terminal_close` calls for this id are no-ops.
 */
export type TerminalClosed = { stream_id: string, 
/**
 * Process exit code if portable-pty surfaced one.
 * `None` for signals it couldn't translate or for
 * supervisor-cancelled streams.
 */
code: number | null, reason: TerminalCloseReason, };
