import { type Terminal } from '@xterm/headless'; import { type SerialPort } from '../SerialPort/SerialPort'; export interface Callbacks { onSuccess: (response: string, command: string) => void; onError: (message: string, command: string) => void; onTimeout?: (message: string, command: string) => void; } export interface ShellParserSettings { shellPromptUart?: string; logRegex: RegExp; errorRegex: RegExp; timeout: number; columnWidth: number; } export type ShellParser = Awaited>; export type XTerminalShellParser = ReturnType; export declare const xTerminalShellParserWrapper: (terminal: Terminal) => { getTerminalData: () => string; clear: () => void; getLastLine: () => string; write: (data: string, callback: () => void) => void; }; export declare const shellParser: (serialPort: SerialPort, xTerminalShellParser: XTerminalShellParser, settings?: ShellParserSettings, shellEchos?: boolean) => Promise<{ onPausedChange: (handler: (state: boolean) => void) => () => void; onShellLoggingEvent: (handler: (state: string) => void) => () => void; onAnyCommandResponse: (handler: ({ command, response, error, }: { command: string; response: string; error: boolean; }) => void) => () => void; onUnknownCommand: (handler: (state: string) => void) => () => void; enqueueRequest: (command: string, callbacks?: Callbacks, timeout?: number, unique?: boolean) => Promise; registerCommandCallback: (command: string, onSuccess: (data: string, command: string) => void, onError: (error: string, command: string) => void) => () => void; unregister: () => void; isPaused: () => boolean; unPause: () => Promise; setShellEchos: (value: boolean) => void; }>; //# sourceMappingURL=shellParser.d.ts.map