v1.17.0 — SiteAgent governance bridge
SiteAgent governance bridge — capture-before-write for Elementor page edits
The first plank of P0.2 (bring fork writes under SiteAgent governance): agent-driven Elementor page edits now get the same reversal safety SiteAgent already gives its own power tools.
When the SiteAgent worker (digitizer-site-worker) is installed alongside this plugin, any write-capable ability that edits an existing page has the page's Elementor state (_elementor_data + _elementor_page_settings) snapshotted before the write and rolled back if the write fails.
Robust by construction — no hand-maintained tool list
The ability wrapper arms a governed run for the target post; the actual page-data write site (Elementor_MCP_Data::save_page_data() / save_page_settings()) captures the snapshot lazily on the first real write. So:
- Every page-data write is covered automatically — nothing to keep in sync as tools are added.
- Tools that write other state (template conditions →
_elementor_conditions, SEO meta) never reach the write site, so are never snapshotted — no wrong-key rollbacks. - Preview-only calls (an a11y/SEO generator with
apply=false) write nothing, so trigger no snapshot — no spurious denials.
Safety
- Soft dependency — with no SiteAgent installed,
is_active()is false, nothing is wrapped, behaviour is identical to the standalone plugin. Never hard-requires SiteAgent. - Fail closed — if the pre-write snapshot can't be captured (no rollback point), the write is refused rather than made blind.
- A write that returns
WP_Erroror throws is rolled back; if the rollback itself fails, that more-severe partial-write condition surfaces asgovernance_rollback_failed. - Governance seams —
elementor_mcp_governance_write(undo point for the gateway),elementor_mcp_governance_rolled_back,elementor_mcp_governance_rollback_failed.
Scope
Page-data writes. Kit-/repository-scoped writes (global classes, variables, system kit), server-enforced Ed25519 approval grants, and post-write render checks are follow-up planks.
Tests
Full suite 648 green; 15 new GovernanceFunctionalTest cases. Depends on the SiteAgent snapshot_meta primitive (Digitizers/SiteAgent#47). Converged over 4 Codex review rounds (a completeness finding drove the pivot from a fragile tool allowlist to the write-site chokepoint design).