import type { HookInput, GuardResult } from '../../core/index.js'; /** * shell-write guard: fires PreToolUse on Bash. * * Warns when file content is written through a shell rather than with the Write * or Edit tools. Advisory only, once per session. * * Escaping in shell-inline scripts mangled a write three times in one session on * this repo, the second and third after the first was already recorded in a * scorecard — documentation alone did not fix it. `python -c` with backticks had * them substituted by bash, silently deleting every code span from a markdown * rule; a heredoc twice emitted a real newline where a literal \\n was wanted, * producing unterminated TypeScript string literals. All three exited 0 with wrong * content, so nothing failed loudly. * * Deliberately keyed on a file-write call, not on the interpreter: inline scripting * that only reads, computes or prints has one escaping layer and was used * constantly and correctly. */ export declare function shellWriteGuard(input: HookInput, cwd: string): Promise; /** Describe how a command writes file content through a shell, or null. */ export declare function describeShellWrite(command: string): string | null; //# sourceMappingURL=shell-write.d.ts.map