[PR #3968] feat(setup): add MiniMax Code client #5971

Open
opened 2026-10-31 01:10:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3968
Author: @hetaoBackend
Created: 10/15/2026
Status: 🔄 Open

Base: main ← Head: feat/minimax-code-client


📝 Commits (4)

  • eaa5b83 feat(setup): add MiniMax Code client
  • d6f979c fix(setup): align MiniMax Code client with review
  • 833d745 Merge remote-tracking branch 'origin/main' into feat/minimax-code-client
  • 3228033 fix(setup): address MiniMax Code client review nits

📊 Changes

6 files changed (+218 additions, -0 deletions)

View changed files

📝 docs/client-configuration.md (+15 -0)
📝 docs/installation.md (+3 -0)
📝 src/application/SupportedClients.ts (+16 -0)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)
➕ tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts (+181 -0)
📝 tests/fixtures/clientEnvironment.ts (+2 -0)

📄 Description

Summary

Adds MiniMax Code (CLI mcode) as a setup client. npx rea-agents setup --client minimax_code registers REA's MCP server and installs the REA skill. Before this change, setup did not know about MiniMax Code and users had to register REA by hand.

No issue is linked. None exists; this is a small client addition that reuses the existing json format.

Problem and expected behavior

MiniMax Code reads a plain mcpServers JSON file and SKILL.md skill directories, but setup does not detect it. With this change, setup detects ~/.minimax, upserts mcpServers.rea into ~/.minimax/mcp.json (other servers and top-level keys are kept), and copies the skill to ~/.minimax/skills/reverse-engineer-anything. When MINIMAX_DATA_DIR (or, failing that, MAVIS_DATA_DIR) is set, setup uses that directory instead of ~/.minimax.

Change and scope

  • src/application/SupportedClients.ts: new minimax_code entry using the existing json format, same shape as WorkBuddy, placed between WorkBuddy and Grok Build. No new dialect. The data directory is MINIMAX_DATA_DIR, then MAVIS_DATA_DIR, then ~/.minimax, matching MiniMax Code's own resolution (getExplicitPublicDataDirEnv in packages/config/src/config.ts). An empty value counts as unset; values are not trimmed, like the Codex and Qoder helpers.
  • Paths come from MiniMax Code source: data dir ~/.minimax (packages/config/src/data-dir.ts), profile MCP file <dataDir>/mcp.json (packages/local-runtime-v2/src/service/mcp/runtime/local-mcp.service.ts), user skills <dataDir>/skills (packages/local-runtime/src/skills/roots.ts).
  • Docs: a row in the docs/installation.md client table, a note that minimax_code needs a release after 6.7.0, and a MiniMax Code section in docs/client-configuration.md.
  • Tests: MAVIS_DATA_DIR and MINIMAX_DATA_DIR are added to the fixture that clears client env, and minimax_code is added to the client order in the lifecycle test.
  • Not included: the project-level <workspace>/.mcp.json (left untouched, as for other clients), named profiles (~/.minimax-<profile>) and the legacy ~/.mavis directory. The last two are follow-ups.

Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.

This is a setup client addition within existing boundaries. It adds no provider and no target interaction, so a maintainer scope decision is not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: setup client catalog (SupportedClients.ts).
  • Contribution scope fit and linked maintainer decision: setup client addition within existing boundaries; not applicable.
  • CLI and MCP/tool-catalog contract: adds one --client value, minimax_code. No tool changes.
  • 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. Uninstall removes only the rea entry and the REA skill copy.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: the generated product catalog picks up the new client ID; no build outputs are committed. Installation docs gain one table row and a version note.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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 writes mcpServers.rea into MiniMax Code's mcp.json (with a mcp.json.rea.backup) and copies the REA skill into its skills directory.

Evidence and regression coverage

  • Tests added or updated: new tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts (8 tests) covers the default paths on Linux, macOS and Windows; the json format; MINIMAX_DATA_DIR before MAVIS_DATA_DIR before the home default, an empty value falling back, and the skill path under the override; upsert that keeps other servers; an existing file with no servers table; an empty file; and uninstall that removes only rea. clientLifecycle.test.ts includes minimax_code in its client order. tests/fixtures/clientEnvironment.ts clears both new variables.
  • Base reproduction or other evidence: executed. On main, minimax_code is not a known client ID, so setup cannot register REA for MiniMax Code. The evidence below was run on the updated head after merging current main.
  • User-visible CLI/MCP output (if applicable): rea setup --client minimax_code --yes plans configure_client:minimax_code targeting <HOME>/.minimax/mcp.json with backup <HOME>/.minimax/mcp.json.rea.backup, plus install_skill:minimax_code. rea doctor --client minimax_code --json then reports registration:minimax_code as healthy.
  • Remaining proof gaps: not yet checked in a running MiniMax Code session (loading the registration and making real REA tool calls). The /mcp reload advice and the MiniMax Code paths come from reading MiniMax Code source.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Not an evidence-bearing change; these do not apply.

Validation performed

All on head 3228033 (current main merged in), Node 22.20.0, Linux (Debian 13).

  • npx vitest run tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts tests/boundary/filesystem/clientLifecycle.test.ts: 2 files, 70/70 passed.
  • npx vitest run tests/boundary/filesystem/productCatalog.test.ts tests/boundary/filesystem/documentationFacts.test.ts tests/conformance/readmeConsistency.test.ts tests/boundary/filesystem/workbuddyClientConfiguration.test.ts: passed (catalog and docs checks, including the client table).
  • npm run verify:test-discovery: "Discovered all 2106 test files exactly once."
  • npm run typecheck (tsc --noEmit): clean.
  • npx oxfmt --check .: clean.
  • npx oxlint: exit 0; the only output is existing max-depth warnings in scripts/ci/plan.mjs, none in changed files. npm run verify:module-boundaries: passed.
  • npm run build: passed.
  • Built CLI, temporary HOME with an existing ~/.minimax/mcp.json holding another server and a top-level key: rea setup --client minimax_code --yes exits 0, adds mcpServers.rea while keeping the other server and key, writes mcp.json.rea.backup, and installs skills/reverse-engineer-anything. rea doctor --client minimax_code --json reports registration:minimax_code healthy. The registered command answers MCP initialize (serverInfo rea).
  • Built CLI, empty temporary HOME with MINIMAX_DATA_DIR set: setup exits 0, writes mcp.json and skills/reverse-engineer-anything under that directory, and writes nothing under HOME.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Adds a client ID; existing clients are unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable. Path resolution is unit-tested for Linux, macOS and Windows; end-to-end setup ran on Linux only.
  • Package or release metadata impact: minimax_code is not in rea-agents@6.7.0 or earlier; docs/installation.md says it needs the first release after 6.7.0.
  • Security, privacy, process, or containment review: setup writes only MiniMax Code's user-level mcp.json (with a backup) and the skill directory, and preserves unrelated configuration. It does not touch project-level .mcp.json.

Author readiness

Human owner: @hetaoBackend

  • 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.
  • 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.
  • 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.

Follow-ups

  • Detect named profiles (~/.minimax-<profile>).
  • Detect the legacy ~/.mavis directory.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3968 **Author:** [@hetaoBackend](https://github.com/hetaoBackend) **Created:** 10/15/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/minimax-code-client` --- ### 📝 Commits (4) - [`eaa5b83`](https://github.com/morluto/rea/commit/eaa5b837dff34272790f06d91998f2fd4e59fa0d) feat(setup): add MiniMax Code client - [`d6f979c`](https://github.com/morluto/rea/commit/d6f979cb268a42b7fccced6cf0eaa6b632d1d9d8) fix(setup): align MiniMax Code client with review - [`833d745`](https://github.com/morluto/rea/commit/833d745b29a7ba1fd9cb5123ad3f987ecd06952b) Merge remote-tracking branch 'origin/main' into feat/minimax-code-client - [`3228033`](https://github.com/morluto/rea/commit/3228033080b0175756a3feb58da58b3f55e6d3b5) fix(setup): address MiniMax Code client review nits ### 📊 Changes **6 files changed** (+218 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/client-configuration.md` (+15 -0) 📝 `docs/installation.md` (+3 -0) 📝 `src/application/SupportedClients.ts` (+16 -0) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) ➕ `tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts` (+181 -0) 📝 `tests/fixtures/clientEnvironment.ts` (+2 -0) </details> ### 📄 Description ## Summary Adds [MiniMax Code](https://github.com/MiniMax-AI/minimax-code) (CLI `mcode`) as a setup client. `npx rea-agents setup --client minimax_code` registers REA's MCP server and installs the REA skill. Before this change, setup did not know about MiniMax Code and users had to register REA by hand. No issue is linked. None exists; this is a small client addition that reuses the existing `json` format. ## Problem and expected behavior MiniMax Code reads a plain `mcpServers` JSON file and `SKILL.md` skill directories, but setup does not detect it. With this change, setup detects `~/.minimax`, upserts `mcpServers.rea` into `~/.minimax/mcp.json` (other servers and top-level keys are kept), and copies the skill to `~/.minimax/skills/reverse-engineer-anything`. When `MINIMAX_DATA_DIR` (or, failing that, `MAVIS_DATA_DIR`) is set, setup uses that directory instead of `~/.minimax`. ## Change and scope - `src/application/SupportedClients.ts`: new `minimax_code` entry using the existing `json` format, same shape as WorkBuddy, placed between WorkBuddy and Grok Build. No new dialect. The data directory is `MINIMAX_DATA_DIR`, then `MAVIS_DATA_DIR`, then `~/.minimax`, matching MiniMax Code's own resolution (`getExplicitPublicDataDirEnv` in `packages/config/src/config.ts`). An empty value counts as unset; values are not trimmed, like the Codex and Qoder helpers. - Paths come from MiniMax Code source: data dir `~/.minimax` (`packages/config/src/data-dir.ts`), profile MCP file `<dataDir>/mcp.json` (`packages/local-runtime-v2/src/service/mcp/runtime/local-mcp.service.ts`), user skills `<dataDir>/skills` (`packages/local-runtime/src/skills/roots.ts`). - Docs: a row in the `docs/installation.md` client table, a note that `minimax_code` needs a release after 6.7.0, and a MiniMax Code section in `docs/client-configuration.md`. - Tests: `MAVIS_DATA_DIR` and `MINIMAX_DATA_DIR` are added to the fixture that clears client env, and `minimax_code` is added to the client order in the lifecycle test. - Not included: the project-level `<workspace>/.mcp.json` (left untouched, as for other clients), named profiles (`~/.minimax-<profile>`) and the legacy `~/.mavis` directory. The last two are follow-ups. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). Unresolved scope, authority, side effects, or required verification block integration. Link the required maintainer scope decision for new providers or capabilities involving target execution, injection, mutation, or protection recovery; ordinary fixes within existing boundaries may state "not applicable". Draft PRs may leave the scope decision pending and the readiness and merge checklists unchecked. Maintainers can help resolve open questions. This is a setup client addition within existing boundaries. It adds no provider and no target interaction, so a maintainer scope decision is not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: setup client catalog (`SupportedClients.ts`). - Contribution scope fit and linked maintainer decision: setup client addition within existing boundaries; not applicable. - CLI and MCP/tool-catalog contract: adds one `--client` value, `minimax_code`. No tool changes. - 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. Uninstall removes only the `rea` entry and the REA skill copy. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: the generated product catalog picks up the new client ID; no build outputs are committed. Installation docs gain one table row and a version note. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [x] 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 writes `mcpServers.rea` into MiniMax Code's `mcp.json` (with a `mcp.json.rea.backup`) and copies the REA skill into its `skills` directory. ## Evidence and regression coverage - Tests added or updated: new `tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts` (8 tests) covers the default paths on Linux, macOS and Windows; the `json` format; `MINIMAX_DATA_DIR` before `MAVIS_DATA_DIR` before the home default, an empty value falling back, and the skill path under the override; upsert that keeps other servers; an existing file with no servers table; an empty file; and uninstall that removes only `rea`. `clientLifecycle.test.ts` includes `minimax_code` in its client order. `tests/fixtures/clientEnvironment.ts` clears both new variables. - Base reproduction or other evidence: executed. On main, `minimax_code` is not a known client ID, so setup cannot register REA for MiniMax Code. The evidence below was run on the updated head after merging current main. - User-visible CLI/MCP output (if applicable): `rea setup --client minimax_code --yes` plans `configure_client:minimax_code` targeting `<HOME>/.minimax/mcp.json` with backup `<HOME>/.minimax/mcp.json.rea.backup`, plus `install_skill:minimax_code`. `rea doctor --client minimax_code --json` then reports `registration:minimax_code` as `healthy`. - Remaining proof gaps: not yet checked in a running MiniMax Code session (loading the registration and making real REA tool calls). The `/mcp reload` advice and the MiniMax Code paths come from reading MiniMax Code source. For evidence-bearing changes: - [ ] Observed, derived, and inferred claims remain distinguishable. - [ ] Artifact identity, source provenance, and failed attempts remain preserved. - [ ] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. Not an evidence-bearing change; these do not apply. ## Validation performed All on head 3228033 (current main merged in), Node 22.20.0, Linux (Debian 13). - `npx vitest run tests/boundary/filesystem/minimaxCodeClientConfiguration.test.ts tests/boundary/filesystem/clientLifecycle.test.ts`: 2 files, 70/70 passed. - `npx vitest run tests/boundary/filesystem/productCatalog.test.ts tests/boundary/filesystem/documentationFacts.test.ts tests/conformance/readmeConsistency.test.ts tests/boundary/filesystem/workbuddyClientConfiguration.test.ts`: passed (catalog and docs checks, including the client table). - `npm run verify:test-discovery`: "Discovered all 2106 test files exactly once." - `npm run typecheck` (`tsc --noEmit`): clean. - `npx oxfmt --check .`: clean. - `npx oxlint`: exit 0; the only output is existing `max-depth` warnings in `scripts/ci/plan.mjs`, none in changed files. `npm run verify:module-boundaries`: passed. - `npm run build`: passed. - Built CLI, temporary `HOME` with an existing `~/.minimax/mcp.json` holding another server and a top-level key: `rea setup --client minimax_code --yes` exits 0, adds `mcpServers.rea` while keeping the other server and key, writes `mcp.json.rea.backup`, and installs `skills/reverse-engineer-anything`. `rea doctor --client minimax_code --json` reports `registration:minimax_code` healthy. The registered command answers MCP `initialize` (`serverInfo` `rea`). - Built CLI, empty temporary `HOME` with `MINIMAX_DATA_DIR` set: setup exits 0, writes `mcp.json` and `skills/reverse-engineer-anything` under that directory, and writes nothing under `HOME`. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Adds a client ID; existing clients are unchanged. - Real Hopper/Ghidra, browser, or OS coverage: not applicable. Path resolution is unit-tested for Linux, macOS and Windows; end-to-end setup ran on Linux only. - Package or release metadata impact: `minimax_code` is not in `rea-agents@6.7.0` or earlier; `docs/installation.md` says it needs the first release after 6.7.0. - Security, privacy, process, or containment review: setup writes only MiniMax Code's user-level `mcp.json` (with a backup) and the skill directory, and preserves unrelated configuration. It does not touch project-level `.mcp.json`. ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: @hetaoBackend - [ ] 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. - [ ] 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. - [ ] 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. ## Follow-ups - Detect named profiles (`~/.minimax-<profile>`). - Detect the legacy `~/.mavis` directory. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5971
No description provided.