@diviops/mcp-server 1.5.81 → 1.5.83

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
@@ -520,6 +520,14 @@ Common quick fixes — full reference in [troubleshooting.md](../docs/troublesho
520
520
  - For plugin and skill updates shipped alongside the server, see the [public distribution releases](https://github.com/oaris-dev/diviops/releases).
521
521
  - The [archive through MCP 1.5.77](https://github.com/oaris-dev/diviops/blob/v1.5.95/diviops-server/README.md#mcp-1577-release-note) preserves the original version notes and their qualification limits. The 1.5.67 note refers to the [WP-CLI command tiers](https://github.com/oaris-dev/diviops/blob/main/SETUP.md#wp-cli-security).
522
522
 
523
+ ### MCP 1.5.83 release note
524
+
525
+ The MCP tools for creating variables and updating colors now explain how Divi saves and normalizes edits to existing values.
526
+
527
+ ### MCP 1.5.82 release note
528
+
529
+ Cross-site header and footer transfer guidance now tells you how to supply menu names from the source site and choose a destination menu when a match is unclear.
530
+
523
531
  ### MCP 1.5.81 release note
524
532
 
525
533
  Pair with DiviOps Agent 1.5.53 to check FluentCart activation on Free sites with `diviops_meta_info`. In `plugins.fluent_cart`, read `activation_known` before interpreting `active`. When `activation_known` is false, the server could not confirm activation.
@@ -48,7 +48,7 @@ export function planMenus(source, target) {
48
48
  if (origins.length !== 1 || !origin?.name || matches.length !== 1 ||
49
49
  ![origin, matches[0]].every(menu => Number.isSafeInteger(menu.id) && menu.id > 0 &&
50
50
  typeof menu.name === "string" && typeof menu.slug === "string" && /^[a-f0-9]{64}$/.test(menu.digest))) {
51
- blockers.push({ code: "menu_mapping_unverified", message: `Cannot resolve ${ref.module} menu ${ref.selection ?? "(unsupported selection)"}. Inspect current menu names on both sites or provide an explicit destination for this source ID.` });
51
+ blockers.push({ code: "menu_mapping_unverified", message: `Cannot resolve ${ref.module} menu ${ref.selection ?? "(unsupported selection)"}. Inspect current menu names on both sites or provide an explicit destination for this source ID. For an explicit menu ID, collect target context again with source_menu_names from the source export's menus. If the name is missing or has zero or multiple destination matches, verify the source menu and export again with explicit menu_targets. Pass those destination IDs as target_menu_ids when collecting target context. If the source selection is unsupported, stop and inspect the selector.` });
52
52
  continue;
53
53
  }
54
54
  mappings.push({ module: ref.module, source: origin, target: matches[0], match: chosen === undefined ? "unique_name" : "operator" });
package/dist/index.js CHANGED
@@ -1002,7 +1002,7 @@ registerPluginTool("diviops_global_color_create", {
1002
1002
  return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_global_color_create") }] };
1003
1003
  });
1004
1004
  registerPluginTool("diviops_global_color_update", {
1005
- description: "Update an existing global color by gcid. Only provided fields are updated; omitted fields are preserved. The lastUpdated timestamp is bumped on every write. Use diviops_global_color_list first to find the gcid for a color. NOTE: the underlying upsert is merge-mode — supplying a gcid that doesn't yet exist creates a new color with that gcid (provided it satisfies the gcid charset/length rules) rather than failing as 'not found'. Pre-check via diviops_global_color_list if you need strict-update semantics. CONCURRENCY: same VB-session race caveat as diviops_global_color_create — the write is read-modify-write on a single WP option, so an active VB session's next save can clobber this update. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; malformed gcid charset/length returns code 'invalid_input' with `error.data` documenting the failed field; non-CSS color value returns code 'invalid_input'; attempts to write to a customizer-bound default (gcid-primary-color / gcid-secondary-color / gcid-heading-color / gcid-body-color / gcid-link-color) return code 'variable.customizer_default_immutable' (HTTP 403) with `error.data = { id, managed_by: 'wp_customizer' }` — same code as diviops_variable_delete because the identity is identical (5.4+ unified gcid-* into the variable manager while preserving customizer-binding for the five legacy defaults)." +
1005
+ description: "Update an existing global color by gcid. Only provided fields are patched. On Divi 5.20+ edits are saved through Divi's own variable writer, which normalizes stored fields the same way the Variable Manager does. The lastUpdated timestamp is bumped on every write. Use diviops_global_color_list first to find the gcid for a color. NOTE: the underlying upsert is merge-mode — supplying a gcid that doesn't yet exist creates a new color with that gcid (provided it satisfies the gcid charset/length rules) rather than failing as 'not found'. Pre-check via diviops_global_color_list if you need strict-update semantics. CONCURRENCY: same VB-session race caveat as diviops_global_color_create — an active VB session's next save can clobber this update. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; malformed gcid charset/length returns code 'invalid_input' with `error.data` documenting the failed field; non-CSS color value returns code 'invalid_input'; attempts to write to a customizer-bound default (gcid-primary-color / gcid-secondary-color / gcid-heading-color / gcid-body-color / gcid-link-color) return code 'variable.customizer_default_immutable' (HTTP 403) with `error.data = { id, managed_by: 'wp_customizer' }` — same code as diviops_variable_delete because the identity is identical (5.4+ unified gcid-* into the variable manager while preserving customizer-binding for the five legacy defaults)." +
1006
1006
  DRY_RUN_DESC_SUFFIX,
1007
1007
  inputSchema: {
1008
1008
  gcid: z
@@ -2786,7 +2786,7 @@ function registerCrossEnvEvidenceTools() {
2786
2786
  .optional()
2787
2787
  .default("tb_header_layout")
2788
2788
  .describe(`Destination kind. Existing ${layoutLabel} layout evidence is supported.${staffNote}`),
2789
- source_menu_names: z.array(z.string()).optional().describe("Menu names from the source export; inventories all matching destination menus."),
2789
+ source_menu_names: z.array(z.string()).optional().describe("Required when a source header or footer selects an explicit menu. Pass the names from the source export's menus to inventory all matching destination menus. An absent menu ID or empty desktop value uses the destination's primary menu location."),
2790
2790
  target_menu_ids: z.array(z.number().int().positive()).optional().describe("Explicit destination IDs from the source export menu_targets."),
2791
2791
  source_asset_hints: z
2792
2792
  .array(z.string())
@@ -3996,7 +3996,7 @@ registerPluginTool("diviops_variable_list", {
3996
3996
  };
3997
3997
  });
3998
3998
  registerPluginTool("diviops_variable_create", {
3999
- description: 'Create a design token variable in the Divi Variable Manager. Colors (type "colors") use gcid-* IDs and hex values. Numbers/strings/etc use gvid-* IDs. For type="numbers" fluid tokens, pass min+max shorthand (anchors default to 320px/1920px) or explicit targets — server generates arithmetically-correct clamp() formulas. All-px inputs emit px (safe default, root-agnostic). Rem inputs OR rem output require explicit opt-in: pass output_unit="rem" (accepts the 1rem=16px default) or root_font_size_px:N (declares your site\'s actual root font-size for correct rem emission on non-16px-root sites). Mutually exclusive with value. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; input-shape rejections (invalid type, fluid+value conflict, rem-without-opt-in, malformed id, non-hex color, etc.) return ok:false with code \'invalid_input\' and `error.data` documenting the failed field. Algorithmic clamp() failures return code \'variable.fluid_generation_failed\' with `error.data = { min, max, targets, reason }`.' +
3999
+ description: 'Create a design token variable in the Divi Variable Manager. Supplying an existing ID in the same type edits its label and base value. Agents supporting mode-aware writes return data.updated_existing=true on update. On Divi 5.20+ edits are saved through Divi\'s own variable writer, which normalizes stored fields the same way the Variable Manager does. A mode-managed value updates the default mode together with the base or the edit is refused. Colors (type "colors") use gcid-* IDs and hex values. Numbers/strings/etc use gvid-* IDs. For type="numbers" fluid tokens, pass min+max shorthand (anchors default to 320px/1920px) or explicit targets — server generates arithmetically-correct clamp() formulas. All-px inputs emit px (safe default, root-agnostic). Rem inputs OR rem output require explicit opt-in: pass output_unit="rem" (accepts the 1rem=16px default) or root_font_size_px:N (declares your site\'s actual root font-size for correct rem emission on non-16px-root sites). Mutually exclusive with value. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; input-shape rejections (invalid type, fluid+value conflict, rem-without-opt-in, malformed id, non-hex color, etc.) return ok:false with code \'invalid_input\' and `error.data` documenting the failed field. Algorithmic clamp() failures return code \'variable.fluid_generation_failed\' with `error.data = { min, max, targets, reason }`.' +
4000
4000
  DRY_RUN_DESC_SUFFIX,
4001
4001
  inputSchema: {
4002
4002
  type: z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.81",
3
+ "version": "1.5.83",
4
4
  "description": "MCP server for Divi 5 on WordPress. List pages, inspect presets and edit native Divi modules through the DiviOps Agent plugin.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",