| 4953 | "REMINDER\n"; |
| 4954 | |
| 4955 | static int cbm_build_released_gate_script(const char *binary_path, char *script, |
| 4956 | size_t script_size) { |
| 4957 | if (!binary_path || !script || strchr(binary_path, '"')) { |
| 4958 | return CLI_ERR; |
| 4959 | } |
| 4960 | int written = snprintf(script, script_size, |
| 4961 | "#!/usr/bin/env bash\n" |
| 4962 | "# codebase-memory-mcp search augmenter (Claude Code PreToolUse).\n" |
| 4963 | "# NOTE: the legacy filename is kept for zero-migration upgrades.\n" |
| 4964 | "# Despite the name this NEVER blocks a tool call - it only adds\n" |
| 4965 | "# graph context. Any failure is silent (exit 0, no output).\n" |
| 4966 | "BIN=\"%s\"\n" |
| 4967 | "[ -x \"$BIN\" ] || exit 0\n" |
| 4968 | "\"$BIN\" hook-augment 2>/dev/null\n" |
| 4969 | "exit 0\n", |
| 4970 | binary_path); |
| 4971 | return written > 0 && (size_t)written < script_size ? CLI_OK : CLI_ERR; |
| 4972 | } |
| 4973 | |
| 4974 | static int cbm_remove_owned_hook_script(const char *path, const char *expected_current, |
| 4975 | const char *const *released_scripts, |
no outgoing calls
no test coverage detected