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

Function install_qoder_durable_context

src/cli/cli.c:9251–9292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9249}
9250
9251static void install_qoder_durable_context(const char *home, const char *binary_path,
9252 const char *settings_path, bool config_resolved,
9253 bool force, bool dry_run) {
9254 char skills_dir[CLI_BUF_1K];
9255 char agent_path[CLI_BUF_1K];
9256 snprintf(skills_dir, sizeof(skills_dir), "%s/.qoder/skills", home);
9257 snprintf(agent_path, sizeof(agent_path), "%s/.qoder/agents/codebase-memory.md", home);
9258 install_agent_skill("Qoder CLI", skills_dir, force, dry_run);
9259 install_tiered_agent_profiles(
9260 (cbm_tiered_profile_set_t){
9261 .label = "Qoder CLI",
9262 .verify_path = agent_path,
9263 .binary_path = binary_path,
9264 .legacy_verify_content = legacy_qoder_verify_agent_content,
9265 .dialect = CBM_GRAPH_DIALECT_QODER,
9266 },
9267 dry_run);
9268 bool hook_supported = cbm_optional_hook_supported("qoder", cbm_current_platform_is_windows());
9269 if (g_install_plan) {
9270 if (hook_supported) {
9271 plan_record("Qoder CLI", "hook", settings_path);
9272 }
9273 return;
9274 }
9275 if (!hook_supported) {
9276 printf(" hooks: withheld because no documented executor is available\n");
9277 return;
9278 }
9279 if (!config_resolved) {
9280 printf(" hook: skipped because the settings path was unresolved\n");
9281 return;
9282 }
9283 bool installed = true;
9284 if (!dry_run && (!prepare_config_parent(settings_path) ||
9285 cbm_upsert_qoder_context_hook(settings_path, binary_path) != CLI_OK)) {
9286 installed = false;
9287 record_agent_config_error(false, "Qoder CLI", "context_hook_install", settings_path);
9288 }
9289 if (installed) {
9290 printf(" hooks: %s (SessionStart + SubagentStart + PostToolUse Read)\n", settings_path);
9291 }
9292}
9293
9294static bool cbm_gitlab_hooks_path(const cbm_agent_registry_context_t *registry, char *path,
9295 size_t path_size) {

Callers 1

Calls 8

install_agent_skillFunction · 0.85
plan_recordFunction · 0.85
prepare_config_parentFunction · 0.85

Tested by

no test coverage detected