Skip to content

@W-23768570 Align plugins with Agent Plugins standard; add MCP config_inspect + project-directory outlet - #613

Merged
clavery merged 2 commits into
mainfrom
feature/agent-plugins
Aug 12, 2026
Merged

@W-23768570 Align plugins with Agent Plugins standard; add MCP config_inspect + project-directory outlet#613
clavery merged 2 commits into
mainfrom
feature/agent-plugins

Conversation

@clavery

@clavery clavery commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

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)

  • Each skill plugin and the MCP plugin now has a root plugin.json ($schema + portable fields), with the Codex display metadata moved inline under extensions."com.openai" (confirmed namespace, per Codex source).
  • The MCP plugin ships a standard mcp.json ($schema + mcpServers, type: stdio); the existing .mcp.json is kept for Claude Code.
  • The legacy .codex-plugin/plugin.json files are retained during a transition window so users on Codex CLI < 0.146.0 (which lack root-plugin.json support) are unaffected. Codex ≥ 0.146.0 reads the root manifest and treats .codex-plugin as an overlay. sync-plugin-versions.mjs keeps both layouts in version lockstep. Retiring the legacy files later is tracked by W-23753827.
  • Client support: Codex/ChatGPT, Cursor, GitHub Copilot, VS Code, and Kiro read the standard directly; Claude Code remains the marketplace edge case, documented as such.

MCP working-directory outlet + config_inspect

  • New config_inspect tool (DIAGNOSTICS toolset), the MCP equivalent of b2c setup inspect: reports the resolved configuration, the source of each value, and the effective project directory + how it was resolved. Secrets redacted by default (unmask opt-in).
  • Filesystem-rooted tools resolve the project directory with explicit precedence — per-call projectDirectory argument → --project-directory/SFCC_PROJECT_DIRECTORYprocess.cwd() — via Services.resolveProjectDirectory, and echo the resolved directory back in their output so agents can see which root was used when none was passed.
  • Shared config redaction extracted into the SDK (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 inspect now masks jwtPassphrase.

Docs

  • docs/mcp/configuration.md: new "Project Directory" section explaining the precedence and the spec's cwd model.
  • docs/mcp/toolsets.md: config_inspect added to DIAGNOSTICS.
  • docs/guide/agent-skills.md + skills/README.md: the Agent Plugins standard, client matrix, and dual-manifest transition note.

Manual testing

  • With the MCP server running, invoke config_inspect and confirm secrets are redacted by default, unmask: true reveals them, and the output includes projectDirectory with the correct source (argument / config / cwd).
  • Launch the MCP server from a directory other than the project root (e.g. ~) with no --project-directory; confirm config_inspect reports source: "cwd", then set --project-directory/SFCC_PROJECT_DIRECTORY and confirm it reports source: "config".
  • Run cartridge_deploy without a directory arg and confirm the resolved directory is reflected in the tool output.
  • b2c setup inspect (no flags): confirm jwtPassphrase is masked; --unmask: confirm it is shown.
  • In Codex (≥ 0.146.0), add/refresh the marketplace and confirm each plugin installs from the root plugin.json with its display metadata intact and no duplicate entries.

…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 clavery changed the title Align plugins with Agent Plugins standard; add MCP config_inspect + project-directory outlet @W-23768570 Align plugins with Agent Plugins standard; add MCP config_inspect + project-directory outlet Aug 7, 2026
…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.
@clavery
clavery deployed to b2c-docs-preview August 12, 2026 20:39 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

📘 Docs preview

🧹 The preview for this PR has been removed (PR closed).

@clavery
clavery merged commit c0ec3f6 into main Aug 12, 2026
11 checks passed
@clavery
clavery deleted the feature/agent-plugins branch August 12, 2026 20:52
@clavery
clavery deployed to b2c-docs-preview August 12, 2026 20:52 — with GitHub Actions Active
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