export type SerialParity = 'none' | 'odd' | 'even' export type SerialFlowControl = 'none' | 'software' | 'hardware' /** What to send when the user presses Enter (UART has no PTY line discipline). */ export type SerialLineEnding = 'lf' | 'cr' | 'crlf' export interface SerialConfig { path: string baudRate: number dataBits: 5 | 6 | 7 | 8 stopBits: 1 | 2 parity: SerialParity flowControl: SerialFlowControl /** Optional local echo — only for serial (PTY backends must stay echo-off). */ localEcho?: boolean lineEnding?: SerialLineEnding } export interface SerialPortSummary { path: string portType: string } export interface SerialDataEvent { sessionId: string data: number[] } export interface SerialErrorEvent { sessionId: string message: string }