Skip to content

feat(setup): register OMP during setup - #1301

Merged
kaoru0822-kitauji merged 3 commits into
mainfrom
feat/setup-omp-client
Oct 9, 2026
Merged

kaoru0822-kitauji merged 3 commits into
mainfrom
feat/setup-omp-client

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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

Add OMP (oh-my-pi) as a setup, doctor and uninstall client. Setup writes
a type: stdio entry to the user-level agent mcp.json that OMP reads,
following PI_CONFIG_DIR, an absolute PI_CODING_AGENT_DIR and the
OMP_PROFILE/PI_PROFILE named profile. It removes rea from OMP's
disabledServers denylist, which would otherwise hide the registration,
and doctor reports a listed registration as stale.

Closes #1257

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T15:31:03.900396Z 0d564da New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30560b1f74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

PRODUCT_IDENTITY.mcpServerKey,
)
)
!clientServerListedDisabled(parsed, PRODUCT_IDENTITY.mcpServerKey)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor OMP's enabledServers override

When an OMP user file has mcpServers.rea.enabled: false together with enabledServers: ["rea"], OMP's active-profile allowlist forces that server on, but the shared registrationAligned check returns false before this new condition runs. doctor --client omp therefore reports a working registration as stale and prompts unnecessary setup; account for OMP's allowlist when evaluating enabled: false.

AGENTS.md reference: AGENTS.md:L57-L61

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0d564da. clientServerForcedEnabled reads OMP's enabledServers, and registrationAligned no longer treats enabled: false as disabled when the allowlist names rea. disabledServers still wins, matching OMP's docs. The new cases cover enabled: false alone (stale), allowlisted (aligned), and allowlisted plus denylisted (stale). The same commit fixes the format:check failure on the FAQ line.

OMP's user enabledServers allowlist forces an entry with enabled: false
on, unless disabledServers also lists it. Doctor reported such a working
registration as stale. Also format the FAQ client list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d564da3a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

client,
currentCommandPath,
options.platform ?? process.platform,
clientServerForcedEnabled(parsed, PRODUCT_IDENTITY.mcpServerKey),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor OMP enabledServers during update maintenance

When an owned OMP entry has enabled: false but enabledServers includes rea, this new call marks it aligned, yet existingMaintenanceScope rereads the entry and rejects enabled: false at src/application/UpdateMaintenance.ts:73-80. rea update therefore omits --client omp and will not refresh an integration OMP actually runs; apply the same forced-enable check there.

AGENTS.md reference: AGENTS.md:L57-L61

Useful? React with 👍 / 👎.

@kaoru0822-kitauji kaoru0822-kitauji Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 348445a: existingMaintenanceScope keeps an owned entry with enabled: false when clientServerForcedEnabled reports that OMP's allowlist names rea. tests/process-global/updateMaintenance.test.ts covers both cases: excluded without the allowlist, included with it. The same commit moves the repeated client-location env reset into tests/fixtures/clientEnvironment.ts, which brings jscpd back under its threshold.

rea update skipped an owned OMP entry with enabled: false even when
OMP's enabledServers allowlist runs it. Apply the same forced-enable rule
as doctor. Share the client-location environment reset across the client
tests instead of repeating it in each file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 8b4c359 into main Oct 9, 2026
23 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the feat/setup-omp-client branch October 9, 2026 15:51
kaoru0822-kitauji added a commit that referenced this pull request Oct 9, 2026
…#1317)

After #1301 merged, main's duplicated-line share rose to 2.503%, over
jscpd's 2.5% threshold, so Static checks fail on every PR. The new OMP
test repeated the dialect test's imports and npx registration command.
Export that command from the shared client test fixture instead.

Co-authored-by: Claude Opus 5.5 <[email protected]>
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
* feat(setup): register OMP during setup

Add OMP (oh-my-pi) as a setup, doctor and uninstall client. Setup writes
a type: stdio entry to the user-level agent mcp.json that OMP reads,
following PI_CONFIG_DIR, an absolute PI_CODING_AGENT_DIR and the
OMP_PROFILE/PI_PROFILE named profile. It removes rea from OMP's
disabledServers denylist, which would otherwise hide the registration,
and doctor reports a listed registration as stale.

Closes morluto#1257


* fix(setup): honor OMP's enabledServers allowlist in doctor

OMP's user enabledServers allowlist forces an entry with enabled: false
on, unless disabledServers also lists it. Doctor reported such a working
registration as stale. Also format the FAQ client list.


* fix(setup): keep OMP's allowlisted entry in update maintenance

rea update skipped an owned OMP entry with enabled: false even when
OMP's enabledServers allowlist runs it. Apply the same forced-enable rule
as doctor. Share the client-location environment reset across the client
tests instead of repeating it in each file.


---------
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…morluto#1317)

After morluto#1301 merged, main's duplicated-line share rose to 2.503%, over
jscpd's 2.5% threshold, so Static checks fail on every PR. The new OMP
test repeated the dialect test's imports and npx registration command.
Export that command from the shared client test fixture instead.
@morluto morluto added enhancement New feature or request area: setup Setup, packaging, upgrade, install, Doctor, and client registration labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support OMP (oh-my-pi) in rea setup client integrations

2 participants