* test(#3662): failing-first suite for runtime-resolving hook runners * fix(#3662): resolve managed hook node runners at hook-fire time * fix(#3662): close review findings and document the resolver * fix(#3662): close adversarial and security review findings * chore(#3662): backfill changeset pr number * test(#3662): honor win32 skip return and platform-aware sh runner pin * test(#3662): pin the bare win32-claude sh-hook shape omitting the bash runner --------- Co-authored-by: sim <sim@local>
51 lines
1.7 KiB
JavaScript
51 lines
1.7 KiB
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Authoritative list of GSD-managed hook files.
|
|
*
|
|
* Extracted from the worker script into a shared CJS module so that:
|
|
* 1. gsd-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 GSD ships into ~/.claude/hooks/ (or equivalent) and
|
|
* checks for staleness after an update. Orphaned files from removed features
|
|
* (e.g., gsd-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 = [
|
|
'gsd-agent-isolation-guard.js',
|
|
'gsd-check-update-worker.js',
|
|
'gsd-check-update.js',
|
|
'gsd-config-reload.js',
|
|
'gsd-context-monitor.js',
|
|
'gsd-cursor-post-tool.js',
|
|
'gsd-cursor-pre-tool.js',
|
|
'gsd-cursor-session-start.js',
|
|
'gsd-cursor-stop.js',
|
|
'gsd-cursor-subagent-start.js',
|
|
'gsd-cursor-subagent-stop.js',
|
|
'gsd-ensure-canonical-path.js',
|
|
'gsd-graphify-update.sh',
|
|
// #3662: portable node resolver (helper staged in hooks/; managed JS hook
|
|
// commands route through it under --portable-hooks).
|
|
'gsd-node-runner.sh',
|
|
'gsd-phase-boundary.sh',
|
|
'gsd-prompt-guard.js',
|
|
'gsd-read-guard.js',
|
|
'gsd-read-injection-scanner.js',
|
|
'gsd-session-state.sh',
|
|
'gsd-statusline.js',
|
|
'gsd-update-banner.js',
|
|
'gsd-validate-commit.sh',
|
|
'gsd-windsurf-pre-command.js',
|
|
'gsd-windsurf-pre-write.js',
|
|
'gsd-workflow-guard.js',
|
|
'gsd-worktree-path-guard.js',
|
|
'gsd-write-guard.js',
|
|
];
|
|
|
|
module.exports = { MANAGED_HOOKS };
|