Hermes pre_llm_call shell hooks inject context through one top-level key. */
| 719 | |
| 720 | /* Hermes pre_llm_call shell hooks inject context through one top-level key. */ |
| 721 | static 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. */ |
no outgoing calls
no test coverage detected