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

Function render_released_profile

src/cli/agent_profiles.c:723–743  ·  view source on GitHub ↗

A released-but-superseded rendering, kept only so install/uninstall can * recognise and migrate files an older release wrote. */

Source from the content-addressed store, hash-verified

721/* A released-but-superseded rendering, kept only so install/uninstall can
722 * recognise and migrate files an older release wrote. */
723static char *render_released_profile(cbm_graph_profile_dialect_t dialect, cbm_graph_tier_t tier,
724 cbm_graph_access_t access) {
725 if (!tier_valid(tier) || !access_valid(access)) {
726 return NULL;
727 }
728 char *prompt = cbm_render_graph_prompt(tier, access);
729 if (!prompt) {
730 return NULL;
731 }
732 profile_buffer_t buffer;
733 profile_buffer_init(&buffer);
734 bool ok = dialect == CBM_GRAPH_DIALECT_OPENCODE
735 ? append_opencode_profile(&buffer, tier, access, prompt, true)
736 : append_codex_profile(&buffer, tier, access, NULL, prompt, true);
737 free(prompt);
738 if (!ok) {
739 profile_buffer_discard(&buffer);
740 return NULL;
741 }
742 return profile_buffer_finish(&buffer);
743}
744
745char *cbm_render_graph_profile_opencode_v0108(cbm_graph_tier_t tier, cbm_graph_access_t access) {
746 return render_released_profile(CBM_GRAPH_DIALECT_OPENCODE, tier, access);

Calls 8

tier_validFunction · 0.85
access_validFunction · 0.85
cbm_render_graph_promptFunction · 0.85
profile_buffer_initFunction · 0.85
append_opencode_profileFunction · 0.85
append_codex_profileFunction · 0.85
profile_buffer_discardFunction · 0.85
profile_buffer_finishFunction · 0.85

Tested by

no test coverage detected