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

Function pf_role

tests/test_pipeline_frozen.c:181–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 th_mkdir_p(f->source) == 0 && th_mkdir_p(f->destination) == 0 && pf_env_start(f);
180}
181static bool pf_role(const cbm_node_t *node, const char *role) {
182 if (!node->properties_json)
183 return false;
184 yyjson_doc *doc = yyjson_read(node->properties_json, strlen(node->properties_json), 0);
185 yyjson_val *root = doc ? yyjson_doc_get_root(doc) : NULL;
186 yyjson_val *field = yyjson_is_obj(root) ? yyjson_obj_get(root, "test_role") : NULL;
187 bool ok = yyjson_is_obj(root) && (role ? pf_text(yyjson_get_str(field), role) : !field);
188 yyjson_doc_free(doc);
189 return ok;
190}
191static bool pf_node(cbm_store_t *store, const char *qn, const char *name, const char *file,
192 const char *role, cbm_node_t *out) {
193 memset(out, 0, sizeof(*out));

Callers 1

pf_nodeFunction · 0.85

Calls 1

pf_textFunction · 0.85

Tested by

no test coverage detected