@diviops/mcp-server 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,21 @@ The MCP server and WP plugin versions are incompatible. Update whichever side is
|
|
|
237
237
|
curl -u "username:apppassword" http://site.local/wp-json/diviops/v1/settings
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
+
### Preset edits not visible on the frontend
|
|
241
|
+
|
|
242
|
+
After `preset_update` / `preset_create`, the preset option is updated immediately but Divi serves frontend CSS from a **per-post static cache** that neither `wp cache flush` nor `wp transient delete --all` invalidates.
|
|
243
|
+
|
|
244
|
+
Cache location: `wp-content/et-cache/{post_id}/` — contains files like `et-divi-dynamic-tb-*-{post_id}-critical.css` with preset CSS baked in.
|
|
245
|
+
|
|
246
|
+
To force regeneration for a specific page:
|
|
247
|
+
```bash
|
|
248
|
+
rm -rf wp-content/et-cache/{post_id}/
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Next visit re-renders and writes fresh CSS. Applies to: any change that affects preset-derived CSS output (preset_update, preset_create when used by an existing page, preset_reassign in apply mode).
|
|
252
|
+
|
|
253
|
+
The preset option (`et_divi_builder_global_presets_d5`) always reflects the current MCP-written state — if `wp option get et_divi_builder_global_presets_d5` shows your change but the frontend doesn't, it's this cache.
|
|
254
|
+
|
|
240
255
|
## License
|
|
241
256
|
|
|
242
257
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -620,14 +620,14 @@ server.registerTool("diviops_preset_cleanup", {
|
|
|
620
620
|
};
|
|
621
621
|
});
|
|
622
622
|
server.registerTool("diviops_preset_update", {
|
|
623
|
-
description: "Update a specific preset by ID. Can rename and/or replace its style attributes.",
|
|
623
|
+
description: "Update a specific preset by ID. Can rename and/or replace its style attributes. Note: Divi serves frontend CSS from a per-post static cache at wp-content/et-cache/{post_id}/ that wp cache flush does NOT invalidate — if you're verifying a preset change on the rendered frontend, delete that dir for affected pages to force regeneration. Server-side preset state updates immediately; only the pre-rendered CSS file is stale.",
|
|
624
624
|
inputSchema: {
|
|
625
625
|
preset_id: z.string().describe("Preset ID (UUID or short ID)"),
|
|
626
626
|
name: z.string().optional().describe("New display name for the preset"),
|
|
627
627
|
attrs: z
|
|
628
628
|
.record(z.string(), z.any())
|
|
629
629
|
.optional()
|
|
630
|
-
.describe("New style attributes (replaces
|
|
630
|
+
.describe("New style attributes (replaces attrs, styleAttrs, and renderAttrs — matches VB save semantics so render cache stays in sync with edit state)"),
|
|
631
631
|
},
|
|
632
632
|
}, async ({ preset_id, name, attrs }) => {
|
|
633
633
|
const body = { preset_id };
|