/** * Plan-mode command blacklist for run_commands. * * Plan mode keeps run_commands available for read-only investigation, but * models (especially weaker ones) use it to edit files anyway. When the plan * preset sets `blockFileEditingCommands`, createShellTool checks each command * against this blacklist before executing and returns a tool error instead of * running anything that looks like a file modification. * * This is a simple blacklist, not a shell interpreter. Commands are lightly * preprocessed (quoted text, heredoc bodies, escapes, and comments are masked * so they cannot false-positive), split on shell separators, and the leading * command word of each part is compared against the lists below; output * redirection to files is also rejected. It will not catch every possible * mutation (e.g. `python -c "open(..., 'w')"` or commands hidden inside a * quoted `bash -c` string) — it exists to stop the common ways models edit * files from the shell, and entries are easy to add. */ import type { StructuredCommandInput } from "./schemas"; /** * Inspect a run_commands entry and return a short description of the first * file-modifying construct found, or undefined when the command looks * read-only. */ export declare function findFileEditingCommand(command: string | StructuredCommandInput): string | undefined; /** * Tool error returned in place of executing a blocked command in plan mode. */ export declare function formatPlanModeBlockedCommandError(reason: string): string;