Skip to content

Meet Codex plugin packaging standards - #2

Merged
sasdeployer merged 1 commit into
mainfrom
codex/packaging-standards
Aug 30, 2026
Merged

Meet Codex plugin packaging standards#2
sasdeployer merged 1 commit into
mainfrom
codex/packaging-standards

Conversation

@sasdeployer

Copy link
Copy Markdown
Contributor

Ports the Codex packaging audit onto main and resolves its one collision with the host-loading fixes from #1.

The audit was based on 8fcbd49 — the old main, before #1 merged. Six files merged cleanly; one collided.

Codex packaging

  • .codex-plugin/plugin.json points at ./.mcp.json, not ./mcp.json
  • interface.category, privacyPolicyURL, termsOfServiceURL added — both legal URLs verified to return 200
  • category added to the .agents/plugins/marketplace.json entry
  • check_codex_packaging() in validate.py so none of the above can regress

The collision, and how it's resolved

Codex's validator rejects any key but mcpServers in .mcp.json, so the audit drops $schema. But check_mcp_discovery() (added in #1) required .mcp.json to be byte-identical to mcp.json, which keeps $schema for Agent Plugins. Mutually exclusive as written.

.mcp.json now drops $schema, and the check compares the mcpServers map rather than bytes. Drift is still caught — confirmed by pointing .mcp.json at a bogus URL and watching the check trip.

Regression test

.mcp.json exists because without it Claude Code loads zero MCP servers. Dropping $schema could have quietly undone that, so the plugin was reinstalled and inspected:

Skills (4)  Agents (1)  Hooks (1)  MCP servers (1)  nexlayer-mcp

Unchanged. All three gates pass: validate.py, gen-host-components.py --check, claude plugin validate . --strict.

Docs

README distinguishes the two MCP files. PLATFORMS.md drops the "untested against a live Codex install" caveat and records how the root source.path: "./" layout was exercised.

Not verified here

The Codex validator and CODEX_HOME install were run in the audit's sandbox; codex is not on this machine. Same for sync-from-mcp.sh --check, which the audit reports passing against a fresh clone.

Cursor remains the one surface never exercised by a live editor install.

🤖 Generated with Claude Code

Ports the Codex audit patch onto main and resolves its one collision with
the host-loading fixes from #1.

Codex packaging (from the audit, verified with the Codex validator and an
isolated CODEX_HOME install):
- `.codex-plugin/plugin.json` points at `./.mcp.json`, not `./mcp.json`
- `interface.category`, `privacyPolicyURL`, `termsOfServiceURL` added;
  both legal URLs return 200
- `category` added to the `.agents/plugins/marketplace.json` entry
- `check_codex_packaging()` in validate.py so the above cannot regress

Collision resolved:
- Codex's validator rejects any key but `mcpServers` in `.mcp.json`, while
  `mcp.json` must keep the Agent Plugins `$schema`. So `.mcp.json` drops
  `$schema`, and `check_mcp_discovery()` now compares the `mcpServers` map
  rather than bytes. Drift is still caught; confirmed by breaking it.
- Regression-tested the change that motivated `.mcp.json` in the first
  place: Claude Code still reports `MCP servers (1)` with the Codex-shaped
  file. Skills 2, Agents 1, Hooks 1 unchanged.

Docs: README layout table distinguishes the two MCP files; PLATFORMS.md
drops the "untested against a live Codex install" caveat and records how
the root `source.path: "./"` layout was exercised.

Not independently verified here: the Codex validator and CLI install were
run in the audit's sandbox; `codex` is not on this machine.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sasdeployer
sasdeployer merged commit 3819315 into main Aug 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant