[PR #1301] [MERGED] feat(setup): register OMP during setup #2780

Closed
opened 2026-10-17 21:10:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1301
Author: @kaoru0822-kitauji
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @kaoru0822-kitauji

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


📝 Commits (3)

  • 30560b1 feat(setup): register OMP during setup
  • 0d564da fix(setup): honor OMP's enabledServers allowlist in doctor
  • 348445a fix(setup): keep OMP's allowlisted entry in update maintenance

📊 Changes

19 files changed (+412 additions, -61 deletions)

View changed files

📝 docs/installation.md (+10 -0)
📝 docs/roadmap.md (+1 -1)
📝 scripts/verify-package-environment.mjs (+4 -0)
📝 scripts/verify-package-update.mjs (+4 -0)
📝 scripts/verify-published-package.mjs (+4 -0)
📝 scripts/verify-windows-package.mjs (+4 -0)
📝 skill-src/reverse-engineer-anything/SKILL.md (+1 -1)
📝 src/application/ClientConfigurationDocument.ts (+42 -0)
📝 src/application/ClientRegistrationStatus.ts (+26 -9)
📝 src/application/SetupClientConfiguration.ts (+23 -7)
📝 src/application/SupportedClients.ts (+51 -0)
📝 src/application/UpdateMaintenance.ts (+7 -1)
📝 tests/boundary/filesystem/clientConfigurationDialects.test.ts (+5 -14)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+3 -13)
📝 tests/boundary/filesystem/clientRegistrationStatus.test.ts (+2 -13)
➕ tests/boundary/filesystem/ompClientConfiguration.test.ts (+174 -0)
➕ tests/fixtures/clientEnvironment.ts (+22 -0)
📝 tests/process-global/updateMaintenance.test.ts (+27 -0)
📝 website/public/faq/index.html (+2 -2)

📄 Description

Summary

Adds OMP (oh-my-pi) as a rea setup / doctor / uninstall client (--client omp), as requested in #1257.

Closes #1257

Behavior

Taken from OMP's own source and docs (packages/utils/src/dirs.ts, docs/mcp-config.md, packages/coding-agent/src/config/mcp-schema.json), not only from the issue:

  • Config file: the user-level <agent dir>/mcp.json, with servers under mcpServers. The agent directory is resolved the way OMP does it:
    • ~/<PI_CONFIG_DIR or .omp>/agent by default; OMP joins PI_CONFIG_DIR to the home directory;
    • an absolute PI_CODING_AGENT_DIR replaces it. OMP resolves a relative value against each process's working directory, so setup ignores a relative one, like Grok Bot's SAND_DATA_ROOT;
    • a named profile (OMP_PROFILE, else legacy PI_PROFILE; an empty OMP_PROFILE or default means the default profile) uses <root>/profiles/<name>/agent and ignores PI_CODING_AGENT_DIR, matching OMP. Invalid profile names (which OMP refuses to start with) keep the default location.
  • Detection marker: the resolved agent directory.
  • Entry: { "type": "stdio", "command", "args", "env"? }. OMP recommends the explicit type for schema-valid config. Doctor also accepts an entry without type, which OMP infers as stdio, and reports a non-stdio entry as invalid.
  • disabledServers: OMP's user denylist hides a server by name regardless of its entry. Like Grok Build's disabled_mcp_servers, setup removes only rea from it (other names and JSONC comments are kept), and doctor reports a listed registration as stale.
  • The disabled/enabled: false handling shared by all clients applies unchanged.

Env isolation lists in the client tests and the package verifiers now also clear OMP_PROFILE, PI_PROFILE, PI_CONFIG_DIR and PI_CODING_AGENT_DIR, so a developer's OMP settings cannot redirect them. Docs updated: the installation table plus an OMP note, the roadmap, the skill's client list, and the website FAQ. The README translations link to the installation table and need no change.

Verification

  • New tests/boundary/filesystem/ompClientConfiguration.test.ts:
    • path resolution for the default location, PI_CONFIG_DIR, absolute vs relative PI_CODING_AGENT_DIR, and OMP_PROFILE/PI_PROFILE precedence, including empty, default and invalid names;
    • denylist removal that keeps other names and comments, then idempotent unchanged, then uninstall;
    • doctor stale when listed, aligned without type, invalid for type: "http".
  • omp added to the shared register → read back → doctor aligned → uninstall dialect test, and to the detection-order test.
  • npm run test:focused -- on all tests/boundary/filesystem/client*.test.ts, the new file, windowsNpxRegistration and tests/process-global/updateMaintenance.test.ts (131 passed); npm run check:changed; npm run docs:check; tsc --noEmit.
  • Real CLI in an isolated HOME on macOS. setup --client omp --dry-run plans the update of ~/.omp/agent/mcp.json. setup --client omp --yes returns ready / configured, keeps a JSONC comment and the other server, and turns disabledServers: ["rea","other"] into ["other"]. doctor --client omp then reports aligned.
  • The entries setup writes (with and without env, plus disabledServers) validate against OMP's published mcp-schema.json with Ajv 2020.

Not verified: a live OMP session loading the server. OMP isn't installed here; the issue author confirmed this entry shape mounts all REA tools on Windows and offered to test a build.

🤖 Generated with Claude Code


🔄 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/1301 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `feat/setup-omp-client` --- ### 📝 Commits (3) - [`30560b1`](https://github.com/morluto/rea/commit/30560b1f74f40a4162b9292747d6be37b361a9e0) feat(setup): register OMP during setup - [`0d564da`](https://github.com/morluto/rea/commit/0d564da3a4ede75e52a40c618a81c4b198a88f30) fix(setup): honor OMP's enabledServers allowlist in doctor - [`348445a`](https://github.com/morluto/rea/commit/348445a029519612d55e72724c05c6edf3530fc3) fix(setup): keep OMP's allowlisted entry in update maintenance ### 📊 Changes **19 files changed** (+412 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+10 -0) 📝 `docs/roadmap.md` (+1 -1) 📝 `scripts/verify-package-environment.mjs` (+4 -0) 📝 `scripts/verify-package-update.mjs` (+4 -0) 📝 `scripts/verify-published-package.mjs` (+4 -0) 📝 `scripts/verify-windows-package.mjs` (+4 -0) 📝 `skill-src/reverse-engineer-anything/SKILL.md` (+1 -1) 📝 `src/application/ClientConfigurationDocument.ts` (+42 -0) 📝 `src/application/ClientRegistrationStatus.ts` (+26 -9) 📝 `src/application/SetupClientConfiguration.ts` (+23 -7) 📝 `src/application/SupportedClients.ts` (+51 -0) 📝 `src/application/UpdateMaintenance.ts` (+7 -1) 📝 `tests/boundary/filesystem/clientConfigurationDialects.test.ts` (+5 -14) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+3 -13) 📝 `tests/boundary/filesystem/clientRegistrationStatus.test.ts` (+2 -13) ➕ `tests/boundary/filesystem/ompClientConfiguration.test.ts` (+174 -0) ➕ `tests/fixtures/clientEnvironment.ts` (+22 -0) 📝 `tests/process-global/updateMaintenance.test.ts` (+27 -0) 📝 `website/public/faq/index.html` (+2 -2) </details> ### 📄 Description ## Summary Adds [OMP (oh-my-pi)](https://github.com/can1357/oh-my-pi) as a `rea setup` / `doctor` / `uninstall` client (`--client omp`), as requested in #1257. Closes #1257 ## Behavior Taken from OMP's own source and docs (`packages/utils/src/dirs.ts`, `docs/mcp-config.md`, `packages/coding-agent/src/config/mcp-schema.json`), not only from the issue: - **Config file:** the user-level `<agent dir>/mcp.json`, with servers under `mcpServers`. The agent directory is resolved the way OMP does it: - `~/<PI_CONFIG_DIR or .omp>/agent` by default; OMP joins `PI_CONFIG_DIR` to the home directory; - an absolute `PI_CODING_AGENT_DIR` replaces it. OMP resolves a relative value against each process's working directory, so setup ignores a relative one, like Grok Bot's `SAND_DATA_ROOT`; - a named profile (`OMP_PROFILE`, else legacy `PI_PROFILE`; an empty `OMP_PROFILE` or `default` means the default profile) uses `<root>/profiles/<name>/agent` and ignores `PI_CODING_AGENT_DIR`, matching OMP. Invalid profile names (which OMP refuses to start with) keep the default location. - **Detection marker:** the resolved agent directory. - **Entry:** `{ "type": "stdio", "command", "args", "env"? }`. OMP recommends the explicit `type` for schema-valid config. Doctor also accepts an entry without `type`, which OMP infers as stdio, and reports a non-stdio entry as invalid. - **`disabledServers`:** OMP's user denylist hides a server by name regardless of its entry. Like Grok Build's `disabled_mcp_servers`, setup removes only `rea` from it (other names and JSONC comments are kept), and doctor reports a listed registration as `stale`. - The `disabled`/`enabled: false` handling shared by all clients applies unchanged. Env isolation lists in the client tests and the package verifiers now also clear `OMP_PROFILE`, `PI_PROFILE`, `PI_CONFIG_DIR` and `PI_CODING_AGENT_DIR`, so a developer's OMP settings cannot redirect them. Docs updated: the installation table plus an OMP note, the roadmap, the skill's client list, and the website FAQ. The README translations link to the installation table and need no change. ## Verification - New `tests/boundary/filesystem/ompClientConfiguration.test.ts`: - path resolution for the default location, `PI_CONFIG_DIR`, absolute vs relative `PI_CODING_AGENT_DIR`, and `OMP_PROFILE`/`PI_PROFILE` precedence, including empty, `default` and invalid names; - denylist removal that keeps other names and comments, then idempotent `unchanged`, then uninstall; - doctor `stale` when listed, `aligned` without `type`, `invalid` for `type: "http"`. - `omp` added to the shared register → read back → doctor `aligned` → uninstall dialect test, and to the detection-order test. - `npm run test:focused --` on all `tests/boundary/filesystem/client*.test.ts`, the new file, `windowsNpxRegistration` and `tests/process-global/updateMaintenance.test.ts` (131 passed); `npm run check:changed`; `npm run docs:check`; `tsc --noEmit`. - Real CLI in an isolated `HOME` on macOS. `setup --client omp --dry-run` plans the update of `~/.omp/agent/mcp.json`. `setup --client omp --yes` returns `ready` / `configured`, keeps a JSONC comment and the `other` server, and turns `disabledServers: ["rea","other"]` into `["other"]`. `doctor --client omp` then reports `aligned`. - The entries setup writes (with and without `env`, plus `disabledServers`) validate against OMP's published `mcp-schema.json` with Ajv 2020. Not verified: a live OMP session loading the server. OMP isn't installed here; the issue author confirmed this entry shape mounts all REA tools on Windows and offered to test a build. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:10 +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#2780
No description provided.