/** * The bash filter behind Plan mode: decides whether a command line looks read-only. * * It is a strict allow-list, not a deny-list. The line is split into words the way bash would * (quotes, escapes, operators), anything that can hide a second command or a write is rejected * outright (command substitution, subshells, heredocs, redirects other than to /dev/null), and * every pipeline segment must then start with a command on the list below, with the flags that let * that command write or run other programs rejected. When unsure it blocks. * * This is a guardrail against a model wandering off, not a sandbox. Build and test commands * (cargo check, pnpm run test) run project code and write caches or build output, and the * filter accepts that on purpose. */ /** * Why a command line is not allowed in Plan mode, or undefined if every part of it looks read-only. */ export declare function explainBlockedCommand(command: string): string | undefined; /** True if every pipeline/sequence segment of a command looks read-only. */ export declare function isReadOnlyCommand(command: string): boolean;