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

Function cmm_hook_outer_is_canonical

src/cli/cli.c:4682–4691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4680}
4681
4682static bool cmm_hook_outer_is_canonical(yyjson_mut_val *entry, bool has_matcher) {
4683 if (!entry || !yyjson_mut_is_obj(entry) ||
4684 yyjson_mut_obj_size(entry) != (has_matcher ? 2U : 1U)) {
4685 return false;
4686 }
4687 yyjson_mut_val *hooks = yyjson_mut_obj_get(entry, "hooks");
4688 yyjson_mut_val *matcher = yyjson_mut_obj_get(entry, "matcher");
4689 return hooks && yyjson_mut_is_arr(hooks) &&
4690 (!has_matcher || (matcher && yyjson_mut_is_str(matcher)));
4691}
4692
4693static size_t remove_all_owned_hooks_from_event(yyjson_mut_val *event_arr, const char *matcher_str,
4694 const char *const *old_matchers,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected