import { BaseTerminalProfile } from 'tabby-terminal' export interface Shell { id: string name: string command: string args?: string[] env: Record /** * Base path to which shell's internal FS is relative * Currently used for WSL only */ fsBase?: string cwd?: string /** * SVG icon */ icon?: string hidden?: boolean } /** * Extend to add support for more shells */ export abstract class ShellProvider { abstract provide (): Promise } export interface SessionOptions { restoreFromPTYID?: string name?: string command: string args?: string[] cwd?: string env?: Record width?: number height?: number pauseAfterExit?: boolean runAsAdministrator?: boolean } export interface LocalProfile extends BaseTerminalProfile { options: SessionOptions } export interface ChildProcess { pid: number ppid: number command: string } export abstract class UACService { isAvailable = false abstract patchSessionOptionsForUAC (sessionOptions: SessionOptions): SessionOptions } export abstract class PTYProxy { abstract getID (): string abstract getPID (): Promise abstract resize (columns: number, rows: number): Promise abstract write (data: Buffer): Promise abstract kill (signal?: string): Promise abstract ackData (length: number): void abstract subscribe (event: string, handler: (..._: any[]) => void): void abstract unsubscribeAll (): void abstract getChildProcesses (): Promise abstract getTruePID (): Promise abstract getWorkingDirectory (): Promise } export abstract class PTYInterface { abstract spawn (...options: any[]): Promise abstract restore (id: string): Promise }