| 8058 | } |
| 8059 | |
| 8060 | static void install_gitlab_durable_context(const cbm_agent_registry_context_t *registry, |
| 8061 | const char *binary_path, bool dry_run) { |
| 8062 | char hooks_path[CLI_BUF_1K]; |
| 8063 | if (!cbm_gitlab_hooks_path(registry, hooks_path, sizeof(hooks_path))) { |
| 8064 | record_agent_config_error(false, "GitLab Duo CLI", "hook_resolve", "hooks.json"); |
| 8065 | return; |
| 8066 | } |
| 8067 | bool hook_supported = cbm_optional_hook_supported("gitlab", registry->options.is_windows); |
| 8068 | if (g_install_plan) { |
| 8069 | if (hook_supported) { |
| 8070 | plan_record("GitLab Duo CLI", "hook", hooks_path); |
| 8071 | } |
| 8072 | return; |
| 8073 | } |
| 8074 | if (!hook_supported) { |
| 8075 | printf(" hook: withheld on Windows (vendor hook shell is undocumented)\n"); |
| 8076 | return; |
| 8077 | } |
| 8078 | bool installed = true; |
| 8079 | if (!dry_run && (!prepare_config_parent(hooks_path) || |
| 8080 | cbm_upsert_gitlab_session_hook(hooks_path, binary_path) != CLI_OK)) { |
| 8081 | installed = false; |
| 8082 | record_agent_config_error(false, "GitLab Duo CLI", "session_hook_install", hooks_path); |
| 8083 | } |
| 8084 | if (installed) { |
| 8085 | printf(" hook: %s (SessionStart; experimental vendor surface)\n", hooks_path); |
| 8086 | } |
| 8087 | } |
| 8088 | |
| 8089 | static void install_devin_durable_context(const cbm_agent_registry_context_t *registry, |
| 8090 | const char *binary_path, const char *config_path, |
no test coverage detected