optional safety metadata on wp_register_ability (snapshot + audit + rollback) #477
ibrahimhajjaj
started this conversation in
Ideas
Replies: 2 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Worth a look at #11731 (open for feedback, targeted at WP 7.1): adds |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I shipped AbilityGuard last weekend, a plugin that sits on wp_before_execute_ability / wp_after_execute_ability and adds snapshot, audit, approval, and rollback on a per-invocation basis: https://github.com/ibrahimhajjaj/abilityguard
Posting here because I want to flag one specific gap I noticed reading mcp-adapter, wordpress-mcp, and the Abilities API side by side, and to ask the team a couple of focused questions before I keep building.
What AbilityGuard does today
90d, error: 180d), custom-collector extension point.
enforcement (rejects if the same user or role decided the prior stage).
without committing.
Reads meta.annotations.{readonly, destructive, idempotent} from core directly. No parallel metadata. Currently in the wp.org review queue.
What I am not asking for
I am not proposing new safety metadata in core. meta.annotations already covers the hint surface, and per the March 2026 MCP spec post those hints are advisory by design, not enforcement. AbilityGuard is the enforcement layer that reads them and applies policy: approval gates, snapshot-before-execute, rollback. That stays plugin-side.
The actual gap
Automattic's wordpress-mcp shipped a real approval workflow: user_confirmed, confirm_permanent_delete, soft-trash, draft-default. It is being deprecated in favor of mcp-adapter. mcp-adapter has zero approval code today.
If a plugin shipped abilities gated on the old approval flow, the migration path is broken. There is no obvious continuity story.
I opened WordPress/mcp-adapter#176 to track this in the right repo, proposing a minimal approval interface (filter + capability + state enum). Whichever way that goes, it tells me where AbilityGuard's scope sits.
Questions
second one tells me AbilityGuard's scope is legit and I keep going where I am.
the implementation) so future first-party tools can interoperate with third-party rollback layers?
different layer. Is that the right read?
Happy to demo on a call, or to draft the approval-interface PR for mcp-adapter directly if there is interest.
Beta Was this translation helpful? Give feedback.
All reactions