log
type Logger | null
readonly
use_ffi
type boolean
readonly
constructor
type new (options: PtyManagerOptions): PtyManager
spawn
Spawn a new PTY process and begin streaming its output.
type (terminal_id: string & $brand<"Uuid">, command: string, args: string[], cwd?: string | undefined, cols?: number, rows?: number): void
terminal_id
type string & $brand<"Uuid">
cwd?
type string | undefined
optional
cols
type number
default 80
rows
type number
default 24
returns void
write
Write data to a terminal's stdin.
type (terminal_id: string & $brand<"Uuid">, data: string): Promise<void>
terminal_id
type string & $brand<"Uuid">
returns Promise<void>
resize
Resize the PTY window. Only works in FFI mode.
type (terminal_id: string & $brand<"Uuid">, cols: number, rows: number): void
terminal_id
type string & $brand<"Uuid">
returns void
kill
type (terminal_id: string & $brand<"Uuid">, signal?: string | undefined): Promise<number | null>
terminal_id
type string & $brand<"Uuid">
signal?
type string | undefined
optional
returns Promise<number | null>
has
Check if a terminal exists and is tracked.
type (terminal_id: string & $brand<"Uuid">): boolean
terminal_id
type string & $brand<"Uuid">
returns boolean
destroy
Kill all terminal processes. Called on backend shutdown.
type (): Promise<void>
returns Promise<void>