/**
 * Shell Prefix Handler - Direct Shell Execution (Gemini CLI inspired)
 *
 * Allows users to execute shell commands directly by prefixing with `!`
 * Example: !git status, !npm test, !ls -la
 *
 * This bypasses the AI and executes the command immediately.
 */
/**
 * Result of a shell command execution.
 */
export interface ShellResult {
    /** Whether the command succeeded (exit code 0). */
    success: boolean;
    /** Standard output content. */
    stdout: string;
    /** Standard error content. */
    stderr: string;
    /** Command exit code. */
    exitCode: number;
    /** Execution duration in milliseconds. */
    duration: number;
}
/**
 * Checks if input is a shell command (starts with !).
 *
 * @param input - The user input string.
 * @returns True if it's a shell command.
 */
export declare function isShellCommand(input: string): boolean;
/**
 * Extracts the command string from shell prefix input.
 * Removes the '!' prefix and trims whitespace.
 *
 * @param input - The user input (e.g., "!ls").
 * @returns The command to execute (e.g., "ls").
 */
export declare function extractCommand(input: string): string;
/**
 * Executes a shell command directly.
 * Captures stdout and stderr.
 *
 * @param command - The shell command to execute.
 * @param cwd - Working directory (defaults to process.cwd()).
 * @param timeout - Timeout in milliseconds (default: 30000).
 * @returns Promise resolving to ShellResult.
 */
export declare function executeShellCommand(command: string, cwd?: string, timeout?: number): Promise<ShellResult>;
/**
 * Executes an interactive shell command (for commands like vim, top, etc.).
 * Spawns a child process inheriting stdio.
 *
 * @param command - The command to execute.
 * @param cwd - Working directory.
 * @returns Promise resolving to exit code.
 */
export declare function executeInteractiveCommand(command: string, cwd?: string): Promise<number>;
/**
 * Formats shell execution result for display.
 * Includes command, output, error, exit code, and duration.
 *
 * @param command - The executed command.
 * @param result - The execution result.
 * @returns Formatted string.
 */
export declare function formatShellResult(command: string, result: ShellResult): string;
/**
 * Checks if a command is interactive (needs PTY/inherit stdio).
 * Includes common interactive tools like editors, pagers, etc.
 *
 * @param command - The command to check.
 * @returns True if the command is known to be interactive.
 */
export declare function isInteractiveCommand(command: string): boolean;
