/** * Bash command blocklist for filesystem-wide scans. * * Blocks recursive scans originating from the filesystem root `/` or other * system directories (e.g. `/etc`, `/home`, `/usr`, `/var`) because they can * take a very long time and are almost never the intended action inside a * workspace-scoped bash tool. Scoped scans (e.g. `find .`, `grep -r src/`, * `ls -R src/`) remain allowed. * * This is intentionally a regex-based heuristic, not a full shell parser. It * targets the common scan shapes; exotic obfuscation is out of scope. */ /** Result of a blocklist check. */ export interface BashBlocklistResult { /** Whether the command should be blocked. */ blocked: boolean; /** Human-readable reason (empty when not blocked). */ reason: string; } /** * Default, reusable explanation returned to the LLM when a command is blocked. * Phrased to steer the model toward a scoped alternative. */ export declare const BASH_BLOCKLIST_REASON: string; /** * Check a bash command against the filesystem-scan blocklist. * * @param command The raw command string passed to the bash tool (after any * command prefix has been applied). * @returns `{ blocked: true, reason }` when the command matches a blocked * pattern, otherwise `{ blocked: false, reason: "" }`. * * @example * checkBashBlocklist("find /") // { blocked: true, ... } * checkBashBlocklist("find / -name foo") // { blocked: true, ... } * checkBashBlocklist("find .") // { blocked: false, reason: "" } * checkBashBlocklist("grep -r /") // { blocked: true, ... } * checkBashBlocklist("grep -r src/") // { blocked: false, reason: "" } * checkBashBlocklist("cat /etc/hosts") // { blocked: false, reason: "" } */ export declare function checkBashBlocklist(command: string): BashBlocklistResult; //# sourceMappingURL=bash-blocklist.d.ts.map