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

Function ha_build_hermes_json

src/cli/hook_augment.c:721–732  ·  view source on GitHub ↗

Hermes pre_llm_call shell hooks inject context through one top-level key. */

Source from the content-addressed store, hash-verified

719
720/* Hermes pre_llm_call shell hooks inject context through one top-level key. */
721static char *ha_build_hermes_json(const char *text) {
722 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
723 if (!doc) {
724 return NULL;
725 }
726 yyjson_mut_val *root = yyjson_mut_obj(doc);
727 yyjson_mut_doc_set_root(doc, root);
728 yyjson_mut_obj_add_str(doc, root, "context", text);
729 char *json = yyjson_mut_write(doc, 0, NULL);
730 yyjson_mut_doc_free(doc);
731 return json;
732}
733
734/* Cline executable hooks require a non-blocking control envelope even when
735 * they only add context. Keep cancel=false explicit and never emit an error. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected