From 0b5a2de6bc42974dcea9921abbca008481addf4f Mon Sep 17 00:00:00 2001 From: Tommaso Casaburi Date: Sat, 27 Jun 2026 13:53:09 +0700 Subject: [PATCH] Fix Codex hooks config schema --- .codex/hooks.json | 69 ++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/.codex/hooks.json b/.codex/hooks.json index 45e8d465..c50ea419 100644 --- a/.codex/hooks.json +++ b/.codex/hooks.json @@ -1,36 +1,51 @@ { - "version": 1, "hooks": { - "afterFileEdit": [ + "PostToolUse": [ { - "command": ".codex/hooks/format.sh", - "timeout": 10 - }, - { - "command": ".codex/hooks/yarn-install.sh", - "timeout": 120 - }, - { - "command": ".codex/hooks/react-pattern-review.sh", - "timeout": 10 + "matcher": "Edit|Write|apply_patch", + "hooks": [ + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/format.sh\"", + "timeout": 10 + }, + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/yarn-install.sh\"", + "timeout": 120 + }, + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/react-pattern-review.sh\"", + "timeout": 10 + } + ] } ], - "stop": [ + "Stop": [ { - "command": ".codex/hooks/sync-git-branches.sh", - "timeout": 60 - }, - { - "command": ".codex/hooks/react-pattern-review.sh", - "timeout": 10 - }, - { - "command": ".codex/hooks/code-quality-review-reminder.sh", - "timeout": 10 - }, - { - "command": ".codex/hooks/verify.sh", - "timeout": 60 + "hooks": [ + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/sync-git-branches.sh\"", + "timeout": 60 + }, + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/react-pattern-review.sh\"", + "timeout": 10 + }, + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/code-quality-review-reminder.sh\"", + "timeout": 10 + }, + { + "type": "command", + "command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/verify.sh\"", + "timeout": 60 + } + ] } ] }