/** * `claude-settings-retirements.ts` — the `hooks.PreToolUse` entries this template * used to declare and has since RETIRED, plus the shape predicate the retirement * is tested against. * * WHY A RETIREMENT IS NOT A DELETION. `mergeTemplateOwnedHooks` (in * `claude-settings-template-merge.ts`) carries across every on-disk entry the * template does not declare — that is the whole point of the entry-level * ownership rule, and it is what keeps `installAutoCompactHook`'s `Bash|Task` * entry alive across an init. So simply STOPPING the emission reaches nobody: an * install written by an earlier release keeps the entry forever. Declaring less * cannot retire an entry; something has to say "this one is gone", and * `isRetiredTemplateEntry` is that something. `templateContentMatches` calls it * too, because a file still carrying a retired entry has to compare as DRIFTED or * the merge that would drop it never runs. * * Extracted from `claude-settings-template-merge.ts` when the second retirement * pushed that module past the 300-line cap. The bodies moved verbatim; the * predicate and its two shape types came along because the predicate is their * only reader inside that module. * * TWO RETIREMENTS SO FAR: * - TEMPLATE_VERSION 1.8.0 — the `Write|Edit|MultiEdit` gate handler; * - TEMPLATE_VERSION 1.10.0 — the two layer-B feedback hooks. * They share neither a matcher nor a command form, so each gets its own narrow * predicate rather than one looser rule. The narrowness is load-bearing: a * predicate that dropped "anything on this matcher" would delete a USER's hook, * which is the failure the ownership rule exists to prevent. */ /** One handler in a `hooks.PreToolUse` entry, in the shape this template declares. */ export type TemplateHookCommand = { type: string; command: string; shell?: string; }; /** * One `hooks.PreToolUse` entry in the shape this template declares. The * `matcher` + `hooks` pair is the entry's identity everywhere in this concern: * `matcher` alone is not unique (two `Bash` entries), and whole-object identity * would make a hand-edited entry unrecognizable and therefore unrepairable. */ export type TemplatePreToolUseEntry = { matcher: string; hooks: TemplateHookCommand[]; }; export declare function isPreToolUseEntry(value: unknown): value is TemplatePreToolUseEntry; /** * Is `entry` one this template used to declare and has since RETIRED? * * Each retirement gets its own narrow predicate — the shapes share neither a * matcher nor a command form. An entry whose shape matches nothing here is not * retired, and is preserved. */ export declare function isRetiredTemplateEntry(entry: unknown): boolean;