fix(node): mirror official Grok hooks

This commit is contained in:
ZacharyZhang-NY committed 2026-07-20 05:20:44 -04:00
1 parent 3ddce86c37
commit d84580e5a7
17 files changed
+1648 -843

No files matched your search

@@ -248,15 +248,22 @@ test('high-drift providers retain their verified hook contracts', async () => {
name: 'toolName',
input: 'toolInput',
session: 'sessionId',
call_id: 'toolUseId',
output: 'toolResult',
error: 'toolResult',
});
assert.deepEqual(providers.get('grok').config_paths, [
'$GROK_HOME/hooks/*.json',
'~/.grok/hooks/*.json',
'~/.grok/hooks-paths',
'.grok/hooks/*.json',
'.claude/settings.json',
'.cursor/hooks.json',
]);
assert.deepEqual(providers.get('grok').events, {
before_tool: 'PreToolUse',
after_tool: 'PostToolUse',
after_tool_failure: 'PostToolUseFailure',
});
assert.deepEqual(providers.get('grok').blocking, {
mechanism: 'exit_code_2',