@noleemits/vision-builder-control-mcp 4.86.0 → 4.90.0

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.
Files changed (2) hide show
  1. package/index.js +43 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -111,7 +111,7 @@ process.on('SIGINT', () => {
111
111
  // CONFIG
112
112
  // ================================================================
113
113
 
114
- const VERSION = '4.86.0';
114
+ const VERSION = '4.90.0';
115
115
  const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
116
116
 
117
117
  // ================================================================
@@ -4088,6 +4088,19 @@ function getToolDefinitions() {
4088
4088
  required: ['id']
4089
4089
  }
4090
4090
  },
4091
+ {
4092
+ name: 'install_pill_presets',
4093
+ description: 'Install the shipped eyebrow/badge "pill" presets (pill-on-light, pill-on-dark, pill-outline) into the active site. On Elementor 4 each pill becomes a REAL Elementor Global Class in the kit — editable in the native Class Manager, edits propagate to every instance, and it survives plugin removal. On Elementor 3 each becomes an NVBC registry site-class whose CSS renders page-scoped for pages that use it. Color props bind to an existing kit variable when one matches the pill\'s semantic name (accent / accent-ink / accent-soft / surface-scrim) or your var_map; otherwise a literal default is baked in — no variables are ever created. pill-outline uses currentColor and needs zero brand setup. Geometry is always baked. Defaults to a DRY RUN — pass dry_run:false to write. Returns label→g-id (v4) so you can place a pill via add_element with settings.classes.value:["g-id"]. v4.90.0+.',
4094
+ inputSchema: {
4095
+ type: 'object',
4096
+ properties: {
4097
+ engine: { type: 'string', enum: ['auto', 'v4', 'v3', 'both'], description: 'Which store to install into. auto (default) = v4 if Elementor 4 is present, else v3. both = install to both stores.' },
4098
+ pills: { type: 'array', items: { type: 'string' }, description: 'Pill names to install. Omit for all shipped pills (pill-on-light, pill-on-dark, pill-outline).' },
4099
+ var_map: { type: 'object', description: 'Explicit v4 variable bindings, e.g. {"accent":"e-gv-1a2b3c4"}. Overrides the by-label match. Keys are semantic names: accent, accent-ink, accent-soft, surface-scrim.' },
4100
+ dry_run: { type: 'boolean', description: 'Report only, write nothing. Default TRUE — pass false to apply.' }
4101
+ }
4102
+ }
4103
+ },
4091
4104
  ];
4092
4105
  }
4093
4106
 
@@ -7756,6 +7769,35 @@ async function handleToolCall(name, args) {
7756
7769
  return ok(msg);
7757
7770
  }
7758
7771
 
7772
+ case 'install_pill_presets': {
7773
+ const body = {};
7774
+ if (args.engine) body.engine = args.engine;
7775
+ if (Array.isArray(args.pills) && args.pills.length) body.pills = args.pills;
7776
+ if (args.var_map && typeof args.var_map === 'object') body.var_map = args.var_map;
7777
+ body.dry_run = (args.dry_run === false) ? false : true; // default dry run
7778
+ const r = await apiCall('/install-pill-presets', 'POST', body);
7779
+ if (r.error || r.code) return ok(`Install failed: ${r.message || r.error || r.code}`);
7780
+
7781
+ let msg = `${r.dry_run ? 'DRY RUN — nothing written.' : 'Installed.'} engine=${r.engine} Elementor4=${r.elementor4 ? 'yes' : 'no'}\n`;
7782
+ msg += `Pills: ${(r.pills || []).join(', ')}\n`;
7783
+ if (r.v4) {
7784
+ msg += `\n[v4 Global Classes]\n`;
7785
+ if (r.v4.note) msg += ` ${r.v4.note}\n`;
7786
+ for (const c of (r.v4.changes || [])) msg += ` ${c}\n`;
7787
+ if (r.v4.class_ids && Object.keys(r.v4.class_ids).length) {
7788
+ const ids = Object.entries(r.v4.class_ids).map(([l, id]) => `${l} → ${id || '(new)'}`);
7789
+ msg += ` ids: ${ids.join(', ')}\n`;
7790
+ }
7791
+ }
7792
+ if (r.v3) {
7793
+ msg += `\n[v3 Registry classes]\n`;
7794
+ for (const c of (r.v3.changes || [])) msg += ` ${c}\n`;
7795
+ if (r.v3.note) msg += ` ${r.v3.note}\n`;
7796
+ }
7797
+ if (r.dry_run) msg += `\nRun again with dry_run:false to apply.\n`;
7798
+ return ok(msg);
7799
+ }
7800
+
7759
7801
  case 'repair_page_classes': {
7760
7802
  const r = await apiCall(`/pages/${args.page_id}/repair-element-classes`, 'POST', {
7761
7803
  dry_run: args.dry_run ?? false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noleemits/vision-builder-control-mcp",
3
- "version": "4.86.0",
3
+ "version": "4.90.0",
4
4
  "description": "Vision Builder Control MCP server - design token-driven page builder tools for WordPress/Elementor websites",
5
5
  "type": "module",
6
6
  "main": "index.js",