/** * Merge the peaks-managed Skill denylist into the existing settings object. * Preserves every other `permissions.deny` entry the user (or another tool) * has written so the install is additive, not destructive. The output is * always deterministic: the same input always yields the same output, * regardless of insertion order in the source array. * * Defensive behavior: * - `settings.permissions` is missing or non-object → install creates a * fresh `permissions: { deny: [...our entries] }` object. * - `settings.permissions.deny` is missing or non-array → install replaces * the field with a fresh array containing only our entries. * - Duplicate entries (any source) are collapsed to one via `new Set`. * * The function is pure: it does not mutate the input. Atomic write happens * at the call site (`applyHookInstall`). */ export declare function withSuperpowersSkillDenylist(settings: Record): Record; /** * Inverse of `withSuperpowersSkillDenylist`. Removes every peaks-managed * `UseSkill(...)` entry from the deny list. If the resulting deny list is * empty, the `deny` field itself is deleted; if the `permissions` object * becomes empty, the `permissions` field itself is deleted. This is the * uninstall path: every field we wrote must be removed exactly, and no * other field may be touched. * * Pure (no mutation). */ export declare function withoutSuperpowersSkillDenylist(settings: Record): Record; /** * Read-only introspection. Returns the deny entries that `peaks hooks * install` would write today. Useful for `peaks hooks status` and the * dry-run envelope. */ export declare function listSuperpowersDenyEntries(): ReadonlyArray; /** * * In addition to the static SUPERPOWERS_DENIED_SKILLS list, peaks * scans the existing settings file for "trigger phrases" that * indicate the user has configured the superpowers chain (or * any other auto-run worktree-creating tool) and appends a * defensive deny to prevent the chain from running raw * `git worktree add` (or `podman run`) directly. * * Triggers detected (substring match on the existing * permissions.deny / permissions.allow list): * * - `superpowers:using-git-worktrees` — the chain's ground zero * - `superpowers:brainstorming` etc. — the upstream skill * - `Bash(git worktree add` — the user has explicitly * allowed raw git worktree, which our L2 lease-aware gate * would also intercept (defense in depth) * * Append-only — never replaces, never re-orders, never removes * existing entries. Idempotent: re-running the install with * the same input yields the same output. */ export declare const TRIGGER_PHRASES: ReadonlyArray; export declare function withTriggeredDenyList(settings: Record): Record; /** Inverse of withTriggeredDenyList: strip every deny-trigger entry. */ export declare function withoutTriggeredDenyList(settings: Record): Record;