@respira/wordpress-mcp-server 7.4.1 → 7.5.1
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/__tests__/acf-tool-routing.test.d.ts +2 -0
- package/dist/__tests__/acf-tool-routing.test.d.ts.map +1 -0
- package/dist/__tests__/acf-tool-routing.test.js +37 -0
- package/dist/__tests__/acf-tool-routing.test.js.map +1 -0
- package/dist/__tests__/cowork-bootstrap.test.d.ts +2 -0
- package/dist/__tests__/cowork-bootstrap.test.d.ts.map +1 -0
- package/dist/__tests__/cowork-bootstrap.test.js +61 -0
- package/dist/__tests__/cowork-bootstrap.test.js.map +1 -0
- package/dist/__tests__/site-token-401-error-classification.test.d.ts +21 -0
- package/dist/__tests__/site-token-401-error-classification.test.d.ts.map +1 -0
- package/dist/__tests__/site-token-401-error-classification.test.js +74 -0
- package/dist/__tests__/site-token-401-error-classification.test.js.map +1 -0
- package/dist/acf-tools.d.ts +10 -0
- package/dist/acf-tools.d.ts.map +1 -1
- package/dist/acf-tools.js +15 -0
- package/dist/acf-tools.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +36 -31
- package/dist/config.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +124 -4
- package/dist/server.js.map +1 -1
- package/dist/wordpress-client.d.ts +8 -0
- package/dist/wordpress-client.d.ts.map +1 -1
- package/dist/wordpress-client.js +49 -1
- package/dist/wordpress-client.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -15,7 +15,7 @@ import { WordPressClient } from './wordpress-client.js';
|
|
|
15
15
|
import { RespiraVersionChecker } from './version-checker.js';
|
|
16
16
|
import { getBricksTools, dispatchBricksTool } from './bricks-tools.js';
|
|
17
17
|
import { getElementorTools, dispatchElementorTool } from './elementor-tools.js';
|
|
18
|
-
import { getAcfTools,
|
|
18
|
+
import { getAcfTools, resolveAcfToolName } from './acf-tools.js';
|
|
19
19
|
import { getUsageEmitter, deriveToolKind } from './usage-emitter.js';
|
|
20
20
|
/**
|
|
21
21
|
* Read the server version from package.json at module load time so the
|
|
@@ -5490,6 +5490,94 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
5490
5490
|
},
|
|
5491
5491
|
readOnlyHint: true,
|
|
5492
5492
|
},
|
|
5493
|
+
// --- Product configurator, STAGGS (addon v3.2) ---
|
|
5494
|
+
{
|
|
5495
|
+
name: 'woocommerce_configurator_status',
|
|
5496
|
+
description: 'Which product configurator is active (STAGGS) plus how many products and attribute groups use it. Start here before any configurator work.',
|
|
5497
|
+
inputSchema: { type: 'object', properties: {} },
|
|
5498
|
+
readOnlyHint: true,
|
|
5499
|
+
},
|
|
5500
|
+
{
|
|
5501
|
+
name: 'woocommerce_get_product_configurator',
|
|
5502
|
+
description: "Read a product's STAGGS configurator state: the enabled flag and all sgg_ meta (steps, attributes, themes).",
|
|
5503
|
+
inputSchema: {
|
|
5504
|
+
type: 'object',
|
|
5505
|
+
properties: { id: { type: 'number', description: 'Product ID' } },
|
|
5506
|
+
required: ['id'],
|
|
5507
|
+
},
|
|
5508
|
+
readOnlyHint: true,
|
|
5509
|
+
},
|
|
5510
|
+
{
|
|
5511
|
+
name: 'woocommerce_set_product_configurator',
|
|
5512
|
+
description: 'Enable or disable the STAGGS configurator on a product. Supports dry_run. Snapshots the product before and after.',
|
|
5513
|
+
inputSchema: {
|
|
5514
|
+
type: 'object',
|
|
5515
|
+
properties: {
|
|
5516
|
+
id: { type: 'number', description: 'Product ID' },
|
|
5517
|
+
enabled: { type: 'boolean' },
|
|
5518
|
+
dry_run: { type: 'boolean', description: 'Preview without writing (default false)' },
|
|
5519
|
+
},
|
|
5520
|
+
required: ['id', 'enabled'],
|
|
5521
|
+
},
|
|
5522
|
+
},
|
|
5523
|
+
{
|
|
5524
|
+
name: 'woocommerce_list_configurator_attributes',
|
|
5525
|
+
description: 'List STAGGS attribute groups (the reusable option sets a configurator is built from): id, title, type.',
|
|
5526
|
+
inputSchema: { type: 'object', properties: {} },
|
|
5527
|
+
readOnlyHint: true,
|
|
5528
|
+
},
|
|
5529
|
+
{
|
|
5530
|
+
name: 'woocommerce_get_configurator_attribute_items',
|
|
5531
|
+
description: "Read a STAGGS attribute's option items. The workflow is read, edit the returned array, then write it back with set_configurator_attribute_items, so STAGGS' internal sub-field names never have to be guessed.",
|
|
5532
|
+
inputSchema: {
|
|
5533
|
+
type: 'object',
|
|
5534
|
+
properties: { id: { type: 'number', description: 'STAGGS attribute (sgg_attribute) post ID' } },
|
|
5535
|
+
required: ['id'],
|
|
5536
|
+
},
|
|
5537
|
+
readOnlyHint: true,
|
|
5538
|
+
},
|
|
5539
|
+
{
|
|
5540
|
+
name: 'woocommerce_set_configurator_attribute_items',
|
|
5541
|
+
description: "Replace a STAGGS attribute's option items, written through the STAGGS/Carbon Fields helpers so storage stays consistent. Supports dry_run. Snapshots the attribute.",
|
|
5542
|
+
inputSchema: {
|
|
5543
|
+
type: 'object',
|
|
5544
|
+
properties: {
|
|
5545
|
+
id: { type: 'number', description: 'STAGGS attribute (sgg_attribute) post ID' },
|
|
5546
|
+
items: { type: 'array', items: { type: 'object' }, description: 'The full items array (read first, edit, write back)' },
|
|
5547
|
+
dry_run: { type: 'boolean', description: 'Preview without writing (default false)' },
|
|
5548
|
+
},
|
|
5549
|
+
required: ['id', 'items'],
|
|
5550
|
+
},
|
|
5551
|
+
},
|
|
5552
|
+
{
|
|
5553
|
+
name: 'woocommerce_get_plugin_state',
|
|
5554
|
+
description: 'Read allow-listed options and post meta for a known third-party plugin (currently: staggs). Keys outside the allow-list are ignored on read.',
|
|
5555
|
+
inputSchema: {
|
|
5556
|
+
type: 'object',
|
|
5557
|
+
properties: {
|
|
5558
|
+
plugin: { type: 'string', description: 'Plugin slug with a registered allow-list (staggs)' },
|
|
5559
|
+
option_keys: { type: 'array', items: { type: 'string' }, description: 'Option names to read (must match the allow-list prefixes)' },
|
|
5560
|
+
post_id: { type: 'number', description: 'Optional post whose allow-listed meta to read' },
|
|
5561
|
+
},
|
|
5562
|
+
required: ['plugin'],
|
|
5563
|
+
},
|
|
5564
|
+
readOnlyHint: true,
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
name: 'woocommerce_set_plugin_state',
|
|
5568
|
+
description: 'Write allow-listed options and post meta for a known third-party plugin (currently: staggs). Any key outside the allow-list refuses the whole request. Supports dry_run. Snapshots the post.',
|
|
5569
|
+
inputSchema: {
|
|
5570
|
+
type: 'object',
|
|
5571
|
+
properties: {
|
|
5572
|
+
plugin: { type: 'string', description: 'Plugin slug with a registered allow-list (staggs)' },
|
|
5573
|
+
options: { type: 'object', description: 'Option name to value map' },
|
|
5574
|
+
meta: { type: 'object', description: 'Meta key to value map (requires post_id)' },
|
|
5575
|
+
post_id: { type: 'number' },
|
|
5576
|
+
dry_run: { type: 'boolean', description: 'Preview without writing (default false)' },
|
|
5577
|
+
},
|
|
5578
|
+
required: ['plugin'],
|
|
5579
|
+
},
|
|
5580
|
+
},
|
|
5493
5581
|
// --- Readiness autofix (addon v3.1) ---
|
|
5494
5582
|
{
|
|
5495
5583
|
name: 'woocommerce_readiness_fixlist',
|
|
@@ -6505,6 +6593,30 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
6505
6593
|
return await client.woocommerceCreateCartLink(args);
|
|
6506
6594
|
case 'woocommerce_agent_orders_report':
|
|
6507
6595
|
return await client.woocommerceAgentOrdersReport(args);
|
|
6596
|
+
case 'woocommerce_configurator_status':
|
|
6597
|
+
return await client.woocommerceConfiguratorStatus();
|
|
6598
|
+
case 'woocommerce_get_product_configurator':
|
|
6599
|
+
return await client.woocommerceGetProductConfigurator(args.id);
|
|
6600
|
+
case 'woocommerce_set_product_configurator': {
|
|
6601
|
+
const { id, ...payload } = args;
|
|
6602
|
+
return await client.woocommerceSetProductConfigurator(id, payload);
|
|
6603
|
+
}
|
|
6604
|
+
case 'woocommerce_list_configurator_attributes':
|
|
6605
|
+
return await client.woocommerceListConfiguratorAttributes();
|
|
6606
|
+
case 'woocommerce_get_configurator_attribute_items':
|
|
6607
|
+
return await client.woocommerceGetConfiguratorAttributeItems(args.id);
|
|
6608
|
+
case 'woocommerce_set_configurator_attribute_items': {
|
|
6609
|
+
const { id, ...payload } = args;
|
|
6610
|
+
return await client.woocommerceSetConfiguratorAttributeItems(id, payload);
|
|
6611
|
+
}
|
|
6612
|
+
case 'woocommerce_get_plugin_state': {
|
|
6613
|
+
const { plugin, ...params } = args;
|
|
6614
|
+
return await client.woocommerceGetPluginState(plugin, params);
|
|
6615
|
+
}
|
|
6616
|
+
case 'woocommerce_set_plugin_state': {
|
|
6617
|
+
const { plugin, ...payload } = args;
|
|
6618
|
+
return await client.woocommerceSetPluginState(plugin, payload);
|
|
6619
|
+
}
|
|
6508
6620
|
case 'woocommerce_readiness_fixlist':
|
|
6509
6621
|
return await client.woocommerceReadinessFixlist(args);
|
|
6510
6622
|
case 'woocommerce_set_image_alt': {
|
|
@@ -6624,8 +6736,16 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
6624
6736
|
if (elementorResult !== null) {
|
|
6625
6737
|
return elementorResult;
|
|
6626
6738
|
}
|
|
6627
|
-
// Check if this is an ACF tool.
|
|
6628
|
-
|
|
6739
|
+
// Check if this is an ACF tool. ACF tools live only under the
|
|
6740
|
+
// respira_acf_* namespace (ACF_TOOL_NAMES + wordpress-client ACF_ROUTES
|
|
6741
|
+
// are keyed by respira_acf_*), but normalizeToolName blindly rewrites
|
|
6742
|
+
// respira_* -> wordpress_*, so by the time dispatchToolCall runs an ACF
|
|
6743
|
+
// call arrives as wordpress_acf_*. Map it back so the guard matches and
|
|
6744
|
+
// the plugin dispatch gets the name it expects. Without this every ACF
|
|
6745
|
+
// tool fell through to "Unknown tool: wordpress_acf_*" (kenbi/Pedro,
|
|
6746
|
+
// 2026-07-14; same class as the v7.1.0 fix that regressed).
|
|
6747
|
+
const acfName = resolveAcfToolName(name);
|
|
6748
|
+
if (acfName) {
|
|
6629
6749
|
if (!(await this.isAcfAvailable())) {
|
|
6630
6750
|
return {
|
|
6631
6751
|
__respira_is_error: true,
|
|
@@ -6633,7 +6753,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
6633
6753
|
hint: 'Install Advanced Custom Fields on the target site, then retry. ACF Pro is required for repeaters, flexible content, galleries, and options pages.'
|
|
6634
6754
|
};
|
|
6635
6755
|
}
|
|
6636
|
-
return await this.currentSite.dispatchAcfTool(
|
|
6756
|
+
return await this.currentSite.dispatchAcfTool(acfName, args);
|
|
6637
6757
|
}
|
|
6638
6758
|
// Check if this is a widget shortcut (wordpress_add_*).
|
|
6639
6759
|
if (name.startsWith('wordpress_add_')) {
|