@diviops/mcp-server 1.5.64 → 1.5.66

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 CHANGED
@@ -8,7 +8,29 @@ 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.64 release note
11
+ ## 1.5.66 release note
12
+
13
+ Cancellation now reaches pending HTTP requests for page listing, variable listing
14
+ and creation, cache flushing, and Theme Builder template trash or preview.
15
+ Cancelling a dispatched write does not prove that WordPress stopped or rolled it
16
+ back; check the resulting state before retrying. This correction does not
17
+ establish the cause of the separately reported four-minute client timeouts.
18
+
19
+ WP-CLI rejection messages now identify the full opt-in command, such as
20
+ `post meta delete`. Existing permissions and opt-in guidance are preserved.
21
+
22
+ Update and restart the MCP server. These corrections require no Free Agent update;
23
+ Free Agent remains 1.5.38 and public builder remains 1.4.11.
24
+
25
+ ## Previous 1.5.65 release note
26
+
27
+ Variable scans now report incompatible legacy non-color IDs, whether they are defined, and their known page/preset references. Scan coverage and truncation are explicit. Existing orphan and unused classifications are unchanged. Native page-usage detection is not proof of successful frontend rendering.
28
+
29
+ Existing mixed-case or underscore IDs still need reviewed replacement variables and reference updates. No variable is renamed or deleted automatically; zero known references does not establish that deletion is safe.
30
+
31
+ Pair with Free Agent 1.5.38. Public builder remains 1.4.11.
32
+
33
+ ## Previous 1.5.64 release note
12
34
 
13
35
  Adds `diviops_page_settings_get` and `diviops_page_settings_update` with Free
14
36
  Agent 1.5.37. Read and update page-wide Content Area and Section backgrounds on ordinary Divi pages. Supports previews, literal colors, transparency and clearing to native defaults, with checksum checks and preservation of unrelated page data. Explicit per-section backgrounds remain intact.
package/dist/index.js CHANGED
@@ -554,8 +554,10 @@ registerPluginTool("diviops_page_list", {
554
554
  },
555
555
  annotations: { idempotentHint: true },
556
556
  _meta: { idempotent: "true" },
557
- }, async ({ post_type, per_page, page }) => {
557
+ }, async (args, context) => {
558
+ const { post_type, per_page, page } = args;
558
559
  const result = await wp.requestEnveloped("/page/list", {
560
+ signal: requestAbortSignal(args, context),
559
561
  params: {
560
562
  post_type: post_type ?? "page",
561
563
  per_page: String(per_page ?? 20),
@@ -2939,8 +2941,10 @@ registerPluginTool("diviops_tb_template_trash", {
2939
2941
  },
2940
2942
  annotations: { idempotentHint: false },
2941
2943
  _meta: { idempotent: "conditional" },
2942
- }, async ({ template_id, force, dry_run }) => {
2944
+ }, async (args, context) => {
2945
+ const { template_id, force, dry_run } = args;
2943
2946
  const result = await wp.requestEnveloped(`/theme-builder/template/trash/${template_id}`, {
2947
+ signal: requestAbortSignal(args, context),
2944
2948
  method: "POST",
2945
2949
  body: {
2946
2950
  force: force ?? false,
@@ -3859,13 +3863,17 @@ registerPluginTool("diviops_variable_list", {
3859
3863
  },
3860
3864
  annotations: { idempotentHint: true },
3861
3865
  _meta: { idempotent: "true" },
3862
- }, async ({ type, prefix }) => {
3866
+ }, async (args, context) => {
3867
+ const { type, prefix } = args;
3863
3868
  const params = {};
3864
3869
  if (type)
3865
3870
  params.type = type;
3866
3871
  if (prefix)
3867
3872
  params.prefix = prefix;
3868
- const result = await wp.requestEnveloped("/variable/list", { params });
3873
+ const result = await wp.requestEnveloped("/variable/list", {
3874
+ params,
3875
+ signal: requestAbortSignal(args, context),
3876
+ });
3869
3877
  return {
3870
3878
  content: [
3871
3879
  { type: "text", text: serializeEnvelope(result, "diviops_variable_list") },
@@ -3936,7 +3944,8 @@ registerPluginTool("diviops_variable_create", {
3936
3944
  },
3937
3945
  annotations: { idempotentHint: false },
3938
3946
  _meta: { idempotent: "false" },
3939
- }, async ({ type, id, label, value, gradient, min, max, targets, output_unit, root_font_size_px, dry_run, }) => {
3947
+ }, async (args, context) => {
3948
+ const { type, id, label, value, gradient, min, max, targets, output_unit, root_font_size_px, dry_run, } = args;
3940
3949
  // Structured gradient serialization is a plugin-side capability (#921).
3941
3950
  // Gate it so a new server + old plugin fails with a clear "update plugin"
3942
3951
  // error instead of the confusing "value must be scalar" the old callback
@@ -3963,6 +3972,7 @@ registerPluginTool("diviops_variable_create", {
3963
3972
  if (dry_run)
3964
3973
  body.dry_run = true;
3965
3974
  const result = await wp.requestEnveloped("/variable/create", {
3975
+ signal: requestAbortSignal(args, context),
3966
3976
  method: "POST",
3967
3977
  body,
3968
3978
  });
@@ -4173,7 +4183,7 @@ registerPluginTool("diviops_variable_delete", {
4173
4183
  };
4174
4184
  });
4175
4185
  registerPluginTool("diviops_variable_scan_orphans", {
4176
- description: "Scan pages, Theme Builder layouts (header/body/footer), Divi Library items, canvas pages, and the preset registry for gvid-/gcid- references that have no backing entry in the Variable Manager (orphans), plus variables defined but referenced nowhere (unused). Orphans render as invalid CSS on the frontend — the $variable()$ resolver falls through with no fallback. Use after a deletion with force=true, or periodically as a hygiene check. Symmetric to diviops_preset_scan_orphans. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
4186
+ description: "Scan pages, Theme Builder layouts (header/body/footer), Divi Library items, canvas pages, and the preset registry for gvid-/gcid- references that have no backing entry in the Variable Manager (orphans), plus variables defined but referenced nowhere (unused). Orphans render as invalid CSS on the frontend — the $variable()$ resolver falls through with no fallback. Use after a deletion with force=true, or periodically as a hygiene check. Also reports incompatible_variables: exact legacy non-color IDs, whether defined, type (null if undefined), known reference count and locations. These can be defined and referenced without being orphans. scan_scope describes coverage and truncation; zero known references is not proof safe to delete. Recreate reviewed replacements and update reviewed references; never silently lowercase IDs. ID compatibility is not frontend rendering verification. Symmetric to diviops_preset_scan_orphans. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
4177
4187
  annotations: { idempotentHint: true },
4178
4188
  _meta: { idempotent: "true" },
4179
4189
  }, async () => {
@@ -4185,7 +4195,7 @@ registerPluginTool("diviops_variable_scan_orphans", {
4185
4195
  };
4186
4196
  });
4187
4197
  registerPluginTool("diviops_variable_used_on_page", {
4188
- description: "Detect which numeric/font variable IDs a single page actually emits — the exact set Divi 5.4.0+ uses to scope selective `:root{--gvid-*}` CSS variable emission. Walks the same content stack the frontend assembles: post_content + active Theme Builder header/body/footer template content + appended canvas content (interaction targets etc.), plus presets referenced by that content. NOTE: this is `gvid-*` only — color variables (`gcid-*`) are emitted via a separate path (`GlobalData` color block) that is NOT scoped per-page in 5.4.0; this tool returns gvid IDs only. Use for per-page orphan validation (complements global diviops_variable_scan_orphans), preflight before bulk variable rename (know which pages are affected), or to debug why a numeric/font variable doesn't render on a specific page. Read-only. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; success payload is { post_id, variable_ids (sorted, deduped), count, tb_template_ids }. Missing post_id returns 'not_found'; non-positive post_id returns 'invalid_input'; a Divi 5 environment without the `\\\\ET\\\\Builder\\\\FrontEnd\\\\Assets\\\\DetectFeature` class (e.g. Divi 4 active, or Divi disabled) returns 'wp_error' (HTTP 500) with a hint to activate Divi 5.",
4198
+ description: "Return native-detected numeric/font variable IDs for a single page — the set Divi 5.4.0+ uses to scope selective `:root{--gvid-*}` CSS variable emission. Walks the same content stack the frontend assembles: post_content + active Theme Builder header/body/footer template content + appended canvas content (interaction targets etc.), plus presets referenced by that content. NOTE: this is `gvid-*` only — color variables (`gcid-*`) are emitted via a separate path (`GlobalData` color block) that is NOT scoped per-page in 5.4.0; this tool returns gvid IDs only. Native detection may truncate incompatible legacy IDs; this is not proof of successful CSS emission or a complete recovery inventory. Use diviops_variable_scan_orphans for full recognized legacy IDs and known locations. Use this tool to debug why a numeric/font variable doesn't render on a specific page. Read-only. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; success payload is { post_id, variable_ids (sorted, deduped), count, tb_template_ids }. Missing post_id returns 'not_found'; non-positive post_id returns 'invalid_input'; a Divi 5 environment without the `\\\\ET\\\\Builder\\\\FrontEnd\\\\Assets\\\\DetectFeature` class (e.g. Divi 4 active, or Divi disabled) returns 'wp_error' (HTTP 500) with a hint to activate Divi 5.",
4189
4199
  inputSchema: {
4190
4200
  post_id: z
4191
4201
  .number()
@@ -4239,7 +4249,8 @@ registerPluginTool("diviops_meta_flush_cache", {
4239
4249
  },
4240
4250
  annotations: { idempotentHint: true },
4241
4251
  _meta: { idempotent: "true" },
4242
- }, async ({ post_id, all, after, dry_run, cleanup_dynamic_assets, cleanup_canvas_refs }) => {
4252
+ }, async (args, context) => {
4253
+ const { post_id, all, after, dry_run, cleanup_dynamic_assets, cleanup_canvas_refs } = args;
4243
4254
  const body = {};
4244
4255
  if (post_id !== undefined)
4245
4256
  body.post_id = post_id;
@@ -4254,6 +4265,7 @@ registerPluginTool("diviops_meta_flush_cache", {
4254
4265
  if (cleanup_canvas_refs)
4255
4266
  body.cleanup_canvas_refs = true;
4256
4267
  const result = await wp.requestEnveloped("/meta/flush-cache", {
4268
+ signal: requestAbortSignal(args, context),
4257
4269
  method: "POST",
4258
4270
  body,
4259
4271
  });
package/dist/wp-cli.js CHANGED
@@ -175,14 +175,15 @@ function isCommandAllowed(args) {
175
175
  }
176
176
  }
177
177
  const extendable = EXTENDED_COMMANDS.filter((c) => !ALLOWED_COMMANDS.includes(c));
178
- const hint = extendable.some((c) => twoWord === c || threeWord === c || oneWord === c)
178
+ const extendedCommand = extendable.find((c) => twoWord === c || threeWord === c || oneWord === c);
179
+ const hint = extendedCommand
179
180
  ? ` This command can be enabled via DIVIOPS_WP_CLI_ALLOW env var (see README).`
180
181
  : extendable.length > 0
181
182
  ? ` Opt-in commands available: ${extendable.join(', ')}.`
182
183
  : '';
183
184
  return {
184
185
  allowed: false,
185
- reason: `Command "${twoWord}" not in allowlist.${hint}`,
186
+ reason: `Command "${extendedCommand ?? twoWord}" not in allowlist.${hint}`,
186
187
  };
187
188
  }
188
189
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.64",
3
+ "version": "1.5.66",
4
4
  "description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",