Skip to content

feat(plugins): ship release-pinned Claude Code and Codex plugins - #2815

Closed
morluto wants to merge 41 commits into
mainfrom
codex/review-fixes-pr-1977
Closed

morluto wants to merge 41 commits into
mainfrom
codex/review-fixes-pr-1977

Conversation

@morluto

@morluto morluto commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

REA's Claude Code and Codex plugins need a matching skill, MCP launcher, and recovery commands from one release artifact. This follow-up preserves @GamerDubz’s proposal and commit history from #1977; the original fork rejected the maintainer push, so the fixes are published on this maintainer-owned branch.

Both plugin manifests ship in the existing npm artifact and select the canonical generated skills/ tree. Both marketplaces select that exact npm version. Release Please advances the manifests, MCP declaration, marketplaces, and recovery commands together. No new package publication is performed by this PR.

npm-shrinkwrap.json is the sole dependency lock for installation, metadata, licenses, release verification, and caches; the duplicate root package-lock.json is removed. The manifest has no overrides, and package verification checks the lock and dependencies required by Claude’s npm-source install policy.

The launcher runs the matching installed runtime in process. Git checkouts, worktrees, and source exports use the exact registry pin from an owned empty directory even if same-version dist files exist. Setup registrations and the launcher share the package-runner argv owner; build and typecheck caches cover its MJS implementation and MTS declaration. Windows source plugins require the documented runtime build and Windows x64 native addon for the existing owned process supervisor.

Validation: pinned Node 24.18.0/npm 11.16.0; npm ci; metadata and license generation; check:ci; check:fast; docs:check; package verification and npm pack --dry-run; test discovery (1,183 files); focused release, dependency, cache, documentation, MCP identity, CI selection, and launcher regressions; six Python experiment-provenance tests. The package verifier checks CLI diagnostics and runs the full MCP catalog/Evidence workflow through the installed plugin launcher. Current-head GitHub Actions results are tracked on this PR.

Actual Claude/Codex plugin loading and Windows source-plugin execution remain unverified locally. The first npm release containing the plugin manifests is still required before marketplace installation becomes available. Simulated providers in package checks do not establish real-provider behavior.

Integrated current main 20e4f83097511090205c9f867c62bca0152e6676 and resolved dependency-lock/inventory conflicts. All six outstanding review threads were addressed with root-cause, structural-fix, and validation details.

Original contribution: #1977 by @GamerDubz.

GamerDubz and others added 29 commits October 11, 2026 23:53
Add .claude-plugin/plugin.json at the repository root so Claude Code plugin
directories and marketplaces can list REA. The manifest bundles the authored
reverse-engineer-anything skill from .agents/skills/ and registers the
existing stdio server through npx; it adds no second distribution artifact.

Release Please now bumps the manifest version with each release, which is
when installed plugins refresh the bundled skill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add .codex-plugin/plugin.json so Codex loads REA with its own display
metadata, and make the repository a single-plugin marketplace for both
clients through .agents/plugins/marketplace.json and
.claude-plugin/marketplace.json. Users can now add morluto/rea as a
marketplace and install the plugin without waiting for a directory listing.

Release Please bumps the Codex manifest version alongside the Claude one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Release PRs now bump .claude-plugin/plugin.json and .codex-plugin/plugin.json,
but the publication history check rejected them as post-notes product
changes and the release configuration test still expected the previous
extra-files list. Admit both manifests in the release-only allowlist, expect
them in the Release Please configuration, and assert that each manifest
version matches package.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The release-only allowlist gained both plugin manifests without a test
naming them. The publication history test now commits both manifests in
the release commit, so it fails with "Product changed after notes target"
if either path is dropped from the allowlist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex's plugin validator rejects a manifest whose interface omits
capabilities. Declare them in .codex-plugin/plugin.json and assert the
required interface fields in the release configuration test.

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

The Codex manifest left startup_timeout_sec at the client default, unlike
the registration rea setup writes, so a cold npx start could be cut off
before tools appeared. Carry the owned timeout in the Codex server entry
and assert it against MCP_STARTUP_POLICY.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
rea doctor's client and skill checks only read state that rea setup
manages, so a plugin-only install reports missing and recommends the
second registration the plugin section warns against. Say so, and point
plugin users at the client's own plugin listing and provider-scoped
doctor checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A plugin-only install has no rea executable on PATH, so the documented
rea doctor command failed with "command not found". Show the package
runner form instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both manifests started `rea-agents@latest`, so a server start could run a
different package version from the installed plugin and bundled skill, and
would execute whatever npm's latest tag pointed at. Pin the launch to the
manifest version and have Release Please rewrite it with each release.

Release Please reserializes JSON extra-files with JSON.stringify, which the
formatter would reject in every release PR. Store both manifests in that
form, exempt them from the formatter, and assert the form in conformance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The bundled skill said installing it never registers the MCP server and
sent every missing-tools case to rea doctor --client and rea setup. For a
plugin-only install those report missing and setup would add a second rea
server. Tell the agent how to recognise a plugin install and to use the
client's own plugin and MCP listings instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The publication checkpoint validated package, lockfile, server and
generated metadata versions but not the plugin manifests, so a candidate
could be tagged with a manifest version or pinned server launch left at
the previous release. Validate both fields in both manifests.

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

The checkpoint stripped an optional rea-agents@ prefix before comparing,
so a manifest launching a bare release number passed even though npx
would fetch a package named after that number. Compare the whole
specifier and report the launched value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e notes target

The publication history check admitted the plugin manifests whole, so a
release could change plugin behavior, such as the bundled skill path or the
server environment, and still pass as release-only. Compare each manifest
across the release with its version and pinned server launch blanked, and
treat any other difference as a product change.

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

The version-only comparison blanked the whole launch argument, so a release
that swapped rea-agents for another package passed the notes check as a
version bump. Mask only the version after the last "@" and test a changed
package name.

The plugin readiness command in the installation guide now uses the pinned
release version, so its report describes the server the plugin starts.

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

The conformance test read only the first Release Please version block, so
adding the plugin readiness block ahead of the MCP Registry example left
the registry example unchecked. Check every block, and require each known
example to sit inside exactly one, so a stale version or a lost marker in
any of them fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plugin guidance said a package-runner doctor report describes the
server the plugin starts. Doctor reads the invoking shell's environment,
while the plugin server inherits the client's, so the two can disagree
about settings such as GHIDRA_INSTALL_DIR. Point plugin users and the
bundled recovery guide at binary_session tool availability, and say what
the terminal check does and does not cover.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The plugin recovery section left the package-runner version to the skill's
generic @latest fallback, so a doctor run could describe a newer release
than the server an installed plugin starts. Tell the agent to use the
version pinned in the plugin manifest.

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: b7dabdbc4f

ℹ️ 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".

Comment thread scripts/plugin-mcp-launcher.mjs Resolved

@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: a85bfed8dc

ℹ️ 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".

Comment thread scripts/verify-package-pack.mjs Resolved
Comment thread package.json Resolved

@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: 9de80b4deb

ℹ️ 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".

Comment thread .claude-plugin/marketplace.json Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner Author

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

Release Please's JSON updater rewrote the entire launcher argument and would erase the package name from rea-agents@VERSION. Both .claude-plugin/plugin.json and .mcp.json now carry only a scalar version; scripts/plugin-mcp-launcher.mjs constructs rea-agents@<version> at the launch boundary. The GenericJson source regression verifies the complete resulting argv. Published in a85bfed; pinned formatting and diff-check only, tests not run.

review thread

The release checkpoint treated the Codex mcpServers reference as an inline launch object. It now validates .codex-plugin/plugin.json's version and ./.mcp.json reference separately, reads the companion server config at the same candidate Git SHA, validates its node command/launcher path/cwd/timeout, and compares its scalar version pin. Updated the release checkpoint fixture to ship the companion layout. Published in a85bfed; pinned formatting and diff-check only, tests not run.

review thread

.mcp.json changes its pinned argument in every release, but release-history verification classified the whole file as product behavior. It now includes the companion file in version-only metadata and blanks only args[1] while retaining command, launcher path, cwd, timeout, and other config. The release-history fixture now includes the companion version bump. Published in a85bfed; formatting and diff-check only, tests not run.

review thread

Cold-start policy was missing from the actual Codex companion server entry after the plugin manifest became a reference. Added startup_timeout_sec: 30 to .mcp.json and changed conformance coverage to read that server file. The release checkpoint also validates a positive timeout on the Codex candidate. Published in a85bfed; pinned formatting and diff-check only, tests not run.

review thread

The package argv owner is src/application/PackageRunnerCommand.mjs; Git source bootstrap imports it directly, while npm plugin artifacts import the build-emitted dist/application/PackageRunnerCommand.mjs. The package files allowlist no longer ships src/, and the pack verifier requires only the actual dist runtime path while retaining its blanket rejection of package/src/. This resolves the source/artifact contradiction without weakening the source exclusion. Published in 9de80b4; git diff --check only. Pinned oxfmt was unavailable; no tests/build/package/verify/typecheck ran.

review thread

The Windows fallback previously signaled only cmd.exe. It now launches through the repository's spawnOwnedProviderProcess Windows Job Object owner, forwards protocol streams, and invokes verified tree cleanup on shutdown. If the owned supervisor is unavailable, it fails before spawning; if cleanup is unverified it retains the ownership directory. This avoids an unsafe PID-only fallback. Published in a85bfed; source inspection/formatting/diff-check only. Windows Job Object execution remains unverified because no provider/runtime or tests were run.

@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: bc6eb789ce

ℹ️ 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".

Comment thread scripts/lib/release-notes.mjs Resolved
Comment thread package.json Resolved
Comment thread npm-shrinkwrap.json Resolved

@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: f45cb4b92a

ℹ️ 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".

Comment thread scripts/plugin-mcp-launcher.mjs Resolved
Comment thread scripts/plugin-mcp-launcher.mjs Resolved

@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: 3f17e75b4b

ℹ️ 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".

Comment thread package-lock.json Resolved

@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: ff5af6a7cf

ℹ️ 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".

Comment on lines +215 to +218
cleanupPromise ??= owned
.cleanup?.()
.then((result) => {
if (!result.cleaned) {

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 Retry failed Windows cleanup attempts

When the first signal-triggered owned.cleanup() returns cleaned: false, the supervisor deliberately makes that cleanup retryable, but this cached promise remains set. The child is still live, its close handler therefore never runs, and subsequent SIGINT/SIGTERM/SIGHUP events cannot retry cleanup, leaving the plugin and owned process tree stuck indefinitely after a transient cleanup failure. Clear or replace the cached promise when cleanup is not verified so a later signal can retry.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Comment on lines +235 to +239
child.once("error", (cause) => {
process.stderr.write(
`REA plugin Windows process supervisor failed: ${cause.message}\n`,
);
process.exitCode = 1;

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 Clean up the Windows job after supervisor errors

If WindowsOwnedProcess emits error because native job polling or validation fails, its polling loop stops without releasing the retained job, but this handler only sets process.exitCode. No close event follows to remove the working directory, and the live job can keep the launcher running indefinitely; invoke the owned cleanup path here and retain/report ownership if that cleanup cannot be verified.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Comment on lines +175 to +177
owned = await spawnOwnedProviderProcess({
command,
arguments: args,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Windows source plugins cannot start

The Windows source fallback passes bare cmd.exe to spawnOwnedProviderProcess. That reaches spawnProcess, which requires an absolute drive path. Even after the documented build and native-addon steps, the plugin exits before starting npx, so no MCP server starts.

Resolve the Windows command interpreter to an absolute path before calling the owned launcher.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/plugin-mcp-launcher.mjs
Line: 175-177

Comment:
**Windows source plugins cannot start**

The Windows source fallback passes bare `cmd.exe` to `spawnOwnedProviderProcess`. That reaches `spawnProcess`, which requires an absolute drive path. Even after the documented build and native-addon steps, the plugin exits before starting `npx`, so no MCP server starts.

Resolve the Windows command interpreter to an absolute path before calling the owned launcher.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

Comment on lines 149 to 151
package_lock_sha256: await fileSha(
resolve(values["runtime-root"], "package-lock.json"),
resolve(values["runtime-root"], "npm-shrinkwrap.json"),
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Frozen baseline measurements now fail

Both this driver and agent-trial.py now read only npm-shrinkwrap.json from --runtime-root. The documented frozen baseline 42b0ed126df7d5b908ac369715378d5e519051b7 contains only package-lock.json, so measurements against it fail while reading the lockfile, before starting MCP or Codex.

Prefer the shrinkwrap when present and fall back to the selected runtime's original lockfile without regenerating it. This is non-blocking, but it prevents contributors from reproducing the documented baseline.

Prompt To Fix With AI
This is a comment left during a code review.
Path: experiments/analysis-efficiency/measure.mjs
Line: 149-151

Comment:
**Frozen baseline measurements now fail**

Both this driver and `agent-trial.py` now read only `npm-shrinkwrap.json` from `--runtime-root`. The documented frozen baseline `42b0ed126df7d5b908ac369715378d5e519051b7` contains only `package-lock.json`, so measurements against it fail while reading the lockfile, before starting MCP or Codex.

Prefer the shrinkwrap when present and fall back to the selected runtime's original lockfile without regenerating it. This is non-blocking, but it prevents contributors from reproducing the documented baseline.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex

gensokyo-dev added a commit that referenced this pull request Oct 27, 2026
)

Ship Claude Code and Codex from one release-pinned npm artifact with bundled runtime dependencies, extraction-only MCP qualification, plugin-aware recovery, and synchronized release metadata.

Integrates #2815 and the original proposal #1977. The original commits remain available on the PR branch; retain their author and assistant credit in this squash.

Validation: required CI passed, real Codex/Claude loading verified, and reviewed packaging/recovery findings addressed.

Co-authored-by: GamerDubz <[email protected]>
Co-authored-by: morluto <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@morluto morluto added the area: build Build, CI, packaging, and publishing label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing area: cli CLI adapter and one-shot commands area: domain Domain logic, errors, and pure functions area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request P2: medium Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants