@W-23768570 Align plugins with Agent Plugins standard; add MCP config_inspect + project-directory outlet - #613
Merged
Merged
Conversation
…ct + projectDirectory outlet Package the plugins to the open Agent Plugins standard (agent-plugins.org v1.0.0): each plugin gains a root plugin.json with Codex display metadata under extensions."com.openai", and the MCP plugin ships a standard mcp.json. The legacy .codex-plugin/plugin.json manifests are retained during a transition window so Codex CLI < 0.146.0 users are unaffected; both layouts are version-stamped in lockstep by sync-plugin-versions.mjs. MCP: add a config_inspect tool (mirrors `b2c setup inspect`; redaction on by default) that reports the resolved configuration, its sources, and the effective project directory + how it was resolved. Filesystem tools now resolve the project directory with explicit precedence (per-call argument > --project-directory/SFCC_PROJECT_DIRECTORY > cwd) via Services.resolveProjectDirectory and echo the resolved directory back, giving agents an outlet across MCP clients that spawn the server from inconsistent working directories. Extract shared config redaction into the SDK so the CLI inspect command and the MCP tool share one masking implementation (also masks jwtPassphrase).
clavery
requested review from
patricksullivansf,
wei-liu-sf and
yhsieh1
as code owners
August 7, 2026 14:04
clavery
had a problem deploying
to
b2c-docs-preview
August 7, 2026 14:04 — with
GitHub Actions
Failure
…tion - toolsets.md linked ../configuration (one level too high) causing a VitePress dead-link build failure in build-docs and preview builds; correct it to ./configuration#project-directory. - Services.resolveProjectDirectory ran path.resolve() on the configured and override values, which drive-prefixes a POSIX-style absolute path on Windows (D:\path\to\project) and broke the services tests on test-windows. Return the supplied value as-is (cwd is already absolute) and update the tests to assert the pass-through contract.
Contributor
📘 Docs preview🧹 The preview for this PR has been removed (PR closed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GUS: W-23768570
Summary
Aligns our agent plugins with the open Agent Plugins standard (v1.0.0, backed by Amazon/Cursor/Microsoft/OpenAI/Vercel) and gives the MCP server an explicit outlet for the project/working directory, which currently differs across clients.
Agent Plugins standard (non-breaking)
plugin.json($schema+ portable fields), with the Codex display metadata moved inline underextensions."com.openai"(confirmed namespace, per Codex source).mcp.json($schema+mcpServers,type: stdio); the existing.mcp.jsonis kept for Claude Code..codex-plugin/plugin.jsonfiles are retained during a transition window so users on Codex CLI < 0.146.0 (which lack root-plugin.jsonsupport) are unaffected. Codex ≥ 0.146.0 reads the root manifest and treats.codex-pluginas an overlay.sync-plugin-versions.mjskeeps both layouts in version lockstep. Retiring the legacy files later is tracked by W-23753827.MCP working-directory outlet +
config_inspectconfig_inspecttool (DIAGNOSTICS toolset), the MCP equivalent ofb2c setup inspect: reports the resolved configuration, the source of each value, and the effective project directory + how it was resolved. Secrets redacted by default (unmaskopt-in).projectDirectoryargument →--project-directory/SFCC_PROJECT_DIRECTORY→process.cwd()— viaServices.resolveProjectDirectory, and echo the resolved directory back in their output so agents can see which root was used when none was passed.b2c-tooling-sdk/config/redaction.ts) so the CLI inspect command and the MCP tool share one masking implementation. This also fixes a gap:b2c setup inspectnow masksjwtPassphrase.Docs
docs/mcp/configuration.md: new "Project Directory" section explaining the precedence and the spec'scwdmodel.docs/mcp/toolsets.md:config_inspectadded to DIAGNOSTICS.docs/guide/agent-skills.md+skills/README.md: the Agent Plugins standard, client matrix, and dual-manifest transition note.Manual testing
config_inspectand confirm secrets are redacted by default,unmask: truereveals them, and the output includesprojectDirectorywith the correctsource(argument/config/cwd).~) with no--project-directory; confirmconfig_inspectreportssource: "cwd", then set--project-directory/SFCC_PROJECT_DIRECTORYand confirm it reportssource: "config".cartridge_deploywithout adirectoryarg and confirm the resolved directory is reflected in the tool output.b2c setup inspect(no flags): confirmjwtPassphraseis masked;--unmask: confirm it is shown.plugin.jsonwith its display metadata intact and no duplicate entries.