@diviops/mcp-server 1.5.56 → 1.5.58
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 +69 -1
- package/dist/index.js +43 -8
- package/dist/wp-cli.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -8,7 +8,53 @@ The Node.js MCP server inside the DiviOps harness. It gives Claude Code, Codex,
|
|
|
8
8
|
Claude Code <-> MCP Server (stdio) <-> WordPress REST API <-> DiviOps Agent plugin
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## 1.5.
|
|
11
|
+
## 1.5.58 candidate release note
|
|
12
|
+
|
|
13
|
+
With Free 1.5.30, module preset create/update accepts `group_presets` for native
|
|
14
|
+
root composition, and inspection exposes stored links. The supplied map replaces
|
|
15
|
+
the entire root map; omission preserves links and `{}` clears them. Slot/group
|
|
16
|
+
buckets and existing references are validated, including dry-run. Composition
|
|
17
|
+
requires `preset_composition_v1`; older or unverified plugins refuse it before
|
|
18
|
+
dispatch. Keep `groupPresets` out of `attrs`. Update both components and restart
|
|
19
|
+
the MCP client connection to refresh capabilities.
|
|
20
|
+
|
|
21
|
+
Public builder companion 1.4.10 and Free validation warnings ask for explicit
|
|
22
|
+
heading levels according to document hierarchy, without changing typography or
|
|
23
|
+
warning detection. Updating npm or WordPress does not update independently
|
|
24
|
+
installed skills or instructions already read by an agent.
|
|
25
|
+
|
|
26
|
+
These source candidate versions are not yet published. The delivered baseline
|
|
27
|
+
is Free 1.5.29 / MCP 1.5.57 / builder 1.4.9. Dependencies and compatibility floors
|
|
28
|
+
are unchanged. Package qualification and publication remain separate from
|
|
29
|
+
source acceptance.
|
|
30
|
+
|
|
31
|
+
## Previous 1.5.57 candidate release note
|
|
32
|
+
|
|
33
|
+
Forwards `diviops_module_update` request cancellation to HTTP dispatch and pending
|
|
34
|
+
response-body reads. This does not establish the cause or resolution of the
|
|
35
|
+
reported four-minute hang. After dispatch, the WordPress write outcome remains
|
|
36
|
+
unknown: cancellation does not verify no changes, a stopped write or rollback.
|
|
37
|
+
Do not automatically retry; inspect readback and existing rollback evidence
|
|
38
|
+
before deciding any later action.
|
|
39
|
+
|
|
40
|
+
Corrects WP-CLI rejection hints to match actual extended opt-in commands.
|
|
41
|
+
Command permissions, allowlists and opt-in requirements are unchanged.
|
|
42
|
+
|
|
43
|
+
Separately prepared Free 1.5.29 generates lowercase IDs for new non-color design
|
|
44
|
+
variables and refuses invalid supplied IDs without silently renaming them.
|
|
45
|
+
Existing IDs and references are not migrated or repaired. Additional module-write
|
|
46
|
+
regression coverage is tests only, not a new serialization fix.
|
|
47
|
+
|
|
48
|
+
Delivered baseline: Free 1.5.28, MCP 1.5.56 and public builder companion 1.4.9.
|
|
49
|
+
Builder content is unchanged, so its version remains 1.4.9. This is source review,
|
|
50
|
+
not exact-package qualification, runtime acceptance or publication. A narrow
|
|
51
|
+
dependency correction pins `proxy-addr` to patched `2.0.8` after the original
|
|
52
|
+
qualification audit failed. Tool schemas, compatibility floors, Pro, Design
|
|
53
|
+
Library, paid skills, primer and launcher remain unchanged. Fresh package
|
|
54
|
+
qualification and hosted validation are authorized but pending; merge remains
|
|
55
|
+
gated on corrected-head review and all applicable checks.
|
|
56
|
+
|
|
57
|
+
## Previous 1.5.56 candidate release note
|
|
12
58
|
|
|
13
59
|
Aligns shipped setup documentation and attribute-reference citations with the
|
|
14
60
|
renamed `diviops-divi-5` skill. Updates three pinned production dependencies to
|
|
@@ -371,6 +417,27 @@ When the gates are not satisfied, the tools simply don't appear on the MCP surfa
|
|
|
371
417
|
|
|
372
418
|
See [server-reference.md](../docs/server-reference.md) for per-tool descriptions.
|
|
373
419
|
|
|
420
|
+
## Native preset composition
|
|
421
|
+
|
|
422
|
+
`diviops_preset_create` and `diviops_preset_update` accept optional `group_presets`
|
|
423
|
+
for **module presets only**, stored as native root `groupPresets`, never in attrs:
|
|
424
|
+
|
|
425
|
+
```json
|
|
426
|
+
{"group_presets":{"title.decoration.font":{"presetId":["existing-font-id"],"groupName":"divi/font"}}}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Omit it to preserve existing links; `{}` replaces them with an empty map. Each
|
|
430
|
+
native slot binding requires a nonempty string-array `presetId` and `groupName`,
|
|
431
|
+
with optional nonnegative integer `segmentBoundary`. Slot/group compatibility
|
|
432
|
+
and target existence in that group bucket are checked before writing, also in
|
|
433
|
+
dry-run. No defaults or IDs are substituted. `attrs.groupPresets` rejects with
|
|
434
|
+
a corrective hint. New composition calls require `preset_composition_v1`;
|
|
435
|
+
older/unverified plugins refuse before dispatch, while omitted-link calls keep
|
|
436
|
+
their existing behavior. Reconnect after updating a supported plugin.
|
|
437
|
+
`diviops_preset_inspect` exposes the outgoing root map without resolving inherited
|
|
438
|
+
styles or broadening its partial consumer coverage. Preview writes nothing and
|
|
439
|
+
allocates no UUID; native Builder/rendering qualification remains separate.
|
|
440
|
+
|
|
374
441
|
## Bundled CLI — `diviops-preset`
|
|
375
442
|
|
|
376
443
|
The package also ships a standalone command-line preset emitter, `diviops-preset`,
|
|
@@ -644,6 +711,7 @@ Common quick fixes — full reference in [troubleshooting.md](../docs/troublesho
|
|
|
644
711
|
- **`npx` fails with "could not determine executable to run"** — use `npx -y --package @diviops/mcp-server diviops-mcp`; this explicitly selects the MCP server bin.
|
|
645
712
|
- **"Connection failed"** — verify the plugin is active by visiting `{WP_URL}/wp-json/diviops/v1/schema/settings`; test the credentials with `curl -u "user:pass" …`.
|
|
646
713
|
- **"This tool requires plugin capability"** — the connected plugin does not advertise the capability this tool needs. Server and plugin versions are independent; install a compatible plugin from the same DiviOps suite release or a newer supported component, then reconnect or restart the MCP session to refresh the handshake.
|
|
714
|
+
- **Cancelled `diviops_module_update`**: MCP request cancellation is forwarded to the HTTP request, including pending response-body reads. Once dispatched, the WordPress write outcome remains unknown: cancellation does not verify that the write stopped, made no changes, or rolled back. Do not automatically retry; use readback and existing rollback evidence to determine any later action.
|
|
647
715
|
- **Preset edits not visible on the frontend** — Divi serves frontend CSS from `wp-content/et-cache/{post_id}/`, which `wp cache flush` doesn't touch. Use `diviops_meta_flush_cache` after preset writes; `post_id` mode also sweeps that exact directory and reports `post_dir_sweep` evidence.
|
|
648
716
|
|
|
649
717
|
## Learn more
|
package/dist/index.js
CHANGED
|
@@ -363,7 +363,7 @@ function registerPluginTool(name, config, handler) {
|
|
|
363
363
|
registered: true,
|
|
364
364
|
capability_key: key,
|
|
365
365
|
});
|
|
366
|
-
const wrapped = (async (args) => {
|
|
366
|
+
const wrapped = (async (args, context) => {
|
|
367
367
|
try {
|
|
368
368
|
requireCapability(key);
|
|
369
369
|
}
|
|
@@ -375,7 +375,7 @@ function registerPluginTool(name, config, handler) {
|
|
|
375
375
|
}
|
|
376
376
|
throw e;
|
|
377
377
|
}
|
|
378
|
-
return handler(args);
|
|
378
|
+
return handler(args, context);
|
|
379
379
|
});
|
|
380
380
|
recordIdempotent(name, config?._meta);
|
|
381
381
|
registry.registerTool(name, config, wrapped);
|
|
@@ -1714,7 +1714,8 @@ registerPluginTool("diviops_module_update", {
|
|
|
1714
1714
|
},
|
|
1715
1715
|
annotations: { idempotentHint: false },
|
|
1716
1716
|
_meta: { idempotent: "conditional" },
|
|
1717
|
-
}, async (
|
|
1717
|
+
}, async (args, context) => {
|
|
1718
|
+
const { page_id, label, match_text, auto_index, occurrence, attrs, dry_run, backup } = args;
|
|
1718
1719
|
const backupGate = backupCapabilityError("diviops_module_update", backup);
|
|
1719
1720
|
if (backupGate)
|
|
1720
1721
|
return backupGate;
|
|
@@ -1739,6 +1740,7 @@ registerPluginTool("diviops_module_update", {
|
|
|
1739
1740
|
const result = await wp.requestEnveloped(`/module/update/${page_id}`, {
|
|
1740
1741
|
method: "POST",
|
|
1741
1742
|
body,
|
|
1743
|
+
signal: requestAbortSignal(args, context),
|
|
1742
1744
|
});
|
|
1743
1745
|
return {
|
|
1744
1746
|
content: [
|
|
@@ -2065,7 +2067,7 @@ registerPluginTool("diviops_preset_audit_storage", {
|
|
|
2065
2067
|
};
|
|
2066
2068
|
});
|
|
2067
2069
|
registerPluginTool("diviops_preset_inspect", {
|
|
2068
|
-
description: "Inspect one Divi 5 preset UUID without writing. Returns bucket/type/module/group coordinates, attrs/styleAttrs/renderAttrs, storage path and provenance, block plus preset-chain reference counts with sample consumers, explicit partial coverage, and direct variable_references.ids to join with diviops_variable_list (absent IDs remain unresolved). Includes geometry-scope warnings for layout/position/sizing/transform attrs and a warning for nested D5 or legacy _ng duplicates. Zero references is not deletion approval; stored definitions are not computed styles. This is intentionally narrower than diviops_preset_audit and has no repair mode. Missing UUID returns not_found.",
|
|
2070
|
+
description: "Inspect one Divi 5 preset UUID without writing. Returns bucket/type/module/group coordinates, attrs/styleAttrs/renderAttrs, outgoing root groupPresets map (empty object when absent), storage path and provenance, block plus preset-chain reference counts with sample consumers, explicit partial coverage, and direct variable_references.ids to join with diviops_variable_list (absent IDs remain unresolved). Includes geometry-scope warnings for layout/position/sizing/transform attrs and a warning for nested D5 or legacy _ng duplicates. Zero references is not deletion approval; stored definitions are not computed styles. This is intentionally narrower than diviops_preset_audit and has no repair mode. Missing UUID returns not_found.",
|
|
2069
2071
|
inputSchema: {
|
|
2070
2072
|
preset_id: z.string().min(1).describe("Preset UUID to inspect."),
|
|
2071
2073
|
},
|
|
@@ -2219,11 +2221,33 @@ registerPluginTool("diviops_preset_cleanup", {
|
|
|
2219
2221
|
],
|
|
2220
2222
|
};
|
|
2221
2223
|
});
|
|
2224
|
+
// Vendor GlobalPresetController: root groupPresets is a native slot map, not attrs.
|
|
2225
|
+
const PRESET_COMPOSITION_FIELD = z.record(z.string().min(1), z.strictObject({
|
|
2226
|
+
presetId: z.array(z.string().min(1)).min(1),
|
|
2227
|
+
groupName: z.string().min(1),
|
|
2228
|
+
segmentBoundary: z.number().int().nonnegative().optional(),
|
|
2229
|
+
})).optional().describe("Module presets only. Native root groupPresets slot map: { 'title.decoration.font': { presetId: ['existing-id'], groupName: 'divi/font', segmentBoundary?: 0 } }. Existing IDs must belong to the slot's group bucket. Replaces the entire root map; omitted preserves, {} clears. Never put groupPresets in attrs. Requires preset_composition_v1.");
|
|
2230
|
+
const PRESET_COMPOSITION_DESC = " Optional group_presets replaces the native root groupPresets map on module presets only; omission preserves links and {} clears. Slot/group buckets and existing references are validated before writes, including dry-run. attrs.groupPresets is rejected; use group_presets instead. Requires preset_composition_v1; older or unverified plugins refuse composition before dispatch.";
|
|
2231
|
+
function presetCompositionErrorResult(tool, attrs, groupPresets, type) {
|
|
2232
|
+
if (attrs && Object.hasOwn(attrs, "groupPresets")) {
|
|
2233
|
+
return { content: [{ type: "text", text: serializeEnvelope({ ok: false, error: { code: "invalid_input", message: "attrs.groupPresets is misplaced; native module preset composition lives at the preset root.", hint: "Remove attrs.groupPresets and supply top-level group_presets on a module preset instead.", data: { path: "attrs.groupPresets" } } }, tool) }] };
|
|
2234
|
+
}
|
|
2235
|
+
if (groupPresets === undefined)
|
|
2236
|
+
return null;
|
|
2237
|
+
if (type === "group") {
|
|
2238
|
+
return { content: [{ type: "text", text: serializeEnvelope({ ok: false, error: { code: "invalid_input", message: "group_presets is supported on module presets only." } }, tool) }] };
|
|
2239
|
+
}
|
|
2240
|
+
if (handshakeState.kind !== "ok" || handshakeState.capabilities.preset_composition_v1 !== true) {
|
|
2241
|
+
return missingCapabilityEnvelope(new MissingCapabilityError("preset_composition_v1", handshakeState.kind === "ok" ? handshakeState.pluginVersion : undefined), tool, { serverVersion: SERVER_VERSION });
|
|
2242
|
+
}
|
|
2243
|
+
return null;
|
|
2244
|
+
}
|
|
2222
2245
|
registerPluginTool("diviops_preset_update", {
|
|
2223
2246
|
description: "Update a specific preset by ID. Can rename, replace its style attributes, and/or change its stack priority. 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. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; missing preset_id returns code 'not_found' with a hint to diviops_preset_audit." +
|
|
2224
|
-
DRY_RUN_DESC_SUFFIX,
|
|
2247
|
+
DRY_RUN_DESC_SUFFIX + PRESET_COMPOSITION_DESC,
|
|
2225
2248
|
inputSchema: {
|
|
2226
2249
|
preset_id: z.string().describe("Preset ID (UUID or short ID)"),
|
|
2250
|
+
group_presets: PRESET_COMPOSITION_FIELD,
|
|
2227
2251
|
name: z.string().optional().describe("New display name for the preset"),
|
|
2228
2252
|
attrs: z
|
|
2229
2253
|
.record(z.string(), z.any())
|
|
@@ -2238,7 +2262,10 @@ registerPluginTool("diviops_preset_update", {
|
|
|
2238
2262
|
},
|
|
2239
2263
|
annotations: { idempotentHint: false },
|
|
2240
2264
|
_meta: { idempotent: "conditional" },
|
|
2241
|
-
}, async ({ preset_id, name, attrs, priority, dry_run }) => {
|
|
2265
|
+
}, async ({ preset_id, name, attrs, group_presets, priority, dry_run }) => {
|
|
2266
|
+
const compositionGate = presetCompositionErrorResult("diviops_preset_update", attrs, group_presets);
|
|
2267
|
+
if (compositionGate)
|
|
2268
|
+
return compositionGate;
|
|
2242
2269
|
const isolationGate = writerIsolationErrorResult("diviops_preset_update", {
|
|
2243
2270
|
attrs,
|
|
2244
2271
|
});
|
|
@@ -2249,6 +2276,8 @@ registerPluginTool("diviops_preset_update", {
|
|
|
2249
2276
|
body.name = name;
|
|
2250
2277
|
if (attrs)
|
|
2251
2278
|
body.attrs = attrs;
|
|
2279
|
+
if (group_presets !== undefined)
|
|
2280
|
+
body.group_presets = group_presets;
|
|
2252
2281
|
if (typeof priority === "number")
|
|
2253
2282
|
body.priority = priority;
|
|
2254
2283
|
if (dry_run)
|
|
@@ -2305,9 +2334,10 @@ registerPluginTool("diviops_preset_delete", {
|
|
|
2305
2334
|
});
|
|
2306
2335
|
registerPluginTool("diviops_preset_create", {
|
|
2307
2336
|
description: 'Create a new preset in the Divi 5 registry. For module presets, supply module_name (e.g. "divi/column", "divi/button", "divi/section"), name, and attrs. For group (attribute-level) presets, set type="group" and supply group_name ("divi/font", "divi/button", etc.), group_id ("designTitleText", "button", etc.), and optionally primary_attr_name.' +
|
|
2308
|
-
DRY_RUN_DESC_SUFFIX +
|
|
2337
|
+
DRY_RUN_DESC_SUFFIX + PRESET_COMPOSITION_DESC +
|
|
2309
2338
|
" NOTE: dry_run plan does not pre-allocate the UUID — that's generated at apply time. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }. Per-bucket name uniqueness check: a name collision in the same `(bucket, bucket_key)` returns code 'conflict' (HTTP 409) with `error.data = { existing_preset_id, bucket, bucket_key, name }` so callers can branch on reuse / rename / preset_update. Bucket coordinates are the natural addressing scope: a 'Hero Title' font preset and a 'Hero Title' button preset coexist (different buckets), but two 'Hero Title' presets under `group/divi/font` collide. Input-shape rejections (missing module_name/name/attrs, type outside [module,group], group preset without group_name/group_id) return code 'invalid_input' with structured `error.data` documenting the failed field.",
|
|
2310
2339
|
inputSchema: {
|
|
2340
|
+
group_presets: PRESET_COMPOSITION_FIELD,
|
|
2311
2341
|
module_name: z
|
|
2312
2342
|
.string()
|
|
2313
2343
|
.describe('Divi module slug (e.g. "divi/column", "divi/button", "divi/section"). For group presets, this is still required and describes the module the preset originated from.'),
|
|
@@ -2345,7 +2375,10 @@ registerPluginTool("diviops_preset_create", {
|
|
|
2345
2375
|
},
|
|
2346
2376
|
annotations: { idempotentHint: false },
|
|
2347
2377
|
_meta: { idempotent: "conditional" },
|
|
2348
|
-
}, async ({ module_name, name, attrs, type, group_name, group_id, primary_attr_name, make_default, priority, dry_run }) => {
|
|
2378
|
+
}, async ({ module_name, name, attrs, group_presets, type, group_name, group_id, primary_attr_name, make_default, priority, dry_run }) => {
|
|
2379
|
+
const compositionGate = presetCompositionErrorResult("diviops_preset_create", attrs, group_presets, type);
|
|
2380
|
+
if (compositionGate)
|
|
2381
|
+
return compositionGate;
|
|
2349
2382
|
if (type === "group" && (!group_name || !group_id)) {
|
|
2350
2383
|
throw new Error('type="group" requires both group_name and group_id. Example: group_name="divi/font", group_id="designTitleText".');
|
|
2351
2384
|
}
|
|
@@ -2355,6 +2388,8 @@ registerPluginTool("diviops_preset_create", {
|
|
|
2355
2388
|
if (isolationGate)
|
|
2356
2389
|
return isolationGate;
|
|
2357
2390
|
const body = { module_name, name, attrs, type };
|
|
2391
|
+
if (group_presets !== undefined)
|
|
2392
|
+
body.group_presets = group_presets;
|
|
2358
2393
|
if (group_name)
|
|
2359
2394
|
body.group_name = group_name;
|
|
2360
2395
|
if (group_id)
|
package/dist/wp-cli.js
CHANGED
|
@@ -170,7 +170,7 @@ function isCommandAllowed(args) {
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
const extendable = EXTENDED_COMMANDS.filter((c) => !ALLOWED_COMMANDS.includes(c));
|
|
173
|
-
const hint = extendable.some((c) => twoWord === c || threeWord === c || oneWord === c
|
|
173
|
+
const hint = extendable.some((c) => twoWord === c || threeWord === c || oneWord === c)
|
|
174
174
|
? ` This command can be enabled via DIVIOPS_WP_CLI_ALLOW env var (see README).`
|
|
175
175
|
: extendable.length > 0
|
|
176
176
|
? ` Opt-in commands available: ${extendable.join(', ')}.`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diviops/mcp-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.58",
|
|
4
4
|
"description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"fast-uri": "3.1.8",
|
|
67
67
|
"hono": "4.13.7",
|
|
68
68
|
"ip-address": "10.7.1",
|
|
69
|
+
"proxy-addr": "2.0.8",
|
|
69
70
|
"zod": "^4.3.6"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|