/**
 * Bash Command Parser (Vibe-inspired)
 *
 * Parses bash commands to extract individual commands from complex
 * expressions (pipelines, chains, subshells, command substitutions).
 *
 * Uses tree-sitter-bash if available, otherwise falls back to a
 * robust regex/state-machine parser that handles common patterns.
 *
 * This is critical for security: `rm -rf / && echo safe` should
 * detect the `rm -rf /` component, not just see "echo safe".
 */
export interface ParsedCommand {
    /** The base command name (e.g., 'rm', 'git', 'npm') */
    command: string;
    /** Full argument list */
    args: string[];
    /** The raw text of this command segment */
    raw: string;
    /** How this command connects to the next: |, &&, ||, ;, or null */
    connector: string | null;
    /** Whether this is inside a subshell or command substitution */
    isSubshell: boolean;
}
export interface ParseResult {
    commands: ParsedCommand[];
    /** Whether tree-sitter was used (false = fallback parser) */
    usedTreeSitter: boolean;
    /** Any parsing warnings */
    warnings: string[];
}
/**
 * Parse a bash command string into individual commands.
 * Uses tree-sitter if available, falls back to state-machine parser.
 */
export declare function parseBashCommand(input: string): ParseResult;
/**
 * Extract just the command names from a bash string (convenience).
 */
export declare function extractCommandNames(input: string): string[];
/**
 * Check if a bash command string contains any of the given commands.
 */
export declare function containsCommand(input: string, commands: string[]): boolean;
/**
 * Check if a bash command string contains dangerous commands.
 */
export declare function containsDangerousCommand(input: string): {
    dangerous: boolean;
    commands: string[];
};
