MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_build_released_gate_script

Function cbm_build_released_gate_script

src/cli/cli.c:5777–5794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5775 "REMINDER\n";
5776
5777static int cbm_build_released_gate_script(const char *binary_path, char *script,
5778 size_t script_size) {
5779 if (!binary_path || !script || strchr(binary_path, '"')) {
5780 return CLI_ERR;
5781 }
5782 int written = snprintf(script, script_size,
5783 "#!/usr/bin/env bash\n"
5784 "# codebase-memory-mcp search augmenter (Claude Code PreToolUse).\n"
5785 "# NOTE: the legacy filename is kept for zero-migration upgrades.\n"
5786 "# Despite the name this NEVER blocks a tool call - it only adds\n"
5787 "# graph context. Any failure is silent (exit 0, no output).\n"
5788 "BIN=\"%s\"\n"
5789 "[ -x \"$BIN\" ] || exit 0\n"
5790 "\"$BIN\" hook-augment 2>/dev/null\n"
5791 "exit 0\n",
5792 binary_path);
5793 return written > 0 && (size_t)written < script_size ? CLI_OK : CLI_ERR;
5794}
5795
5796static int cbm_remove_owned_hook_script(const char *path, const char *expected_current,
5797 const char *const *released_scripts,

Callers 3

uninstall_claude_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected