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

Function cbm_render_graph_profile

src/cli/agent_profiles.c:695–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695char *cbm_render_graph_profile(cbm_graph_profile_dialect_t dialect, cbm_graph_tier_t tier,
696 cbm_graph_access_t access, const char *binary_path) {
697 if (!dialect_valid(dialect) || !tier_valid(tier) || !access_valid(access) ||
698 (access == CBM_GRAPH_ACCESS_DIRECT && !cbm_graph_dialect_direct_capable(dialect))) {
699 return NULL;
700 }
701 char *prompt = cbm_render_graph_prompt(tier, access);
702 if (!prompt) {
703 return NULL;
704 }
705 if (dialect == CBM_GRAPH_DIALECT_KIRO) {
706 char *result = render_kiro_profile(tier, access, binary_path, prompt);
707 free(prompt);
708 return result;
709 }
710 profile_buffer_t buffer;
711 profile_buffer_init(&buffer);
712 bool ok = render_profile_text(&buffer, dialect, tier, access, binary_path, prompt);
713 free(prompt);
714 if (!ok) {
715 profile_buffer_discard(&buffer);
716 return NULL;
717 }
718 return profile_buffer_finish(&buffer);
719}
720
721/* A released-but-superseded rendering, kept only so install/uninstall can
722 * recognise and migrate files an older release wrote. */

Calls 10

dialect_validFunction · 0.85
tier_validFunction · 0.85
access_validFunction · 0.85
cbm_render_graph_promptFunction · 0.85
render_kiro_profileFunction · 0.85
profile_buffer_initFunction · 0.85
render_profile_textFunction · 0.85
profile_buffer_discardFunction · 0.85
profile_buffer_finishFunction · 0.85

Tested by 1