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

Function append_opencode_profile

src/cli/agent_profiles.c:504–516  ·  view source on GitHub ↗

before_tool_search reproduces the v0.10.8 rendering: #1933 (v0.11.0) added * the tool_search / tool_search_regex permissions, and install/uninstall * must still recognise the older bytes as ours (#2264). */

Source from the content-addressed store, hash-verified

502 * the tool_search / tool_search_regex permissions, and install/uninstall
503 * must still recognise the older bytes as ours (#2264). */
504static bool append_opencode_profile(profile_buffer_t *buffer, cbm_graph_tier_t tier,
505 cbm_graph_access_t access, const char *prompt,
506 bool before_tool_search) {
507 return profile_buffer_append(buffer, "---\ndescription: ") &&
508 profile_buffer_append(buffer, profile_description(tier, access)) &&
509 profile_buffer_append(buffer, "\nmode: subagent\npermission:\n \"*\": deny\n read: "
510 "allow\n grep: allow\n glob: allow\n") &&
511 (before_tool_search ||
512 profile_buffer_append(buffer, " tool_search: allow\n tool_search_regex: allow\n")) &&
513 (access != CBM_GRAPH_ACCESS_DIRECT ||
514 append_permission_mcp_tools(buffer, CBM_GRAPH_DIALECT_OPENCODE, tier)) &&
515 profile_buffer_append(buffer, "---\n") && profile_buffer_append(buffer, prompt);
516}
517
518static bool render_profile_text(profile_buffer_t *buffer, cbm_graph_profile_dialect_t dialect,
519 cbm_graph_tier_t tier, cbm_graph_access_t access,

Callers 2

render_profile_textFunction · 0.85
render_released_profileFunction · 0.85

Calls 3

profile_buffer_appendFunction · 0.85
profile_descriptionFunction · 0.85

Tested by

no test coverage detected