@diviops/mcp-server 1.5.65 → 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,21 @@ 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.65 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
12
26
 
13
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.
14
28
 
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
  });
@@ -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.65",
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",