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