[PR #2744] [MERGED] feat(setup): add Kimi Code client support #5359

Closed
opened 2026-10-31 01:06:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2744
Author: @ysntony
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: feat/kimi-code-client-support


📝 Commits (4)

  • bd9faee feat(setup): add Kimi Code client support
  • 96098be chore: merge main and preserve Kimi client setup
  • 88dd4cc fix(setup): preserve Kimi tool filters and strict JSON coverage
  • 217e5be Merge commit '94072364c7' into HEAD

📊 Changes

10 files changed (+468 additions, -12 deletions)

View changed files

📝 docs/client-configuration.md (+12 -0)
📝 docs/installation.md (+3 -2)
📝 src/application/ClientConfigurationDocument.ts (+12 -2)
📝 src/application/ClientRegistrationStatus.ts (+26 -8)
📝 src/application/SetupClientConfiguration.ts (+14 -0)
📝 src/application/SupportedClients.ts (+13 -0)
📝 src/mcpStartupPolicy.ts (+2 -0)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)
➕ tests/boundary/filesystem/kimiClientConfiguration.test.ts (+384 -0)
📝 tests/fixtures/clientEnvironment.ts (+1 -0)

📄 Description

Summary

Adds Kimi Code (kimi) as a supported client for rea setup / rea doctor.

Behavior changes

rea setup --client kimi registers REA's MCP server in ~/.kimi-code/mcp.json (or $KIMI_CODE_HOME/mcp.json when set), preserving unrelated settings and writing a .rea.backup before modifying an existing file.

The registration is command-based with no type field: Kimi Code treats a command entry as stdio. startupTimeoutMs = 30000 (Kimi's default) and toolTimeoutMs = 120000 are set from the shared MCP_STARTUP_POLICY.

Package-launcher registration reuses the shared pinned-version rule and Windows wrapping.

Config parsing is strict JSON: an empty or whitespace-only file is initialized; malformed JSON is rejected with the file left untouched and no backup created.

An explicit transport: "stdio" is treated as aligned (normalized away on write); any other explicit transport is reported as invalid.

Repeat setup is idempotent: a second run reports unchanged with the file byte-identical.

Skills

Kimi Code discovers personal skills in ~/.agents/skills and project-local .agents/skills, so the bundled skill uses the shared skill destination with no separate skill root; the files are still installed and verified through the shared-skill flow.

Validation

  • 19 Kimi-specific tests cover configuration paths, $KIMI_CODE_HOME override, registration lifecycle (register, preserve, backup, idempotent, uninstall), launchers on Linux and Windows, transport and timeout validation, and foreign-command detection.
  • Adjacent-client regression: 260 passed, 2 skipped.
  • check:fast and docs:check pass; git diff --check is clean.
  • Real-client verification: Kimi Code 2.1.1 connected to the registered server and returned Evidence from a real mcp__rea__analyze_javascript_application call.
  • With the full 173-tool catalog exposed, requests can exceed Moonshot's tool-schema size limit; scoping the server entry with enabledTools avoids this.

🔄 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/2744 **Author:** [@ysntony](https://github.com/ysntony) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `feat/kimi-code-client-support` --- ### 📝 Commits (4) - [`bd9faee`](https://github.com/morluto/rea/commit/bd9faee08ea654ad639ac5879e4abe685a45c708) feat(setup): add Kimi Code client support - [`96098be`](https://github.com/morluto/rea/commit/96098be8f830adf8222a85e5d52098f00bf89ba0) chore: merge main and preserve Kimi client setup - [`88dd4cc`](https://github.com/morluto/rea/commit/88dd4cc33d447061648ad212894add428e80a165) fix(setup): preserve Kimi tool filters and strict JSON coverage - [`217e5be`](https://github.com/morluto/rea/commit/217e5be17719e8bf121af6005b14aaa1970439d9) Merge commit '94072364c7f8410b0e86e72c912c2611572b278f' into HEAD ### 📊 Changes **10 files changed** (+468 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/client-configuration.md` (+12 -0) 📝 `docs/installation.md` (+3 -2) 📝 `src/application/ClientConfigurationDocument.ts` (+12 -2) 📝 `src/application/ClientRegistrationStatus.ts` (+26 -8) 📝 `src/application/SetupClientConfiguration.ts` (+14 -0) 📝 `src/application/SupportedClients.ts` (+13 -0) 📝 `src/mcpStartupPolicy.ts` (+2 -0) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) ➕ `tests/boundary/filesystem/kimiClientConfiguration.test.ts` (+384 -0) 📝 `tests/fixtures/clientEnvironment.ts` (+1 -0) </details> ### 📄 Description ## Summary Adds Kimi Code (`kimi`) as a supported client for `rea setup` / `rea doctor`. ## Behavior changes `rea setup --client kimi` registers REA's MCP server in `~/.kimi-code/mcp.json` (or `$KIMI_CODE_HOME/mcp.json` when set), preserving unrelated settings and writing a `.rea.backup` before modifying an existing file. The registration is command-based with no `type` field: Kimi Code treats a `command` entry as stdio. `startupTimeoutMs = 30000` (Kimi's default) and `toolTimeoutMs = 120000` are set from the shared `MCP_STARTUP_POLICY`. Package-launcher registration reuses the shared pinned-version rule and Windows wrapping. Config parsing is strict JSON: an empty or whitespace-only file is initialized; malformed JSON is rejected with the file left untouched and no backup created. An explicit `transport: "stdio"` is treated as aligned (normalized away on write); any other explicit transport is reported as invalid. Repeat setup is idempotent: a second run reports `unchanged` with the file byte-identical. ## Skills Kimi Code discovers personal skills in `~/.agents/skills` and project-local `.agents/skills`, so the bundled skill uses the shared skill destination with no separate skill root; the files are still installed and verified through the shared-skill flow. ## Validation - 19 Kimi-specific tests cover configuration paths, `$KIMI_CODE_HOME` override, registration lifecycle (register, preserve, backup, idempotent, uninstall), launchers on Linux and Windows, transport and timeout validation, and foreign-command detection. - Adjacent-client regression: 260 passed, 2 skipped. - `check:fast` and `docs:check` pass; `git diff --check` is clean. - Real-client verification: Kimi Code 2.1.1 connected to the registered server and returned Evidence from a real mcp__rea__analyze_javascript_application call. - With the full 173-tool catalog exposed, requests can exceed Moonshot's tool-schema size limit; scoping the server entry with `enabledTools` avoids this. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:00 +00:00
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#5359
No description provided.