@respira/wordpress-mcp-server 6.19.5 → 6.19.7
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/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAiLzE,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAwB;IAC9C,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAsB;IAEhE;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;gBA4Bb,WAAW,EAAE,mBAAmB,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE;IAmUvE,OAAO,CAAC,cAAc;IAItB;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IA4BrB,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB;;;;;;OAMG;YACW,UAAU;IA2CxB;;;;;;;;;;;;;;OAcG;YACW,WAAW;IAyIzB;;;;;;;;;OASG;YACW,kBAAkB;IA6FhC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAuOP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd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A4BrB,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB;;;;;;OAMG;YACW,UAAU;IA2CxB;;;;;;;;;;;;;;OAcG;YACW,WAAW;IAyIzB;;;;;;;;;OASG;YACW,kBAAkB;IA6FhC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAuOP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;IA28EtB;;;;;;OAMG;IACH,yEAAyE;IACzE,OAAO,CAAC,mBAAmB,CAAoD;IAC/E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAU;YAEpC,oBAAoB;YAqDpB,2BAA2B;IAazC;;;;OAIG;YACW,cAAc;IAY5B,OAAO,CAAC,mBAAmB;IAwT3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAe3C;IAEF;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YAmCpB,cAAc;IAqG5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IA+wB9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoUzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAyCV"}
|
package/dist/server.js
CHANGED
|
@@ -4835,6 +4835,19 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
4835
4835
|
}
|
|
4836
4836
|
case 'wordpress_duplicate_element': {
|
|
4837
4837
|
const { post_id, ...rest } = args;
|
|
4838
|
+
// Pre-mcp-6.19.7 the tool exposed a single `element_id` arg, but the
|
|
4839
|
+
// plugin route /builder/elements/duplicate/{id} has always required
|
|
4840
|
+
// identifier_type + identifier_value (it inherits the same auth and
|
|
4841
|
+
// validate_callback as remove_element / move_element). Lucas Young
|
|
4842
|
+
// (actorsgym.co.uk) hit this on WPBakery — elements have no stable
|
|
4843
|
+
// id, so the call always failed with "Missing parameter(s)". We now
|
|
4844
|
+
// accept both shapes and translate the legacy one into id-based
|
|
4845
|
+
// identifiers before calling the route.
|
|
4846
|
+
if (typeof rest.element_id === 'string' && !rest.identifier_type) {
|
|
4847
|
+
rest.identifier_type = 'id';
|
|
4848
|
+
rest.identifier_value = rest.element_id;
|
|
4849
|
+
}
|
|
4850
|
+
delete rest.element_id;
|
|
4838
4851
|
return await client.callRestV2('POST', `/builder/elements/duplicate/${post_id}`, rest);
|
|
4839
4852
|
}
|
|
4840
4853
|
case 'wordpress_remove_element': {
|
|
@@ -4996,14 +5009,26 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
4996
5009
|
},
|
|
4997
5010
|
{
|
|
4998
5011
|
name: 'wordpress_duplicate_element',
|
|
4999
|
-
description: 'Duplicate an element in a page. The copy is inserted immediately after the original.',
|
|
5012
|
+
description: 'Duplicate an element in a page. The copy is inserted immediately after the original. Uses the same identifier_type / identifier_value contract as find_element / update_element / remove_element — first locate the element, then pass the matching identifier here. Builders with no stable element IDs (WPBakery, Uncode, Flatsome, Visual Composer) should use identifier_type="text" / "css_class" / "widget_type" / "path" instead of "id".',
|
|
5000
5013
|
inputSchema: {
|
|
5001
5014
|
type: 'object',
|
|
5002
5015
|
properties: {
|
|
5003
5016
|
post_id: { type: 'number', description: 'Page/post ID' },
|
|
5004
|
-
|
|
5017
|
+
identifier_type: {
|
|
5018
|
+
type: 'string',
|
|
5019
|
+
enum: ['id', 'css_class', 'text', 'widget_type', 'global_id', 'path'],
|
|
5020
|
+
description: 'How to locate the element. Use "id" only when the builder assigns stable element IDs (Elementor, Bricks, Beaver, Divi 5, Gutenberg). For WPBakery / Uncode / Flatsome / Visual Composer pages, prefer "text" (visible content), "css_class", "widget_type" (the shortcode tag), or "path" (position in the tree).',
|
|
5021
|
+
},
|
|
5022
|
+
identifier_value: {
|
|
5023
|
+
type: 'string',
|
|
5024
|
+
description: 'Value matching the chosen identifier_type.',
|
|
5025
|
+
},
|
|
5026
|
+
element_id: {
|
|
5027
|
+
type: 'string',
|
|
5028
|
+
description: 'DEPRECATED — pre-mcp-6.19.7 single-arg form. Equivalent to identifier_type:"id" + identifier_value:<this>. Kept for back-compat; new callers should use the explicit pair.',
|
|
5029
|
+
},
|
|
5005
5030
|
},
|
|
5006
|
-
required: ['post_id'
|
|
5031
|
+
required: ['post_id'],
|
|
5007
5032
|
},
|
|
5008
5033
|
},
|
|
5009
5034
|
{
|