Repository navigation
v1.2.0 — Post-write verification
Never trust the write API
Every mutating widget tool now re-reads the page from canonical WP after the write and surfaces persisted state to the model. The HTTP write API can lie — return 200 OK while plugin filters or REST quirks silently drop the payload. This contract makes that observable.
Triggered by Mads Hansen's comment on the v1.0 post-mortem: a mutating MCP tool MUST force the model to see ground truth, not the write API's optimistic acknowledgement.
Contract change (additive)
Every `applied` response now includes:
```jsonc
{
"mutated": true, // false = no-op OR silent drop
"warnings": [],
"verification": {
"method": "Re-read /wp/v2/pages/42 and check widget abc settings…",
"reread_ok": true,
"matches_requested": true, // false = write API lied
"persisted": { /* canonical state */ },
"notes": "…explanation when something diverged"
}
}
```
If `verification.matches_requested === false` → treat as failure regardless of HTTP status. Original survives in `backup_meta_key`.
Internal
- New `src/elementor/verify.ts` (`verifyWrite` + `deepEqual`)
- 4 new unit tests, 27 total
```bash
npm install -g elementor-mcp-agent@1.2.0
```