Files
Netcatty/domain/terminalPromptSecurity.shared.d.cts
T
陈大猫 ad3d0cfeda refactor: streamline codebase, unify duplicated modules, and consolidate test suite (#4307)
* refactor: streamline codebase, unify duplicated modules, and consolidate tests

* fix(test): batch discovered test files into Windows-safe command lines
2026-11-23 11:00:14 +08:00

24 lines
905 B
TypeScript

export interface ConfirmedPromptOptions {
/** Network-device shells commonly use a bare host name followed by `>`. */
allowHostStyleGreaterThan?: boolean;
/**
* True when the terminal is on the alternate screen (DEC 1049). Used to
* tell vim's command-line `:` from a custom `sudo -p ':'` prompt.
*/
alternateScreen?: boolean;
}
export const MAX_PROMPT_SECURITY_TAIL_CHARS: number;
export function stripTerminalControlSequences(value: string): string;
export function isSensitiveTerminalChallenge(value: string): boolean;
export function isConfirmedTerminalShellPrompt(
promptText: string,
options?: ConfirmedPromptOptions,
): boolean;
export function splitTerminalLogicalLines(value: string): string[];
export function isBashPs2ContinuationLine(line: string): boolean;
export function isUntrustedTerminalInputPrompt(
value: string,
options?: ConfirmedPromptOptions,
): boolean;