SLOPSHOPPER

fnhook-fixture-no-escape-hatch

Deny-capable module that permits no escape-hatch tool

new
A shopper browsing a rack in a slop shop
Source 1 files
hooks/register.ts 14 lines
1import type { Register } from "claude-code";
2
3const READ_ONLY_TOOLS = new Set(["Read", "Grep"]);
4
5export const register: Register = (on) => {
6  on("classic.PreToolUse", async (_$, e, next) => {
7    const result = await next(e);
8    if (READ_ONLY_TOOLS.has(e.tool)) {
9      return result;
10    }
11    return { deny: "fixture denies everything else" };
12  });
13};
14