| 7840 | } |
| 7841 | |
| 7842 | static void install_qoder_durable_context(const char *home, const char *binary_path, |
| 7843 | const char *settings_path, bool config_resolved, |
| 7844 | bool force, bool dry_run) { |
| 7845 | char skills_dir[CLI_BUF_1K]; |
| 7846 | char agent_path[CLI_BUF_1K]; |
| 7847 | snprintf(skills_dir, sizeof(skills_dir), "%s/.qoder/skills", home); |
| 7848 | snprintf(agent_path, sizeof(agent_path), "%s/.qoder/agents/codebase-memory.md", home); |
| 7849 | install_agent_skill("Qoder CLI", skills_dir, force, dry_run); |
| 7850 | install_tiered_agent_profiles( |
| 7851 | (cbm_tiered_profile_set_t){ |
| 7852 | .label = "Qoder CLI", |
| 7853 | .verify_path = agent_path, |
| 7854 | .binary_path = binary_path, |
| 7855 | .legacy_verify_content = legacy_qoder_verify_agent_content, |
| 7856 | .dialect = CBM_GRAPH_DIALECT_QODER, |
| 7857 | }, |
| 7858 | dry_run); |
| 7859 | bool hook_supported = cbm_optional_hook_supported("qoder", cbm_current_platform_is_windows()); |
| 7860 | if (g_install_plan) { |
| 7861 | if (hook_supported) { |
| 7862 | plan_record("Qoder CLI", "hook", settings_path); |
| 7863 | } |
| 7864 | return; |
| 7865 | } |
| 7866 | if (!hook_supported) { |
| 7867 | printf(" hooks: withheld because no documented executor is available\n"); |
| 7868 | return; |
| 7869 | } |
| 7870 | if (!config_resolved) { |
| 7871 | printf(" hook: skipped because the settings path was unresolved\n"); |
| 7872 | return; |
| 7873 | } |
| 7874 | bool installed = true; |
| 7875 | if (!dry_run && (!prepare_config_parent(settings_path) || |
| 7876 | cbm_upsert_qoder_context_hook(settings_path, binary_path) != CLI_OK)) { |
| 7877 | installed = false; |
| 7878 | record_agent_config_error(false, "Qoder CLI", "context_hook_install", settings_path); |
| 7879 | } |
| 7880 | if (installed) { |
| 7881 | printf(" hooks: %s (SessionStart + SubagentStart + PostToolUse Read)\n", settings_path); |
| 7882 | } |
| 7883 | } |
| 7884 | |
| 7885 | static bool cbm_gitlab_hooks_path(const cbm_agent_registry_context_t *registry, char *path, |
| 7886 | size_t path_size) { |
no test coverage detected