[PR #3100] feat(setup): support OpenClaw native MCP and active profiles #5615

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3100
Author: @matbrgz
Created: 10/14/2026
Status: 🔄 Open

Base: main ← Head: feat/openclaw-client


📝 Commits (5)

  • c8952fb feat(setup): register OpenClaw client and skill discovery
  • de17075 fix(tests): isolate inherited OpenClaw configuration paths
  • 83e3554 Merge remote-tracking branch 'upstream/main' into fix/pr-3100-native-openclaw
  • d3bfb64 fix(ci): keep advertised ABI patterns portable across regex modes
  • d7a793d fix(setup): use OpenClaw native registry and profile semantics

📊 Changes

21 files changed (+971 additions, -12 deletions)

View changed files

📝 docs/client-configuration.md (+25 -0)
📝 docs/client-verification.md (+11 -0)
📝 docs/installation.md (+1 -0)
➕ docs/specs/agent-environments/openclaw/plan.md (+53 -0)
➕ docs/specs/agent-environments/openclaw/spec.md (+29 -0)
➕ docs/specs/agent-environments/openclaw/tasks.md (+7 -0)
📝 licenses/npm-dependencies.txt (+2 -2)
📝 licenses/npm-runtime-notices.txt (+33 -1)
📝 package-lock.json (+1 -1)
📝 package.json (+2 -0)
➕ scripts/verify-openclaw-client.mjs (+254 -0)
📝 src/application/ClientConfigurationDocument.ts (+14 -3)
📝 src/application/ClientRegistrationStatus.ts (+10 -1)
➕ src/application/OpenClawClientPaths.ts (+29 -0)
➕ src/application/OpenClawConfiguration.ts (+140 -0)
📝 src/application/SupportedClients.ts (+26 -0)
📝 src/domain/flutter/flutterBuildAnalysis.ts (+1 -1)
📝 src/server/http/NodeHttpRequestOwner.ts (+2 -3)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)
➕ tests/boundary/filesystem/openclawClientConfiguration.test.ts (+325 -0)

...and 1 more files

📄 Description

Summary

Fixes #3034. Register REA in OpenClaw's native mcp.servers.rea registry and install its personal skill in the active profile. The previous implementation wrote an unsupported Claude-style mcpServers table and treated OPENCLAW_HOME as the state directory, so REA's readback could report alignment for configuration the client did not consume.

Change and scope

  • Add an OpenClaw dialect for the published 2026.10.5 native registry: explicit stdio transport, enablement, command, arguments and supplied environment. This uses OpenClaw's native registry, separately from mcporter.
  • Share one path resolver across setup, doctor, skill installation and uninstall: effective home, independent state/config overrides, tilde/relative expansion, and managed-skill precedence. Isolate all relevant inherited overrides in filesystem tests; respect native read-only/Nix modes.
  • Parse JSON5 and edit only REA's property, preserving unrelated source text, comments and settings. Reject duplicate ownership-path members and include-directed MCP configuration before writing. Keep existing backup, idempotence and uninstall ownership contracts.
  • Add a real native-client verifier, specs under docs/specs/agent-environments/openclaw/, and the JSON5 production dependency with refreshed runtime notices/inventory.
  • Merge current main (d8a9673fc). Correct the inherited portable Flutter ABI regex and HTTP formatting failures in a separate commit. Main supplies the Linux spawn-limit fixture correction.

Contract and boundary impact

The application client-configuration owner selects the native table and paths; CLI setup still previews changes and requires approval. No tool names, Evidence or provider authority contracts change. This is ordinary setup/client integration within existing boundaries; a new target-execution or protection-recovery scope decision is not applicable. Product setup does not install or upgrade OpenClaw.

Expected effects:

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

These cover selected configuration/skill files and the registered stdio REA process. Native verification ran only in disposable profiles, without a gateway or model turn.

Validation performed

  • Focused suites across 12 files: 235 passed, 12 existing platform-specific cases skipped. Covers OpenClaw/JSON5, paths, lifecycle, doctor, transaction preservation, duplicate ownership, shared dialects/environment/BOM, portable advertised patterns and Electron CLI/MCP callsite fixtures.
  • npm run check — passed, including typecheck, lint, formatting, dependency/metadata checks and architecture guards.
  • npm run docs:check — passed, including runtime license notices and inventory.
  • node scripts/verify-openclaw-client.mjs with the published OpenClaw 2026.10.5 (1b58cb9) — passed on darwin/arm64. Native path discovery, config validation and registry readback succeeded for home, config-only and combined state/config profiles. The native stdio probe launched this selected REA runtime and discovered 213 tools. Public REA setup/doctor/uninstall, skill destinations, backups, idempotence and unrelated source preservation passed. Process lineage was positively verified empty before temporary-profile removal.
  • The downloaded client archive's SHA-512 matched official npm registry metadata; the pinned sources and receipt scope are recorded in the spec plan.

Compatibility and remaining coverage

Requires OpenClaw with the native MCP registry verified above. Older versions require their supported bridge; this change does not register into mcporter or migrate previous invalid top-level entries. Native Windows, agent/model turns and production tarball/update verification were not exercised in this pass; the native acceptance used this built checkout. No controlled token, time, CPU or process-family memory comparison was performed, and no performance gain is claimed.

References: native MCP registry, pinned server schema, config paths, skill directory precedence.

Author readiness

Human owner: @matbrgz

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

🔄 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/3100 **Author:** [@matbrgz](https://github.com/matbrgz) **Created:** 10/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/openclaw-client` --- ### 📝 Commits (5) - [`c8952fb`](https://github.com/morluto/rea/commit/c8952fb24b8fda935d9ba95933ee4d79733c3092) feat(setup): register OpenClaw client and skill discovery - [`de17075`](https://github.com/morluto/rea/commit/de170759a3fd9a0e7b3b4a7e5ecd31c3172c86ed) fix(tests): isolate inherited OpenClaw configuration paths - [`83e3554`](https://github.com/morluto/rea/commit/83e3554eaa12b7cfdbc46c4406a08fd0761eedcc) Merge remote-tracking branch 'upstream/main' into fix/pr-3100-native-openclaw - [`d3bfb64`](https://github.com/morluto/rea/commit/d3bfb640c7639b0341d13bf4a0045ec77bc0c6e8) fix(ci): keep advertised ABI patterns portable across regex modes - [`d7a793d`](https://github.com/morluto/rea/commit/d7a793d3f0cc8aecfeb20bf166b0482e353d75fb) fix(setup): use OpenClaw native registry and profile semantics ### 📊 Changes **21 files changed** (+971 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/client-configuration.md` (+25 -0) 📝 `docs/client-verification.md` (+11 -0) 📝 `docs/installation.md` (+1 -0) ➕ `docs/specs/agent-environments/openclaw/plan.md` (+53 -0) ➕ `docs/specs/agent-environments/openclaw/spec.md` (+29 -0) ➕ `docs/specs/agent-environments/openclaw/tasks.md` (+7 -0) 📝 `licenses/npm-dependencies.txt` (+2 -2) 📝 `licenses/npm-runtime-notices.txt` (+33 -1) 📝 `package-lock.json` (+1 -1) 📝 `package.json` (+2 -0) ➕ `scripts/verify-openclaw-client.mjs` (+254 -0) 📝 `src/application/ClientConfigurationDocument.ts` (+14 -3) 📝 `src/application/ClientRegistrationStatus.ts` (+10 -1) ➕ `src/application/OpenClawClientPaths.ts` (+29 -0) ➕ `src/application/OpenClawConfiguration.ts` (+140 -0) 📝 `src/application/SupportedClients.ts` (+26 -0) 📝 `src/domain/flutter/flutterBuildAnalysis.ts` (+1 -1) 📝 `src/server/http/NodeHttpRequestOwner.ts` (+2 -3) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) ➕ `tests/boundary/filesystem/openclawClientConfiguration.test.ts` (+325 -0) _...and 1 more files_ </details> ### 📄 Description ## Summary Fixes #3034. Register REA in OpenClaw's native `mcp.servers.rea` registry and install its personal skill in the active profile. The previous implementation wrote an unsupported Claude-style `mcpServers` table and treated `OPENCLAW_HOME` as the state directory, so REA's readback could report alignment for configuration the client did not consume. ## Change and scope - Add an OpenClaw dialect for the published 2026.10.5 native registry: explicit stdio transport, enablement, command, arguments and supplied environment. This uses OpenClaw's native registry, separately from mcporter. - Share one path resolver across setup, doctor, skill installation and uninstall: effective home, independent state/config overrides, tilde/relative expansion, and managed-skill precedence. Isolate all relevant inherited overrides in filesystem tests; respect native read-only/Nix modes. - Parse JSON5 and edit only REA's property, preserving unrelated source text, comments and settings. Reject duplicate ownership-path members and include-directed MCP configuration before writing. Keep existing backup, idempotence and uninstall ownership contracts. - Add a real native-client verifier, specs under `docs/specs/agent-environments/openclaw/`, and the JSON5 production dependency with refreshed runtime notices/inventory. - Merge current main (`d8a9673fc`). Correct the inherited portable Flutter ABI regex and HTTP formatting failures in a separate commit. Main supplies the Linux spawn-limit fixture correction. ## Contract and boundary impact The application client-configuration owner selects the native table and paths; CLI setup still previews changes and requires approval. No tool names, Evidence or provider authority contracts change. This is ordinary setup/client integration within existing boundaries; a new target-execution or protection-recovery scope decision is not applicable. Product setup does not install or upgrade OpenClaw. Expected effects: - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [x] Inject instrumentation or run scripts/code. - [x] Change process memory, registers, files, or configuration. These cover selected configuration/skill files and the registered stdio REA process. Native verification ran only in disposable profiles, without a gateway or model turn. ## Validation performed - Focused suites across 12 files: **235 passed, 12 existing platform-specific cases skipped**. Covers OpenClaw/JSON5, paths, lifecycle, doctor, transaction preservation, duplicate ownership, shared dialects/environment/BOM, portable advertised patterns and Electron CLI/MCP callsite fixtures. - `npm run check` — passed, including typecheck, lint, formatting, dependency/metadata checks and architecture guards. - `npm run docs:check` — passed, including runtime license notices and inventory. - `node scripts/verify-openclaw-client.mjs` with the published **OpenClaw 2026.10.5 (1b58cb9)** — passed on darwin/arm64. Native path discovery, config validation and registry readback succeeded for home, config-only and combined state/config profiles. The native stdio probe launched this selected REA runtime and discovered **213 tools**. Public REA setup/doctor/uninstall, skill destinations, backups, idempotence and unrelated source preservation passed. Process lineage was positively verified empty before temporary-profile removal. - The downloaded client archive's SHA-512 matched official npm registry metadata; the pinned sources and receipt scope are recorded in the spec plan. ## Compatibility and remaining coverage Requires OpenClaw with the native MCP registry verified above. Older versions require their supported bridge; this change does not register into mcporter or migrate previous invalid top-level entries. Native Windows, agent/model turns and production tarball/update verification were not exercised in this pass; the native acceptance used this built checkout. No controlled token, time, CPU or process-family memory comparison was performed, and no performance gain is claimed. References: [native MCP registry](https://docs.openclaw.ai/cli/mcp), [pinned server schema](https://github.com/openclaw/openclaw/blob/v2026.10.5/src/config/zod-schema.mcp-server.ts), [config paths](https://github.com/openclaw/openclaw/blob/v2026.10.5/src/config/paths.ts), [skill directory precedence](https://github.com/openclaw/openclaw/blob/v2026.10.5/src/infra/config-dir.ts). ## Author readiness Human owner: @matbrgz - [ ] 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. --- <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#5615
No description provided.