'use strict'; /** * Authoritative list of MSD-managed hook files. * * Extracted from the worker script into a shared CJS module so that: * 1. msd-check-update-worker.js can require() it directly (no source-level * duplication). * 2. Tests can assert against the exported array instead of regex-parsing * the worker source (retiring the pending-migration-to-typed-ir token * on managed-hooks.test.cjs and orphaned-hooks.test.cjs, per #455). * * These are the files MSD ships into ~/.claude/hooks/ (or equivalent) and * checks for staleness after an update. Orphaned files from removed features * (e.g., msd-intel-*.js) must NOT be listed here — that would cause permanent * stale warnings for users who haven't cleaned up manually (#1750). */ const MANAGED_HOOKS = [ 'msd-agent-isolation-guard.js', 'msd-check-update-worker.js', 'msd-check-update.js', 'msd-config-reload.js', 'msd-context-monitor.js', 'msd-cursor-post-tool.js', 'msd-cursor-pre-tool.js', 'msd-cursor-session-start.js', 'msd-cursor-stop.js', 'msd-cursor-subagent-start.js', 'msd-cursor-subagent-stop.js', 'msd-ensure-canonical-path.js', 'msd-graphify-update.sh', // #3662: portable node resolver (helper staged in hooks/; managed JS hook // commands route through it under --portable-hooks). 'msd-node-runner.sh', 'msd-phase-boundary.sh', 'msd-prompt-guard.js', 'msd-read-guard.js', 'msd-read-injection-scanner.js', 'msd-secret-read-guard.js', 'msd-session-state.sh', 'msd-statusline.js', 'msd-update-banner.js', 'msd-validate-commit.sh', 'msd-workflow-guard.js', 'msd-worktree-path-guard.js', 'msd-write-guard.js', ]; module.exports = { MANAGED_HOOKS };