export declare const ENV_ASSIGNMENT_PATTERN: RegExp;
export declare function tokenizeCommand(command: string): string[];
export declare function splitTopLevelCommandChain(command: string): string[];
export declare function isCompoundShellCommand(command: string): boolean;
export declare function hasSequentialShellCommands(command: string): boolean;
export declare function stripLeadingEnvAssignmentsFromCommand(command: string): string | null;
/**
 * Strip trivial leading `cd <dir> && ` (or `pushd`) prefixes from a shell
 * command. Models sometimes emit `cd /path && git status` even when the
 * harness provides a cwd, which causes downstream compound-command heuristics
 * to skip compaction. Stripping the prefix lets classification and the
 * rewrite policy reason about the effective command.
 *
 * Only handles trivially safe chains — a single shell token argument, no
 * redirections, no nested pipelines. Anything fancier returns the input
 * unchanged.
 */
export declare function stripLeadingCdPrefix(command: string): string;
