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

Function cbm_upsert_copilot_hooks

src/cli/cli.c:3768–3777  ·  view source on GitHub ↗

Copilot loads every manifest in $COPILOT_HOME/hooks. Treat our dedicated * filename as an exact-owned document: a foreign collision fails closed, and * uninstall accepts only the complete generated lifecycle schema. */

Source from the content-addressed store, hash-verified

3766 * filename as an exact-owned document: a foreign collision fails closed, and
3767 * uninstall accepts only the complete generated lifecycle schema. */
3768static int cbm_upsert_copilot_hooks(const char *binary_path, const char *manifest_path) {
3769 char *manifest = cbm_build_copilot_hook_manifest(binary_path);
3770 if (!manifest || !manifest_path) {
3771 free(manifest);
3772 return CLI_ERR;
3773 }
3774 int rc = cbm_text_ensure_owned_document(manifest_path, manifest);
3775 free(manifest);
3776 return rc == 0 ? CLI_OK : CLI_ERR;
3777}
3778
3779static int cbm_remove_copilot_hooks(const char *manifest_path, const char *binary_path) {
3780 char *manifest = cbm_build_copilot_hook_manifest(binary_path);

Callers 1

Tested by

no test coverage detected