| 9029 | } |
| 9030 | |
| 9031 | static void install_qoder_durable_context(const char *home, const char *binary_path, |
| 9032 | const char *settings_path, bool config_resolved, |
| 9033 | bool force, bool dry_run) { |
| 9034 | char skills_dir[CLI_BUF_1K]; |
| 9035 | char agent_path[CLI_BUF_1K]; |
| 9036 | snprintf(skills_dir, sizeof(skills_dir), "%s/.qoder/skills", home); |
| 9037 | snprintf(agent_path, sizeof(agent_path), "%s/.qoder/agents/codebase-memory.md", home); |
| 9038 | install_agent_skill("Qoder CLI", skills_dir, force, dry_run); |
| 9039 | install_tiered_agent_profiles( |
| 9040 | (cbm_tiered_profile_set_t){ |
| 9041 | .label = "Qoder CLI", |
| 9042 | .verify_path = agent_path, |
| 9043 | .binary_path = binary_path, |
| 9044 | .legacy_verify_content = legacy_qoder_verify_agent_content, |
| 9045 | .dialect = CBM_GRAPH_DIALECT_QODER, |
| 9046 | }, |
| 9047 | dry_run); |
| 9048 | bool hook_supported = cbm_optional_hook_supported("qoder", cbm_current_platform_is_windows()); |
| 9049 | if (g_install_plan) { |
| 9050 | if (hook_supported) { |
| 9051 | plan_record("Qoder CLI", "hook", settings_path); |
| 9052 | } |
| 9053 | return; |
| 9054 | } |
| 9055 | if (!hook_supported) { |
| 9056 | printf(" hooks: withheld because no documented executor is available\n"); |
| 9057 | return; |
| 9058 | } |
| 9059 | if (!config_resolved) { |
| 9060 | printf(" hook: skipped because the settings path was unresolved\n"); |
| 9061 | return; |
| 9062 | } |
| 9063 | bool installed = true; |
| 9064 | if (!dry_run && (!prepare_config_parent(settings_path) || |
| 9065 | cbm_upsert_qoder_context_hook(settings_path, binary_path) != CLI_OK)) { |
| 9066 | installed = false; |
| 9067 | record_agent_config_error(false, "Qoder CLI", "context_hook_install", settings_path); |
| 9068 | } |
| 9069 | if (installed) { |
| 9070 | printf(" hooks: %s (SessionStart + SubagentStart + PostToolUse Read)\n", settings_path); |
| 9071 | } |
| 9072 | } |
| 9073 | |
| 9074 | static bool cbm_gitlab_hooks_path(const cbm_agent_registry_context_t *registry, char *path, |
| 9075 | size_t path_size) { |
no test coverage detected