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

Function cbm_upsert_hermes_context_hook

src/cli/cli.c:4457–4467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4455}
4456
4457static int cbm_upsert_hermes_context_hook(const char *config_path, const char *binary_path) {
4458 static const char *const sequence_path[] = {"hooks", "pre_llm_call"};
4459 static const char identity[] = "\"" CMM_HERMES_HOOK_ID "\"";
4460 char item[CLI_BUF_8K];
4461 if (cbm_build_hermes_context_hook_item(binary_path, item, sizeof(item)) != CLI_OK) {
4462 return CBM_YAML_IDENTITY_EDIT_ERROR;
4463 }
4464 return cbm_yaml_upsert_mapping_sequence_item(config_path, sequence_path,
4465 sizeof(sequence_path) / sizeof(sequence_path[0]),
4466 "id", identity, item);
4467}
4468
4469static bool cbm_yaml_line_is_empty_key(const char *line, size_t line_len, size_t indent,
4470 const char *key) {

Callers 1

Tested by

no test coverage detected