/** * Irreducible deny-floor for catastrophic, irreversible commands. * * Phase 3 simplification (claude-code-hooks 0.5.0): all other policy * matching moved server-side. The dispatcher posts a context blob to * /api/v1/hooks/injections and emits whatever reminders come back. * (/api/v1/hooks/policy-reminder is served but no dispatcher builds that URL.) * * This file is the ONE place the dispatcher still does local pattern * matching. The patterns here cover four categories of "your machine is * bricked, no recovery without reinstall" commands: * * 1. rm -rf / | ~ | $HOME — wipe root or home directory * 2. dd of=/dev/ — direct overwrite of a system disk * 3. mkfs — format a system disk * * The first three rules collapse into three regex entries. Each is * deliberately tight: `dd` against a partition (`/dev/sda1`) or a regular * file passes; only whole-disk targets (`/dev/sda`, `/dev/nvme0n1`) * trigger the deny. Same for `mkfs`. False-positive cost: the user uses * the bypass envelope (`MNEMONIK_BYPASS_HOOKS=1` + type + detail) once. * False-negative cost: the user's machine. * * Project-policy denies (forbiddenCommand) are NOT in this list. Those * are evaluated server-side and surface as advisory reminders by default, * configurable to enforce in lib/behavior.ts FORBIDDEN_GATE — but that * mode is honored by the SERVER's reminder builder, not here. The local * floor is project-independent. */ export declare const IRREDUCIBLE_DENY: ReadonlyArray<{ name: string; pattern: RegExp; }>; /** * Returns the irreducible-deny pattern name when `command` matches one of * the catastrophic patterns, or null when it doesn't. Run on the raw * command string (not tokens) so dd-of= and mkfs flags survive. */ export declare function matchIrreducibleDeny(command: string): string | null;