import { resolveExecutable } from "./executable.js"; export interface AdminShellOptions { platform?: NodeJS.Platform; env?: NodeJS.ProcessEnv; resolve?: typeof resolveExecutable; } export interface AdminShellInvocation { command: string; args: string[]; } /** * Windows 管理员命令统一用 PowerShell 执行:优先 PowerShell 7(pwsh), * 未安装时回退到系统自带的 Windows PowerShell 5.1。 */ export declare function resolveWindowsAdminShell(options?: AdminShellOptions): string; export declare function buildWindowsAdminShellInvocation(script: string, options?: AdminShellOptions): AdminShellInvocation; /** * Windows PowerShell 的 cmdlet 和 alias(如 Get-Process、ls)不是 PATH 中的独立文件, * 因此 Windows 上不能沿用 Unix 的可执行文件预检查。 */ export declare function shouldHandleAdminShellCommand(text: string, isAdmin: boolean, options?: { platform?: NodeJS.Platform; commandExists?: (command: string) => boolean; }): boolean;