| 7796 | } |
| 7797 | |
| 7798 | static void install_qoder_durable_context(const char *home, const char *binary_path, |
| 7799 | const char *settings_path, bool config_resolved, |
| 7800 | bool force, bool dry_run) { |
| 7801 | char skills_dir[CLI_BUF_1K]; |
| 7802 | char agent_path[CLI_BUF_1K]; |
| 7803 | snprintf(skills_dir, sizeof(skills_dir), "%s/.qoder/skills", home); |
| 7804 | snprintf(agent_path, sizeof(agent_path), "%s/.qoder/agents/codebase-memory.md", home); |
| 7805 | install_agent_skill("Qoder CLI", skills_dir, force, dry_run); |
| 7806 | install_tiered_agent_profiles( |
| 7807 | (cbm_tiered_profile_set_t){ |
| 7808 | .label = "Qoder CLI", |
| 7809 | .verify_path = agent_path, |
| 7810 | .binary_path = binary_path, |
| 7811 | .legacy_verify_content = legacy_qoder_verify_agent_content, |
| 7812 | .dialect = CBM_GRAPH_DIALECT_QODER, |
| 7813 | }, |
| 7814 | dry_run); |
| 7815 | bool hook_supported = cbm_optional_hook_supported("qoder", cbm_current_platform_is_windows()); |
| 7816 | if (g_install_plan) { |
| 7817 | if (hook_supported) { |
| 7818 | plan_record("Qoder CLI", "hook", settings_path); |
| 7819 | } |
| 7820 | return; |
| 7821 | } |
| 7822 | if (!hook_supported) { |
| 7823 | printf(" hooks: withheld because no documented executor is available\n"); |
| 7824 | return; |
| 7825 | } |
| 7826 | if (!config_resolved) { |
| 7827 | printf(" hook: skipped because the settings path was unresolved\n"); |
| 7828 | return; |
| 7829 | } |
| 7830 | bool installed = true; |
| 7831 | if (!dry_run && (!prepare_config_parent(settings_path) || |
| 7832 | cbm_upsert_qoder_context_hook(settings_path, binary_path) != CLI_OK)) { |
| 7833 | installed = false; |
| 7834 | record_agent_config_error(false, "Qoder CLI", "context_hook_install", settings_path); |
| 7835 | } |
| 7836 | if (installed) { |
| 7837 | printf(" hooks: %s (SessionStart + SubagentStart + PostToolUse Read)\n", settings_path); |
| 7838 | } |
| 7839 | } |
| 7840 | |
| 7841 | static bool cbm_gitlab_hooks_path(const cbm_agent_registry_context_t *registry, char *path, |
| 7842 | size_t path_size) { |
no test coverage detected