feat: add CodeBuddy agent support#482
Conversation
Signed-off-by: DevinZeng <studyzy@gmail.com>
cbm_upsert_codebuddy_session_hooks wrote hook script file path as command, but test expects search_graph in settings.json (inline echo command). Switch to CMM_SESSION_REMINDER_CMD inline shell command, matching Gemini/Antigravity behavior. Fixes cli_codebuddy_session_hook_parity test failure across all CI platforms. Signed-off-by: DevinZeng <studyzy@gmail.com>
CI lint failure: src/cli/cli.c:2085:97: code should be clang-formatted
[-Wclang-format-violations]
The compound literal (hooks_upsert_args_t){...} was formatted inline
exceeding the 100-column limit. Reformat to multi-line block matching
the project's clang-format style (ColumnLimit: 100, AlignAfterOpenBracket: Align).
Fixes two occurrences:
- cbm_upsert_codebuddy_session_hooks (line 2082)
- cbm_upsert_session_hooks (line 2159)
Signed-off-by: DevinZeng <studyzy@gmail.com>
|
Hi @DeusData 👋 — pinging for a review when you have a moment. This PR has been open since 2026-06-17 and adds CodeBuddy as a 12th supported agent (detection, hooks, setup scripts, tests, docs). All checks pass (5610 tests, lint clean, production build OK). I see you've been the sole merger of PRs in this repo over the past week (#562, #555, #528, #485, #475, #466, #464, #448, #412), so you look like the right reviewer. Happy to address any feedback. Thanks! |
|
Huge thanks for opening this PR and for the work you put into it. The maintainer shop is currently full, so this may sit for a bit before it gets a proper review. We will come back to this as soon as possible with real feedback; I wanted to make sure it did not sit unacknowledged in the meantime. |
Summary
Add full support for CodeBuddy as a supported coding agent, bringing the total from 11 to 12 auto-detected agents.
CodeBuddy follows the same configuration pattern as Claude Code, using
~/.codebuddy/instead of~/.claude/and~/.codebuddy/.mcp.jsonfor MCP server registration.Changes
Core (
src/cli/)bool codebuddyfield tocbm_detected_agents_t; declarecbm_upsert_codebuddy_hooks,cbm_remove_codebuddy_hooks,cbm_upsert_codebuddy_session_hooks,cbm_remove_codebuddy_session_hookscbm_codebuddy_config_dir()(honors$CODEBUDDY_CONFIG_DIR, falls back to~/.codebuddy), detection incbm_detect_agents(),install_codebuddy_config(),uninstall_codebuddy(), PreToolUse + SessionStart hooks, hook gate script + session reminder script installersDiscovery (
src/discover/).codebuddyto skip directory list (IDE category)CLI help (
src/main.c)Setup scripts
configure_codebuddy()— interactive MCP config for~/.codebuddy/.mcp.jsonConfigure-CodeBuddy— PowerShell equivalent, honors$env:CODEBUDDY_CONFIG_DIRTests
cli_detect_agents_finds_codebuddy,cli_detect_agents_finds_codebuddy_via_envcli_upsert_codebuddy_hook_fresh,cli_remove_codebuddy_hooks,cli_codebuddy_session_hook_parityskip_codebuddyDocumentation
Test Plan
make -f Makefile.cbm test— 5610 passed (was 5607, +3 new tests)make -f Makefile.cbm lint-format— cleanmake -f Makefile.cbm lint-no-suppress— cleanbash -n scripts/setup.sh— syntax OKscripts/build.sh) — OK