| 8273 | } |
| 8274 | |
| 8275 | static void install_gitlab_durable_context(const cbm_agent_registry_context_t *registry, |
| 8276 | const char *binary_path, bool dry_run) { |
| 8277 | char hooks_path[CLI_BUF_1K]; |
| 8278 | if (!cbm_gitlab_hooks_path(registry, hooks_path, sizeof(hooks_path))) { |
| 8279 | record_agent_config_error(false, "GitLab Duo CLI", "hook_resolve", "hooks.json"); |
| 8280 | return; |
| 8281 | } |
| 8282 | bool hook_supported = cbm_optional_hook_supported("gitlab", registry->options.is_windows); |
| 8283 | if (g_install_plan) { |
| 8284 | if (hook_supported) { |
| 8285 | plan_record("GitLab Duo CLI", "hook", hooks_path); |
| 8286 | } |
| 8287 | return; |
| 8288 | } |
| 8289 | if (!hook_supported) { |
| 8290 | printf(" hook: withheld on Windows (vendor hook shell is undocumented)\n"); |
| 8291 | return; |
| 8292 | } |
| 8293 | bool installed = true; |
| 8294 | if (!dry_run && (!prepare_config_parent(hooks_path) || |
| 8295 | cbm_upsert_gitlab_session_hook(hooks_path, binary_path) != CLI_OK)) { |
| 8296 | installed = false; |
| 8297 | record_agent_config_error(false, "GitLab Duo CLI", "session_hook_install", hooks_path); |
| 8298 | } |
| 8299 | if (installed) { |
| 8300 | printf(" hook: %s (SessionStart; experimental vendor surface)\n", hooks_path); |
| 8301 | } |
| 8302 | } |
| 8303 | |
| 8304 | static void install_devin_durable_context(const cbm_agent_registry_context_t *registry, |
| 8305 | const char *binary_path, const char *config_path, |
no test coverage detected