Repository navigation
refactor: delete WebMCP bridge (v0.11 PR 3b/4) - #194
Merged
Merged
Conversation
Removes the WebMCP integration that exposed agentic abilities to external AI agents via the WebMCP protocol. Per the v1 Roadmap doc, WebMCP is parked as "speculative — no browser support yet." Future revival can lift the deleted module from the v0.10-era git history (commit before 09bdf3c) when the spec ships in mainstream browsers. Deleted: - src/extensions/services/webmcp-bridge.js (288 lines) - src/extensions/services/__tests__/webmcp-bridge.test.js (470 lines) Updated: - src/extensions/abilities/index.js — dropped webmcpBridge import + the isSupported / initialize call on registration - src/extensions/App.jsx — dropped the cleanup useEffect - src/extensions/services/agentic-abilities-api.js — dropped the window.wp.agenticAdmin.webmcp public API - includes/functions-abilities.php — reworded a comment that called inputSchema "for WebMCP tool registration"; the field is now just for JS-side input validation Tests: 89 passing (was 117; the 28-test webmcp-bridge suite is gone). Build: clean. Lint: clean (PHP + JS). Reference scan: zero remaining webmcp/WebMCP hits in src/ includes/ tests/. Roadmap context: - PR #191: manifest pattern ✅ - PR #192: voice out of default build ✅ - PR #193: delete 4 simple abilities (queued) - PR 3b (this): delete webmcp-bridge - PR 3c (next): delete feedback system - PR 4 (last): flip manifest default to core+local-only Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
5 tasks
pluginslab
added a commit
that referenced
this pull request
May 12, 2026
Last piece of the v0.11 strip-down. Labs (parked) abilities now require
opt-in to be registered, completing the WordPress.org submission path.
PHP — includes/abilities-manifest.php:
resolve_enabled_abilities() now gates the labs array on the
WP_AGENTIC_ADMIN_ENABLE_LABS constant. The wp_agentic_admin_enabled_abilities
filter remains the per-ability override path:
define( 'WP_AGENTIC_ADMIN_ENABLE_LABS', true ); // all labs
add_filter( 'wp_agentic_admin_enabled_abilities', ... ); // selective
New helper: wp_agentic_admin_labs_enabled() — single source of truth
for the boolean.
PHP — includes/class-admin-page.php:
Localizes two new fields on window.wpAgenticAdmin:
- enabledAbilities: PHP-resolved slug list (the result of the
filter above)
- enableLabs: bool, mirrors wp_agentic_admin_labs_enabled()
PHP becomes authoritative for which PHP-backed abilities the JS
manifest registers.
JS — src/extensions/abilities/manifest.js:
New JS_ONLY_ABILITIES set captures the slugs that have no PHP
register function (current-user-role, core-site-info, core-environment-info,
codebase-index, code-search, wp-config-list, content-generate).
PHP's enabledAbilities list can't include these, so JS adds them
back. Members that are also LABS are gated by enableLabs.
JS — src/extensions/abilities/index.js:
registerAllAbilities() now delegates slug resolution to a new
exported resolveEnabledSlugs() function:
- With PHP-localized enabledAbilities: register that list ∪
(JS_ONLY_ABILITIES minus labs-when-off)
- Without (tests / dev): register all REGISTRARS minus LABS
unless enableLabs is set
Falls back gracefully when window.wpAgenticAdmin is unset, so
Jest tests don't have to mock the global.
Tests:
- manifest.test.js: 2 new cases covering JS_ONLY_ABILITIES contract
- index.test.js (new file, 6 cases): PHP-authoritative path with
labs on/off, empty PHP list edge case, fallback path with and
without enableLabs
PHP smoke verification (manual):
Without constant: 33 abilities resolved (CORE + LOCAL_ONLY)
With constant: 39 abilities resolved (+6 labs)
Tests: 124 passing (was 117, +7 new).
Build: clean.
Lint: clean (PHP + JS + Prettier).
Roadmap context — END OF v0.11 STRIP-DOWN:
- PR #191: manifest pattern ✅ merged
- PR #192: voice out of default build ✅ merged
- PR #193: delete 4 simple abilities (open)
- PR #194: delete webmcp-bridge (open)
- PR #195: delete feedback system (open)
- PR 4 (this): flip default to core+local-only
After all six merge: ~3,800 LoC removed, 819 KB shipped bundle
dropped, 35 PHP abilities registered by default (down from 39),
plugin ready for WP.org submission (modulo the remaining 6 security
+ 6 compliance issues from the roadmap).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
Deletes the WebMCP integration that exposed agentic abilities to external AI agents via the WebMCP protocol. Per the v1 Roadmap doc, WebMCP is parked because "no browser support yet, speculative."
Net: -784 lines / +1 line, 6 files touched.
What's deleted
What's updated
Recovery path
Future revival when WebMCP ships in mainstream browsers:
```bash
git show v0.10.0:src/extensions/services/webmcp-bridge.js > src/extensions/services/webmcp-bridge.js
```
Then restore the import + initialize call in `abilities/index.js` and the cleanup in `App.jsx`.
Verification
Roadmap context
Test plan
🤖 Generated with Claude Code