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

Source from the content-addressed store, hash-verified

5015 "REMINDER\n";
5016
5017static int cbm_build_released_gate_script(const char *binary_path, char *script,
5018 size_t script_size) {
5019 if (!binary_path || !script || strchr(binary_path, '"')) {
5020 return CLI_ERR;
5021 }
5022 int written = snprintf(script, script_size,
5023 "#!/usr/bin/env bash\n"
5024 "# codebase-memory-mcp search augmenter (Claude Code PreToolUse).\n"
5025 "# NOTE: the legacy filename is kept for zero-migration upgrades.\n"
5026 "# Despite the name this NEVER blocks a tool call - it only adds\n"
5027 "# graph context. Any failure is silent (exit 0, no output).\n"
5028 "BIN=\"%s\"\n"
5029 "[ -x \"$BIN\" ] || exit 0\n"
5030 "\"$BIN\" hook-augment 2>/dev/null\n"
5031 "exit 0\n",
5032 binary_path);
5033 return written > 0 && (size_t)written < script_size ? CLI_OK : CLI_ERR;
5034}
5035
5036static int cbm_remove_owned_hook_script(const char *path, const char *expected_current,
5037 const char *const *released_scripts,

Callers 3

uninstall_claude_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected