| 2016 | } |
| 2017 | |
| 2018 | int cbm_upsert_claude_hooks(const char *settings_path) { |
| 2019 | char command[CLI_BUF_1K]; |
| 2020 | cbm_resolve_hook_command(CMM_HOOK_GATE_SCRIPT, command, sizeof(command)); |
| 2021 | return upsert_hooks_json((hooks_upsert_args_t){ |
| 2022 | .settings_path = settings_path, |
| 2023 | .hook_event = "PreToolUse", |
| 2024 | .matcher_str = CMM_HOOK_MATCHER, |
| 2025 | .command_str = command, |
| 2026 | .old_matchers = cmm_claude_old_matchers, |
| 2027 | .timeout_sec = CMM_HOOK_TIMEOUT_SEC, |
| 2028 | }); |
| 2029 | } |
| 2030 | |
| 2031 | int cbm_remove_claude_hooks(const char *settings_path) { |
| 2032 | return remove_hooks_json((hooks_remove_args_t){ |
no test coverage detected