[PR #1929] [MERGED] feat(setup): register DeepSeek Harness through setup, doctor and uninstall #4918

Closed
opened 2026-10-31 00:56:46 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1929
Author: @BaaRai
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @morluto

Base: main ← Head: feat/dsh-setup-client


📝 Commits (10+)

  • 9a8ff02 feat(setup): register DeepSeek Harness through setup, doctor and uninstall
  • 2f422bb fix(setup): carry environment and identity validation into DSH registrations
  • 304df1a fix(setup): apply Cordis patch order and collapse DSH registrations
  • 302d8ca fix(setup): repair direct-only registrations and preserve Cordis entry state
  • ba1ada2 fix(setup): preserve Harness row state through identity and refresh repairs
  • c3a93b6 fix(setup): preserve Cordis tags and collapse aligned Harness rows
  • 62d34d1 fix(setup): drop the unused DSH configuration type
  • 078860f fix(setup): keep Harness env tags and comment-only patches
  • be257fc fix(setup): own Harness rows by entry id and expression state
  • f6a10a6 fix(setup): collapse aliased Harness insertions

📊 Changes

22 files changed (+3149 additions, -181 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/connection-and-recovery.md (+1 -1)
📝 AGENTS.md (+3 -1)
📝 docs/installation.md (+29 -15)
📝 docs/testing.md (+13 -3)
📝 scripts/verify-deepseek-client.mjs (+91 -29)
📝 src/application/ClientConfigurationDocument.ts (+20 -0)
📝 src/application/ClientRegistrationEnvironment.ts (+3 -0)
📝 src/application/ClientRegistrationStatus.ts (+15 -0)
➕ src/application/DshCordisPatch.ts (+375 -0)
➕ src/application/DshCordisYaml.ts (+175 -0)
📝 src/application/SetupClientConfiguration.ts (+18 -2)
📝 src/application/SupportedClients.ts (+18 -0)
📝 src/application/Uninstall.ts (+10 -2)
📝 src/domain/javascript/electronWrappedCallPaths.test.ts (+30 -0)
📝 src/domain/javascript/electronWrappedCallPaths.ts (+4 -2)
📝 src/domain/javascript/javascriptSemanticAnalysis.ts (+23 -5)
📝 src/domain/javascript/javascriptStaticAnalysis.ts (+8 -5)
📝 src/domain/javascript/javascriptSymbolicBindings.ts (+16 -116)
➕ tests/acceptance/setup/dshClientSetup.test.ts (+232 -0)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)

...and 2 more files

📄 Description

Summary

Fixes #1839.

rea setup --client dsh, rea doctor --client dsh and rea uninstall --client dsh now manage the DeepSeek Harness registration. Until now REA documented the manual Cordis YAML patch but could not configure, diagnose or remove it.

Problem and expected behavior

Harness registers MCP clients through a Cordis YAML patch sequence in the home patch, not a mcpServers table, so none of the existing client formats applied. The issue asks for the standard setup and doctor workflow: register without hand-editing, diagnose aligned/stale registrations, and maintain or remove the registration without touching unrelated entries.

Change and scope

  • New dsh client in the supported registry. The configuration file is the home patch $DSH_HOME/cordis.patch.yml (~/.dsh/cordis.patch.yml when unset); the home patch applies to every Harness profile, so no per-profile edit is needed. Skill destinations follow ~/.agents/skills ($DSH_AGENTS_HOME/skills when configured), matching the existing shared skill home.
  • DshCordisPatch owns the format: the patch list is parsed as a YAML operation sequence, REA owns exactly one stable entry id (rea-mcp), setup appends or replaces that entry, and serialization edits the existing YAML document in place so user comments and unrelated patches survive an update. Uninstall removes the entry and drops insert operations it emptied.
  • The written entry matches the documented manual integration: id: rea-mcp, name: "@deepseek-ai/dsh-mcp-client", config: { serverName: rea, transport: stdio, command, args }.
  • docs/installation.md gains the table row and replaces the manual-append instructions with the setup workflow.

No MCP server, catalog or provider behavior changes.

Verification

Locally verified on Windows against the installed DeepSeek Harness 0.2.0-rc.2; fork PRs currently receive no CI check runs in this repository, so results below are from this machine:

  • Real run: setup --client dsh --yes into an isolated DSH_HOME that already held a user patch with comments appended the rea-mcp insert with the absolute node.exe and rea.mjs paths, preserving the user patch and its comment verbatim; doctor --client dsh --json reports registration:dsh ok:true classification:healthy; dsh --profile headless with that home loads the patch and spawns the REA MCP client without complaint (the run stops at the model stage with MISSING_CREDENTIAL, expected without a configured API key, and a seeded unrelated other-server entry produced the only spawn error, proving the user's patches still apply).
  • vitest boundary suite dshClientConfiguration.test.ts: path resolution with DSH_HOME/DSH_AGENTS_HOME, append-with-preservation, idempotent rerun (unchanged), doctor aligned, uninstall restores the user patch, stale-entry replacement without duplication, absent-file creation and empty-on-uninstall. clientLifecycle detection updated for the new client.
  • tsc --noEmit clean, oxlint/oxfmt clean on the touched files, npm run docs:check passes.
  • The five symlink-related clientLifecycle failures on this Windows host are pre-existing on main (verified by stashing the change) and unrelated.

🔄 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/1929 **Author:** [@BaaRai](https://github.com/BaaRai) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `feat/dsh-setup-client` --- ### 📝 Commits (10+) - [`9a8ff02`](https://github.com/morluto/rea/commit/9a8ff02678f8650ea18b48b5602f68beffa0a5d0) feat(setup): register DeepSeek Harness through setup, doctor and uninstall - [`2f422bb`](https://github.com/morluto/rea/commit/2f422bb7caf4a132fee69f68d94102ea88b80fa0) fix(setup): carry environment and identity validation into DSH registrations - [`304df1a`](https://github.com/morluto/rea/commit/304df1a0a751f9233e0d2904116ca8d779cc1429) fix(setup): apply Cordis patch order and collapse DSH registrations - [`302d8ca`](https://github.com/morluto/rea/commit/302d8caf0d6251d3c0356a7c651c338aeecde994) fix(setup): repair direct-only registrations and preserve Cordis entry state - [`ba1ada2`](https://github.com/morluto/rea/commit/ba1ada202b952a40bff21606b13006392539c338) fix(setup): preserve Harness row state through identity and refresh repairs - [`c3a93b6`](https://github.com/morluto/rea/commit/c3a93b66b9501ca9e76ef3d461d812fbf7a464cd) fix(setup): preserve Cordis tags and collapse aligned Harness rows - [`62d34d1`](https://github.com/morluto/rea/commit/62d34d15b5c31f7dd63f5ca1157fd6e32b81ff64) fix(setup): drop the unused DSH configuration type - [`078860f`](https://github.com/morluto/rea/commit/078860fbe53b6913005948f30ba34cab97edb300) fix(setup): keep Harness env tags and comment-only patches - [`be257fc`](https://github.com/morluto/rea/commit/be257fce764c2bb9b471e972d56f2a6493647eb3) fix(setup): own Harness rows by entry id and expression state - [`f6a10a6`](https://github.com/morluto/rea/commit/f6a10a6a854dc33234f92d3bee717fd674dc6af7) fix(setup): collapse aliased Harness insertions ### 📊 Changes **22 files changed** (+3149 additions, -181 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md` (+1 -1) 📝 `AGENTS.md` (+3 -1) 📝 `docs/installation.md` (+29 -15) 📝 `docs/testing.md` (+13 -3) 📝 `scripts/verify-deepseek-client.mjs` (+91 -29) 📝 `src/application/ClientConfigurationDocument.ts` (+20 -0) 📝 `src/application/ClientRegistrationEnvironment.ts` (+3 -0) 📝 `src/application/ClientRegistrationStatus.ts` (+15 -0) ➕ `src/application/DshCordisPatch.ts` (+375 -0) ➕ `src/application/DshCordisYaml.ts` (+175 -0) 📝 `src/application/SetupClientConfiguration.ts` (+18 -2) 📝 `src/application/SupportedClients.ts` (+18 -0) 📝 `src/application/Uninstall.ts` (+10 -2) 📝 `src/domain/javascript/electronWrappedCallPaths.test.ts` (+30 -0) 📝 `src/domain/javascript/electronWrappedCallPaths.ts` (+4 -2) 📝 `src/domain/javascript/javascriptSemanticAnalysis.ts` (+23 -5) 📝 `src/domain/javascript/javascriptStaticAnalysis.ts` (+8 -5) 📝 `src/domain/javascript/javascriptSymbolicBindings.ts` (+16 -116) ➕ `tests/acceptance/setup/dshClientSetup.test.ts` (+232 -0) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) _...and 2 more files_ </details> ### 📄 Description ## Summary Fixes #1839. `rea setup --client dsh`, `rea doctor --client dsh` and `rea uninstall --client dsh` now manage the DeepSeek Harness registration. Until now REA documented the manual Cordis YAML patch but could not configure, diagnose or remove it. ## Problem and expected behavior Harness registers MCP clients through a Cordis YAML patch sequence in the home patch, not a `mcpServers` table, so none of the existing client formats applied. The issue asks for the standard setup and doctor workflow: register without hand-editing, diagnose aligned/stale registrations, and maintain or remove the registration without touching unrelated entries. ## Change and scope - New `dsh` client in the supported registry. The configuration file is the home patch `$DSH_HOME/cordis.patch.yml` (`~/.dsh/cordis.patch.yml` when unset); the home patch applies to every Harness profile, so no per-profile edit is needed. Skill destinations follow `~/.agents/skills` (`$DSH_AGENTS_HOME/skills` when configured), matching the existing shared skill home. - `DshCordisPatch` owns the format: the patch list is parsed as a YAML operation sequence, REA owns exactly one stable entry id (`rea-mcp`), setup appends or replaces that entry, and serialization edits the existing YAML document in place so user comments and unrelated patches survive an update. Uninstall removes the entry and drops insert operations it emptied. - The written entry matches the documented manual integration: `id: rea-mcp`, `name: "@deepseek-ai/dsh-mcp-client"`, `config: { serverName: rea, transport: stdio, command, args }`. - `docs/installation.md` gains the table row and replaces the manual-append instructions with the setup workflow. No MCP server, catalog or provider behavior changes. ## Verification Locally verified on Windows against the installed DeepSeek Harness 0.2.0-rc.2; fork PRs currently receive no CI check runs in this repository, so results below are from this machine: - Real run: `setup --client dsh --yes` into an isolated `DSH_HOME` that already held a user patch with comments appended the `rea-mcp` insert with the absolute `node.exe` and `rea.mjs` paths, preserving the user patch and its comment verbatim; `doctor --client dsh --json` reports `registration:dsh ok:true classification:healthy`; `dsh --profile headless` with that home loads the patch and spawns the REA MCP client without complaint (the run stops at the model stage with `MISSING_CREDENTIAL`, expected without a configured API key, and a seeded unrelated `other-server` entry produced the only spawn error, proving the user's patches still apply). - `vitest` boundary suite `dshClientConfiguration.test.ts`: path resolution with `DSH_HOME`/`DSH_AGENTS_HOME`, append-with-preservation, idempotent rerun (`unchanged`), doctor `aligned`, uninstall restores the user patch, stale-entry replacement without duplication, absent-file creation and empty-on-uninstall. `clientLifecycle` detection updated for the new client. - `tsc --noEmit` clean, `oxlint`/`oxfmt` clean on the touched files, `npm run docs:check` passes. - The five symlink-related `clientLifecycle` failures on this Windows host are pre-existing on `main` (verified by stashing the change) and unrelated. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:56:46 +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#4918
No description provided.