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:4955–4972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4953 "REMINDER\n";
4954
4955static 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
4974static int cbm_remove_owned_hook_script(const char *path, const char *expected_current,
4975 const char *const *released_scripts,

Callers 3

uninstall_claude_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected