| 8120 | } |
| 8121 | |
| 8122 | static void install_gitlab_durable_context(const cbm_agent_registry_context_t *registry, |
| 8123 | const char *binary_path, bool dry_run) { |
| 8124 | char hooks_path[CLI_BUF_1K]; |
| 8125 | if (!cbm_gitlab_hooks_path(registry, hooks_path, sizeof(hooks_path))) { |
| 8126 | record_agent_config_error(false, "GitLab Duo CLI", "hook_resolve", "hooks.json"); |
| 8127 | return; |
| 8128 | } |
| 8129 | bool hook_supported = cbm_optional_hook_supported("gitlab", registry->options.is_windows); |
| 8130 | if (g_install_plan) { |
| 8131 | if (hook_supported) { |
| 8132 | plan_record("GitLab Duo CLI", "hook", hooks_path); |
| 8133 | } |
| 8134 | return; |
| 8135 | } |
| 8136 | if (!hook_supported) { |
| 8137 | printf(" hook: withheld on Windows (vendor hook shell is undocumented)\n"); |
| 8138 | return; |
| 8139 | } |
| 8140 | bool installed = true; |
| 8141 | if (!dry_run && (!prepare_config_parent(hooks_path) || |
| 8142 | cbm_upsert_gitlab_session_hook(hooks_path, binary_path) != CLI_OK)) { |
| 8143 | installed = false; |
| 8144 | record_agent_config_error(false, "GitLab Duo CLI", "session_hook_install", hooks_path); |
| 8145 | } |
| 8146 | if (installed) { |
| 8147 | printf(" hook: %s (SessionStart; experimental vendor surface)\n", hooks_path); |
| 8148 | } |
| 8149 | } |
| 8150 | |
| 8151 | static void install_devin_durable_context(const cbm_agent_registry_context_t *registry, |
| 8152 | const char *binary_path, const char *config_path, |
no test coverage detected