Skip to content

feat(setup): support CodeBuddy as a setup client - #2492

Merged
morluto merged 1 commit into
morluto:mainfrom
cainiao1992:feat/codebuddy-setup-client
Nov 6, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
cainiao1992:feat/codebuddy-setup-client

Conversation

@cainiao1992

@cainiao1992 cainiao1992 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds CodeBuddy as a supported setup client. rea setup --client codebuddy (and auto-detection when ~/.codebuddy exists) now registers REA's local MCP server in the global ~/.codebuddy/mcp.json and installs the bundled skill under ~/.codebuddy/skills. Closes #2490.

Problem and expected behavior

CodeBuddy reads a standard mcpServers JSON file at ~/.codebuddy/mcp.json, but it was absent from SUPPORTED_CLIENT_DEFINITIONS, so CodeBuddy users had to hand-edit that file and rea setup/doctor/uninstall could not manage the registration. Expected behavior now: setup upserts mcpServers.rea (stdio command) while preserving unrelated servers and top-level keys; client detection uses the ~/.codebuddy directory as its marker; uninstall removes only the rea entry.

Change and scope

  • New codebuddy entry in SUPPORTED_CLIENT_DEFINITIONS mirroring the Cursor json-dialect entry plus a skillPath (.codebuddy/skills). The --client allowlist, detection, registration, uninstall, and the generated product catalog all derive from this array, so no CLI or registration-logic changes were needed.
  • Docs: supported-agents table row in docs/installation.md; a CodeBuddy section in docs/client-configuration.md.
  • Tests: new tests/boundary/filesystem/codebuddyClientConfiguration.test.ts mirroring the Trae client tests; detection list in clientLifecycle.test.ts extended.

Follow the contribution scope: not applicable — an ordinary setup-client addition within existing boundaries; no new provider and no capability involving target execution, injection, mutation, or protection recovery.

Contract and boundary impact

  • Semantic owner and earliest changed stage: setup / client registration (application layer).
  • Contribution scope fit and linked maintainer decision: not applicable (ordinary setup-client addition; feature request [Feature] Support CodeBuddy as a setup client #2490 linked).
  • CLI and MCP/tool-catalog contract: new accepted --client codebuddy value; docs/public/product-catalog.json setup_clients gains codebuddy (generated and CI-validated; not committed).
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: regenerated locally to validate (node scripts/generate-product-catalog.mjs); the file is gitignored and CI-generated.

Expected effects (check known effects; use documentation-only on its own).

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Setup itself writes only the user's local CodeBuddy configuration file on explicit request; no analyzed-target interaction is introduced.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/filesystem/codebuddyClientConfiguration.test.ts (new; per-platform path resolution, json format, personal skill directory, upsert preserving unrelated servers, registration into an existing config without servers, registration into an empty file, uninstall removing only rea); tests/boundary/filesystem/clientLifecycle.test.ts detection list extended with codebuddy.
  • Base reproduction or other evidence: before the change, supportedClients(home) returned no codebuddy client and --client codebuddy failed CLI validation.
  • User-visible CLI/MCP output: end-to-end run against an isolated HOME with node scripts/rea.mjs setup --client codebuddy --skill-client codebuddy --yes:
    plannedActions[2]:
      configure_client:codebuddy — target: <home>/.codebuddy/mcp.json
      install_skill:codebuddy    — target: <home>/.codebuddy/skills/reverse-engineer-anything
    appliedActions[2]: configured_codebuddy, installed_skill
    clients:
      codebuddy:
        status: configured
    
    resulting <home>/.codebuddy/mcp.json (the registered command reflects the entrypoint that launched setup — the local checkout in this run, npx -y rea-agents@latest mcp from a published install):
    {
      "mcpServers": {
        "rea": { "command": "<rea entrypoint>", "args": ["mcp"] }
      }
    }
  • Remaining proof gaps: none known. Verified by the author in the real CodeBuddy client: the registration loads, the bundled skill is discovered, and real REA tool calls execute through the registered server (recorded in docs/client-configuration.md, commit 7ae8b11).

For evidence-bearing changes: not applicable — this change produces no analysis evidence or artifacts.

Validation performed

  • npm run typecheck — passed
  • npx vitest run tests/boundary/filesystem/clientLifecycle.test.ts tests/boundary/filesystem/codebuddyClientConfiguration.test.ts tests/boundary/filesystem/productCatalog.test.ts — 71/71 tests passed
  • node scripts/check-doc-facts.mjs — no issues
  • node scripts/generate-product-catalog.mjs --check — generated catalog matches source definitions
  • npx oxfmt --check on the five changed files — all formatted
  • npx oxlint on the changed source/test files — no new findings (pre-existing max-lines warning in SupportedClients.ts unchanged)
  • npm run build:cached — build succeeded; isolated-HOME setup --client codebuddy --skill-client codebuddy --yes run configured the client and installed the skill as shown above
  • Real-client verification by the author: CodeBuddy loaded the registration and the skill, and real REA tool calls ran successfully (7ae8b11)

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none beyond the generated (gitignored) product catalog gaining the codebuddy setup client; documentation updated.
  • Security, privacy, process, or containment review: no target-facing behavior; setup writes only the local CodeBuddy configuration file when requested.

Author readiness

Human owner: @cainiao1992

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. (Not applicable: ordinary setup-client addition; no new provider or target-interacting capability.)
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above. ([Feature] Support CodeBuddy as a setup client #2490)
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Adds CodeBuddy to the shared setup client definitions.

  • REA setup now registers its server and skill with CodeBuddy.

Reviews (14) · Last reviewed commit: "feat(setup): support CodeBuddy as a setu..." · Reviewed by Greptile

@morluto morluto added enhancement New feature or request area: setup Setup, packaging, upgrade, install, Doctor, and client registration area: cli CLI adapter and one-shot commands area: domain Domain logic, errors, and pure functions P2: medium Medium priority issue labels Oct 13, 2026
morluto pushed a commit to cainiao1992/rea that referenced this pull request Oct 13, 2026
@morluto
morluto force-pushed the feat/codebuddy-setup-client branch 2 times, most recently from 51409fe to a237654 Compare October 13, 2026 18:43
@cainiao1992
cainiao1992 force-pushed the feat/codebuddy-setup-client branch 2 times, most recently from 3386b4f to 925761e Compare October 14, 2026 05:02
@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: The new CodeBuddy entry works on Linux, on Node 24 and 26. On main, no such client exists. On the PR head, setup's file writer, status check and uninstall all behave. I did not run rea setup, so the command line itself is untested.

I tested head 925761e as pushed. GitHub shows it as mergeable with main 70cd4cb. I also applied the PR diff to main and re-ran the tests. They passed.

Results

Check Node 24.18.0 Node 26.11.1
PR test file, head (7 tests) pass pass
Product catalog test, head (10 tests) pass pass
Both files, main plus the PR diff pass not run
CodeBuddy in client list, main 70cd4cb absent absent
CodeBuddy in client list, head present present
Writer, 4 start files, head all pass all pass
Detection order, all 26 clients, head matches the expected list not run

Before and after. Each file below is under a throwaway home folder.

What Main 70cd4cb Head 925761e
Config path none .codebuddy/mcp.json
Folder .codebuddy detected no yes
Skill folder for codebuddy .agents/skills .codebuddy/skills

Writer, on head. I used four start files: one with other servers, one with no servers key, one empty, and one missing. In each case the first write said configured. The second said unchanged, with identical bytes. The status check said aligned. Uninstall removed only the rea entry. Other servers and top-level keys stayed.

Not run

  • rea setup --client codebuddy. Setup always runs Doctor, which I must not run here. The pasted output in the PR body is unchecked.
  • clientLifecycle.test.ts. It builds a setup host that makes a Doctor host. I checked its one new line with a script instead.
  • Installing the skill. I only checked where it would go.
  • The real CodeBuddy app. I did not install it. The author's real-client claim is unchecked here.
  • Whether ~/.codebuddy/mcp.json is the app's real path. Unchecked.
  • Windows and macOS. I only computed their paths.
  • Node 22.

Thanks, Xiangfang Chen, for the PR and the clear tests.

Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.9
  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
  • RAM: 32 GB DDR4-3600
  • Node: 24.18.0, 26.11.1
  • Head: 925761e
  • Base: ec67aeb
  • Other: main 70cd4cb; every run used throwaway home, temp and config folders
Commands
npm ci && npm run build && npm run test:prepare
npm run test:focused -- tests/boundary/filesystem/codebuddyClientConfiguration.test.ts tests/boundary/filesystem/productCatalog.test.ts
node e2e.mjs <dist root> <work root>

The script e2e.mjs calls supportedClients, detectClients, skillDestinations, configureClientConfiguration, readClientRegistrationStatuses and systemUninstallHost(home).removeClient directly. Each run sat under systemd-run --user --scope -p MemoryMax=6G.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@cainiao1992
cainiao1992 force-pushed the feat/codebuddy-setup-client branch 2 times, most recently from 5e82902 to 4d3e85a Compare October 18, 2026 16:29
@cainiao1992
cainiao1992 force-pushed the feat/codebuddy-setup-client branch 3 times, most recently from 81b8f4a to 213e524 Compare October 28, 2026 07:51
Register rea in the global ~/.codebuddy/mcp.json through a new codebuddy
entry in SUPPORTED_CLIENT_DEFINITIONS (json dialect, ~/.codebuddy marker,
~/.codebuddy/skills skill directory). Document the client and cover
registration and uninstall with boundary tests. Loading, the bundled
skill, and real REA tool calls were verified in the CodeBuddy client.
@cainiao1992
cainiao1992 force-pushed the feat/codebuddy-setup-client branch from 213e524 to 9505450 Compare October 28, 2026 09:42
@morluto
morluto merged commit fb841a9 into morluto:main Nov 6, 2026
41 checks passed
@cainiao1992
cainiao1992 deleted the feat/codebuddy-setup-client branch November 6, 2026 07:56
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: domain Domain logic, errors, and pure functions area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request P2: medium Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support CodeBuddy as a setup client

3 participants