fix: add async/timeout to hooks schema and validate in CI

- hooks.schema.json: add async (boolean) and timeout (number) properties
  to hookItem definition, matching fields used in hooks.json
- validate-hooks.js: validate async and timeout types when present
- hooks.test.js: add SessionEnd to required event types check
This commit is contained in:
Affaan Mustafa
2026-02-12 15:58:59 -08:00
parent 639c9aaca3
commit 40a4fafa7f
3 changed files with 20 additions and 0 deletions

View File

@@ -278,6 +278,7 @@ async function runTests() {
assert.ok(hooks.hooks.PreToolUse, 'Should have PreToolUse hooks');
assert.ok(hooks.hooks.PostToolUse, 'Should have PostToolUse hooks');
assert.ok(hooks.hooks.SessionStart, 'Should have SessionStart hooks');
assert.ok(hooks.hooks.SessionEnd, 'Should have SessionEnd hooks');
assert.ok(hooks.hooks.Stop, 'Should have Stop hooks');
assert.ok(hooks.hooks.PreCompact, 'Should have PreCompact hooks');
})) passed++; else failed++;