@respira/wordpress-mcp-server 2.2.0 → 2.2.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/README.md CHANGED
@@ -8,14 +8,16 @@
8
8
 
9
9
  <p align="center">
10
10
  <strong>The only WordPress MCP with page builder support.</strong><br>
11
- Edit Divi, Elementor, Bricks & 7 more builders with Cursor, Claude Code & Windsurf.
11
+ Edit Divi, Elementor, Bricks & 8 more builders with Cursor, Claude Code & Windsurf.<br>
12
+ Add WooCommerce add-on abilities for products, orders, inventory, coupons, and sales reports.
12
13
  </p>
13
14
 
14
15
  <p align="center">
15
16
  <a href="https://www.npmjs.com/package/@respira/wordpress-mcp-server"><img src="https://img.shields.io/npm/v/@respira/wordpress-mcp-server.svg?style=flat-square&color=blue" alt="npm version"></a>
16
17
  <a href="https://www.npmjs.com/package/@respira/wordpress-mcp-server"><img src="https://img.shields.io/npm/dm/@respira/wordpress-mcp-server.svg?style=flat-square" alt="npm downloads"></a>
17
- <img src="https://img.shields.io/badge/page%20builders-10-green?style=flat-square" alt="10 Page Builders">
18
+ <img src="https://img.shields.io/badge/page%20builders-11-green?style=flat-square" alt="11 Page Builders">
18
19
  <img src="https://img.shields.io/badge/tools-60%2B-purple?style=flat-square" alt="60+ Tools">
20
+ <img src="https://img.shields.io/badge/WooCommerce%20add--on-20%2B%20tools-7F54B3?style=flat-square" alt="WooCommerce add-on tools">
19
21
  <img src="https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
20
22
  <a href="https://respira.press"><img src="https://img.shields.io/badge/website-respira.press-orange?style=flat-square" alt="Website"></a>
21
23
  </p>
@@ -54,6 +56,11 @@
54
56
  | **Multilingual** | | |
55
57
  | WPML support | Yes | No |
56
58
  | Menu translations | Yes | No |
59
+ | **WooCommerce Add-on** | | |
60
+ | Product management tools | Yes (add-on) | No |
61
+ | Order status and operations | Yes (add-on) | No |
62
+ | Inventory and stock tools | Yes (add-on) | No |
63
+ | Sales reports and coupons | Yes (add-on) | No |
57
64
 
58
65
  ### Supported Page Builders
59
66
 
@@ -75,6 +82,18 @@
75
82
  - **Brizy** - Blocks and elements
76
83
  - **Thrive Architect** - Elements and templates
77
84
 
85
+ ### WooCommerce Add-on Abilities
86
+
87
+ Respira MCP can expose WooCommerce tools when the WooCommerce add-on is installed and licensed:
88
+
89
+ - Product operations: list/get/create/update/duplicate, variations, categories
90
+ - Order operations: list/get/update status, safe order updates
91
+ - Inventory operations: stock status overview, stock quantity updates
92
+ - Commerce operations: coupons, customers, sales reports
93
+ - Add-on gating: tools auto-register only when add-on is active + licensed
94
+
95
+ WooCommerce add-on details: [respira.press/addons/woocommerce](https://respira.press/addons/woocommerce)
96
+
78
97
  ---
79
98
 
80
99
  ## Quick Start (3 Minutes)
@@ -185,6 +204,15 @@ Unlike other MCP servers that edit live pages directly, Respira:
185
204
  2. **Preserves the original** untouched
186
205
  3. **Lets you preview** changes before going live
187
206
  4. **Approve in WordPress** when ready
207
+ 5. **Returns the approvals URL** in mutation responses (`respira_approvals_url`) so assistants can direct users to:
208
+ `https://your-site.com/wp-admin/admin.php?page=respira-approvals`
209
+
210
+ ### Divi Safety Contract
211
+
212
+ - Every `wordpress_inject_builder_content` call for `builder=\"divi\"` must include `diviVersion`:
213
+ - `\"4\"` for Divi 4 shortcode format
214
+ - `\"5\"` for Divi 5 block format
215
+ - If omitted, MCP returns a confirmation-required response instead of injecting.
188
216
 
189
217
  Your live site is never at risk.
190
218
 
@@ -220,7 +248,7 @@ wp mcp-adapter serve respira-press --user=admin
220
248
 
221
249
  ---
222
250
 
223
- ## 60+ Tools
251
+ ## 60+ Core Tools + WooCommerce Add-on Tools
224
252
 
225
253
  ### Page Builder Tools
226
254
  | Tool | What it does |
@@ -256,6 +284,17 @@ wp mcp-adapter serve respira-press --user=admin
256
284
  | `wordpress_analyze_aeo` | AI search engine optimization check |
257
285
  | `wordpress_analyze_readability` | Flesch score, sentence analysis |
258
286
 
287
+ ### WooCommerce Add-on Tools (License-gated)
288
+ | Tool | What it does |
289
+ |------|-------------|
290
+ | `woocommerce_list_products` / `woocommerce_get_product` | Browse and inspect products |
291
+ | `woocommerce_create_product` / `woocommerce_update_product` | Create and update products |
292
+ | `woocommerce_duplicate_product` | Duplicate products safely before edits |
293
+ | `woocommerce_list_orders` / `woocommerce_get_order` | List and inspect orders |
294
+ | `woocommerce_update_order_status` | Update order status with WooCommerce flows |
295
+ | `woocommerce_get_stock_status` / `woocommerce_update_stock` | Inventory and stock management |
296
+ | `woocommerce_sales_report` | Sales analytics and reporting |
297
+
259
298
  ### Media, Users, Taxonomies, Plugins
260
299
 
261
300
  Full CRUD operations for all WordPress content types.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides comprehensive Divi documentation for AI assistants.
5
5
  */
6
- export declare const diviContext = "\nYou are editing a Divi Builder page. Divi uses a hierarchical structure: Sections > Rows > Modules.\n\n## Divi Structure\n\n- **Sections (et_pb_section)**: Top-level containers that hold rows\n- **Rows (et_pb_row)**: Column layout containers that hold modules\n- **Modules**: Content elements (text, images, buttons, etc.)\n\n## Common Divi Modules\n\n### Layout Modules\n- **et_pb_section**: Top-level container\n- **et_pb_row**: Column layout container\n\n### Content Modules (Tier 1 - Most Common)\n- **et_pb_text**: Text content module for paragraphs and headings\n - Attributes: content (HTML), text_color (hex), background_color (hex), font_size (px/em)\n- **et_pb_image**: Image module\n - Attributes: src (URL), alt (text), url (link URL), align (left/center/right)\n- **et_pb_button**: Button module\n - Attributes: button_text (text), button_url (URL), button_alignment (left/center/right), button_bg_color (hex)\n- **et_pb_cta**: Call to action module with heading, text, and button\n - Attributes: title (text), content (HTML), button_text (text), button_url (URL)\n- **et_pb_blurb**: Icon with text module\n - Attributes: title (text), content (HTML), image (URL), url (link URL)\n- **et_pb_video**: Video module\n - Attributes: src (URL - YouTube, Vimeo, or direct video), image_src (thumbnail URL)\n- **et_pb_html_content**: Custom HTML content module (supports scripts)\n - Attributes: content (HTML - can include scripts)\n- **et_pb_code**: Custom HTML/CSS/JS module\n - Attributes: content (base64 encoded)\n\n### Common Modules (Tier 2)\n- **et_pb_slider**: Content slider\n- **et_pb_testimonial**: Testimonial module\n- **et_pb_team_member**: Team member profile\n- **et_pb_pricing_tables**: Pricing table\n- **et_pb_contact_form**: Contact form\n- **et_pb_gallery**: Image gallery\n- **et_pb_accordion**: Accordion/toggle content\n- **et_pb_tabs**: Tabbed content\n- **et_pb_blog**: Blog posts display\n- **et_pb_portfolio**: Portfolio display\n\n## Common Attributes (Available on Most Modules)\n\n- **admin_label**: Label shown in builder for identification\n- **module_id**: Unique CSS ID for the module\n- **module_class**: Custom CSS class\n- **disabled_on**: Hide module on devices (format: \"off|off|off\" for desktop|tablet|phone)\n- **custom_css**: Custom CSS for this module\n- **background_color**: Background color (hex format: #FFFFFF)\n- **text_color**: Text color (hex format: #000000)\n- **padding**: Padding (format: \"10px|20px|10px|20px\" for top|right|bottom|left)\n- **margin**: Margin (same format as padding)\n\n## Format Specifications\n\n- **Colors**: Always use hex format (e.g., #0000FF for blue, #FFFFFF for white)\n- **Spacing**: Use format \"10px|20px|10px|20px\" (top|right|bottom|left)\n- **Sizing**: Use px, em, rem, %, or vw units\n- **Fonts**: Font names from Google Fonts or system fonts\n- **URLs**: Full URLs including https://\n\n## Common Tasks\n\n### Change Text Color\nFind the et_pb_text module and modify its text_color attribute to the desired hex color.\n\n### Update Heading\nFind the et_pb_text module containing the heading and modify its content attribute.\n\n### Add Button\nCreate an et_pb_button module with button_text and button_url attributes.\n\n### Change Background Color\nModify the background_color attribute of the section, row, or module.\n\n### Update Image\nFind the et_pb_image module and modify its src attribute to the new image URL.\n\n## Important Rules\n\n1. Modules MUST be inside rows (except sections)\n2. Rows MUST be inside sections\n3. Don't create bare modules without proper parent containers\n4. Check nesting depth (max 3 levels typical: section > row > module)\n5. Preserve all existing attributes when modifying modules\n6. Use proper attribute formats (hex for colors, URLs for links)\n";
6
+ export declare const diviContext = "\nYou are editing a Divi Builder page. Divi has two storage formats you must handle safely:\n- Divi 5: block-based layout using `divi/*` blocks in post content\n- Divi 4: legacy shortcode layout using `et_pb_*`\n\n## Divi 5 Structure (Primary)\n\n- **Sections (`divi/section`)**: Top-level containers\n- **Rows (`divi/row`)**: Layout containers inside sections\n- **Columns/Groups (`divi/column`, `divi/group`)**: Nested containers\n- **Modules (`divi/*`)**: Text, button, image, CTA, and other content blocks\n\n## Divi 4 Structure (Legacy)\n\n- **Sections (`et_pb_section`)**\n- **Rows (`et_pb_row`)**\n- **Modules (`et_pb_text`, `et_pb_image`, `et_pb_button`, etc.)**\n\n## Editing Contract\n\n- Use structured nodes: `{ type, attributes, children, content }`\n- Preserve unknown attributes exactly\n- Do not rewrite entire trees for small edits\n- Keep non-Divi blocks and legacy shortcode wrapper blocks unless explicitly asked to remove\n- Treat legacy wrappers as opaque: move/delete allowed, deep edits discouraged\n\n## Important Rules\n\n1. Prefer Divi 5 block edits (`divi/*`) when present\n2. Keep Divi 4 shortcode edits only for legacy pages\n3. Preserve parent/child nesting and ordering\n4. Preserve all existing attributes unless explicitly changed\n5. Use hex colors and full URLs where relevant\n6. Avoid lossy conversion between Divi 4 and Divi 5 formats\n7. For every Divi inject operation, ask for explicit confirmation: Divi 4 or Divi 5\n";
7
7
  export declare const diviAttributeHelp: {
8
8
  colors: string;
9
9
  spacing: string;
@@ -11,5 +11,5 @@ export declare const diviAttributeHelp: {
11
11
  fonts: string;
12
12
  urls: string;
13
13
  };
14
- export declare const diviValidationRules = "\nCRITICAL Divi Rules:\n1. Modules MUST be inside rows (except sections which are top-level)\n2. Rows MUST be inside sections\n3. Don't create bare modules without parents\n4. Check nesting depth (max 3 levels typical: section > row > module)\n5. Preserve module structure when modifying\n6. Always use proper attribute formats\n";
14
+ export declare const diviValidationRules = "\nCRITICAL Divi Rules:\n1. If Divi 5 blocks exist, keep output in block format (`divi/*`)\n2. Preserve `attributes` and `children` unless explicitly changed\n3. Keep legacy shortcode-wrapper blocks opaque\n4. Never overwrite a Divi 5 page with Divi 4 shortcodes\n5. Preserve module structure and ordering\n6. Always use proper attribute formats\n7. Ask user to confirm Divi 4 vs Divi 5 before every Divi inject\n";
15
15
  //# sourceMappingURL=divi-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"divi-context.d.ts","sourceRoot":"","sources":["../src/divi-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,8tHA0FvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,8UAQ/B,CAAC"}
1
+ {"version":3,"file":"divi-context.d.ts","sourceRoot":"","sources":["../src/divi-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,y7CAmCvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,iaAS/B,CAAC"}
@@ -4,95 +4,40 @@
4
4
  * Provides comprehensive Divi documentation for AI assistants.
5
5
  */
6
6
  export const diviContext = `
7
- You are editing a Divi Builder page. Divi uses a hierarchical structure: Sections > Rows > Modules.
7
+ You are editing a Divi Builder page. Divi has two storage formats you must handle safely:
8
+ - Divi 5: block-based layout using \`divi/*\` blocks in post content
9
+ - Divi 4: legacy shortcode layout using \`et_pb_*\`
8
10
 
9
- ## Divi Structure
11
+ ## Divi 5 Structure (Primary)
10
12
 
11
- - **Sections (et_pb_section)**: Top-level containers that hold rows
12
- - **Rows (et_pb_row)**: Column layout containers that hold modules
13
- - **Modules**: Content elements (text, images, buttons, etc.)
13
+ - **Sections (\`divi/section\`)**: Top-level containers
14
+ - **Rows (\`divi/row\`)**: Layout containers inside sections
15
+ - **Columns/Groups (\`divi/column\`, \`divi/group\`)**: Nested containers
16
+ - **Modules (\`divi/*\`)**: Text, button, image, CTA, and other content blocks
14
17
 
15
- ## Common Divi Modules
18
+ ## Divi 4 Structure (Legacy)
16
19
 
17
- ### Layout Modules
18
- - **et_pb_section**: Top-level container
19
- - **et_pb_row**: Column layout container
20
+ - **Sections (\`et_pb_section\`)**
21
+ - **Rows (\`et_pb_row\`)**
22
+ - **Modules (\`et_pb_text\`, \`et_pb_image\`, \`et_pb_button\`, etc.)**
20
23
 
21
- ### Content Modules (Tier 1 - Most Common)
22
- - **et_pb_text**: Text content module for paragraphs and headings
23
- - Attributes: content (HTML), text_color (hex), background_color (hex), font_size (px/em)
24
- - **et_pb_image**: Image module
25
- - Attributes: src (URL), alt (text), url (link URL), align (left/center/right)
26
- - **et_pb_button**: Button module
27
- - Attributes: button_text (text), button_url (URL), button_alignment (left/center/right), button_bg_color (hex)
28
- - **et_pb_cta**: Call to action module with heading, text, and button
29
- - Attributes: title (text), content (HTML), button_text (text), button_url (URL)
30
- - **et_pb_blurb**: Icon with text module
31
- - Attributes: title (text), content (HTML), image (URL), url (link URL)
32
- - **et_pb_video**: Video module
33
- - Attributes: src (URL - YouTube, Vimeo, or direct video), image_src (thumbnail URL)
34
- - **et_pb_html_content**: Custom HTML content module (supports scripts)
35
- - Attributes: content (HTML - can include scripts)
36
- - **et_pb_code**: Custom HTML/CSS/JS module
37
- - Attributes: content (base64 encoded)
24
+ ## Editing Contract
38
25
 
39
- ### Common Modules (Tier 2)
40
- - **et_pb_slider**: Content slider
41
- - **et_pb_testimonial**: Testimonial module
42
- - **et_pb_team_member**: Team member profile
43
- - **et_pb_pricing_tables**: Pricing table
44
- - **et_pb_contact_form**: Contact form
45
- - **et_pb_gallery**: Image gallery
46
- - **et_pb_accordion**: Accordion/toggle content
47
- - **et_pb_tabs**: Tabbed content
48
- - **et_pb_blog**: Blog posts display
49
- - **et_pb_portfolio**: Portfolio display
50
-
51
- ## Common Attributes (Available on Most Modules)
52
-
53
- - **admin_label**: Label shown in builder for identification
54
- - **module_id**: Unique CSS ID for the module
55
- - **module_class**: Custom CSS class
56
- - **disabled_on**: Hide module on devices (format: "off|off|off" for desktop|tablet|phone)
57
- - **custom_css**: Custom CSS for this module
58
- - **background_color**: Background color (hex format: #FFFFFF)
59
- - **text_color**: Text color (hex format: #000000)
60
- - **padding**: Padding (format: "10px|20px|10px|20px" for top|right|bottom|left)
61
- - **margin**: Margin (same format as padding)
62
-
63
- ## Format Specifications
64
-
65
- - **Colors**: Always use hex format (e.g., #0000FF for blue, #FFFFFF for white)
66
- - **Spacing**: Use format "10px|20px|10px|20px" (top|right|bottom|left)
67
- - **Sizing**: Use px, em, rem, %, or vw units
68
- - **Fonts**: Font names from Google Fonts or system fonts
69
- - **URLs**: Full URLs including https://
70
-
71
- ## Common Tasks
72
-
73
- ### Change Text Color
74
- Find the et_pb_text module and modify its text_color attribute to the desired hex color.
75
-
76
- ### Update Heading
77
- Find the et_pb_text module containing the heading and modify its content attribute.
78
-
79
- ### Add Button
80
- Create an et_pb_button module with button_text and button_url attributes.
81
-
82
- ### Change Background Color
83
- Modify the background_color attribute of the section, row, or module.
84
-
85
- ### Update Image
86
- Find the et_pb_image module and modify its src attribute to the new image URL.
26
+ - Use structured nodes: \`{ type, attributes, children, content }\`
27
+ - Preserve unknown attributes exactly
28
+ - Do not rewrite entire trees for small edits
29
+ - Keep non-Divi blocks and legacy shortcode wrapper blocks unless explicitly asked to remove
30
+ - Treat legacy wrappers as opaque: move/delete allowed, deep edits discouraged
87
31
 
88
32
  ## Important Rules
89
33
 
90
- 1. Modules MUST be inside rows (except sections)
91
- 2. Rows MUST be inside sections
92
- 3. Don't create bare modules without proper parent containers
93
- 4. Check nesting depth (max 3 levels typical: section > row > module)
94
- 5. Preserve all existing attributes when modifying modules
95
- 6. Use proper attribute formats (hex for colors, URLs for links)
34
+ 1. Prefer Divi 5 block edits (\`divi/*\`) when present
35
+ 2. Keep Divi 4 shortcode edits only for legacy pages
36
+ 3. Preserve parent/child nesting and ordering
37
+ 4. Preserve all existing attributes unless explicitly changed
38
+ 5. Use hex colors and full URLs where relevant
39
+ 6. Avoid lossy conversion between Divi 4 and Divi 5 formats
40
+ 7. For every Divi inject operation, ask for explicit confirmation: Divi 4 or Divi 5
96
41
  `;
97
42
  export const diviAttributeHelp = {
98
43
  colors: 'Use hex format: #0000FF (no rgb() or color names)',
@@ -103,11 +48,12 @@ export const diviAttributeHelp = {
103
48
  };
104
49
  export const diviValidationRules = `
105
50
  CRITICAL Divi Rules:
106
- 1. Modules MUST be inside rows (except sections which are top-level)
107
- 2. Rows MUST be inside sections
108
- 3. Don't create bare modules without parents
109
- 4. Check nesting depth (max 3 levels typical: section > row > module)
110
- 5. Preserve module structure when modifying
51
+ 1. If Divi 5 blocks exist, keep output in block format (\`divi/*\`)
52
+ 2. Preserve \`attributes\` and \`children\` unless explicitly changed
53
+ 3. Keep legacy shortcode-wrapper blocks opaque
54
+ 4. Never overwrite a Divi 5 page with Divi 4 shortcodes
55
+ 5. Preserve module structure and ordering
111
56
  6. Always use proper attribute formats
57
+ 7. Ask user to confirm Divi 4 vs Divi 5 before every Divi inject
112
58
  `;
113
59
  //# sourceMappingURL=divi-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divi-context.js","sourceRoot":"","sources":["../src/divi-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0F1B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,mDAAmD;IAC3D,OAAO,EAAE,yDAAyD;IAClE,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE,8CAA8C;IACrD,IAAI,EAAE,uCAAuC;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;CAQlC,CAAC"}
1
+ {"version":3,"file":"divi-context.js","sourceRoot":"","sources":["../src/divi-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC1B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,mDAAmD;IAC3D,OAAO,EAAE,yDAAyD;IAClE,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE,8CAA8C;IACrD,IAAI,EAAE,uCAAuC;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;CASlC,CAAC"}
@@ -8,6 +8,13 @@ export interface DiviPrompt {
8
8
  description: string;
9
9
  template: string;
10
10
  }
11
+ export declare const diviInjectPolicy = "\nBefore calling wordpress_inject_builder_content with builder=\"divi\", always set diviVersion explicitly:\n- \"4\" for Divi 4 shortcode format\n- \"5\" for Divi 5 block format\n";
12
+ export declare const diviMigrationCopilotDisclaimer = "Respira helps you plan and validate your Divi 5 migration. Divi\u2019s Migrator performs the actual conversion.";
13
+ export declare const diviMigrationCopilotPrompts: {
14
+ id: string;
15
+ title: string;
16
+ prompt: string;
17
+ }[];
11
18
  export declare const diviPrompts: Record<string, DiviPrompt>;
12
19
  export declare const diviCommonAttributes: string[];
13
20
  export declare function getDiviPrompt(name: string): DiviPrompt | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"divi-prompts.d.ts","sourceRoot":"","sources":["../src/divi-prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAwFlD,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAShC,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAElE;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,CAYR"}
1
+ {"version":3,"file":"divi-prompts.d.ts","sourceRoot":"","sources":["../src/divi-prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,wLAI5B,CAAC;AAEF,eAAO,MAAM,8BAA8B,oHACmE,CAAC;AAE/G,eAAO,MAAM,2BAA2B;;;;GA0BvC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAmFlD,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAShC,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAElE;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,CAYR"}
@@ -3,26 +3,58 @@
3
3
  *
4
4
  * Pre-built prompt expansions for common Divi editing tasks.
5
5
  */
6
+ export const diviInjectPolicy = `
7
+ Before calling wordpress_inject_builder_content with builder="divi", always set diviVersion explicitly:
8
+ - "4" for Divi 4 shortcode format
9
+ - "5" for Divi 5 block format
10
+ `;
11
+ export const diviMigrationCopilotDisclaimer = 'Respira helps you plan and validate your Divi 5 migration. Divi’s Migrator performs the actual conversion.';
12
+ export const diviMigrationCopilotPrompts = [
13
+ {
14
+ id: 'readiness_audit',
15
+ title: 'Migration readiness audit',
16
+ prompt: `Inventory all Divi pages/templates, identify Divi 4 vs Divi 5 vs mixed structures, and score migration risk by page. Include third-party module risk notes.\n\nDivi’s Migrator performs conversion. This plan helps you run it safely.`,
17
+ },
18
+ {
19
+ id: 'staging_backup_plan',
20
+ title: 'Staging + backup plan',
21
+ prompt: `Create an ordered staging migration runbook with backup checkpoints, rollback criteria, owner assignments, and sign-off gates.\n\nDivi’s Migrator performs conversion. This plan helps you run it safely.`,
22
+ },
23
+ {
24
+ id: 'compatibility_cleanup',
25
+ title: 'Compatibility Mode cleanup',
26
+ prompt: `Identify likely compatibility-mode pages, prioritize legacy module replacement, and propose performance-focused cleanup milestones.\n\nDivi’s Migrator performs conversion. This plan helps you run it safely.`,
27
+ },
28
+ {
29
+ id: 'post_migration_qa',
30
+ title: 'Post-migration QA',
31
+ prompt: `Generate a QA checklist for Divi Visual Builder open tests, frontend diffs, CSS regressions, and a clear definition of done.\n\nDivi’s Migrator performs conversion. This plan helps you run it safely.`,
32
+ },
33
+ {
34
+ id: 'modernize_layout',
35
+ title: 'Modernize this layout',
36
+ prompt: `For a selected migrated page, propose a modernization plan that replaces legacy islands with native Divi 5 modules where feasible while preserving design intent.\n\nDivi’s Migrator performs conversion. This plan helps you run it safely.`,
37
+ },
38
+ ];
6
39
  export const diviPrompts = {
7
40
  createHeroSection: {
8
41
  name: 'create_divi_hero',
9
- description: 'Create a Divi hero section with background and CTA',
10
- template: `Create a Divi section with:
11
- - Background image or color
12
- - Centered text module with heading
13
- - Button module for CTA
14
-
15
- Structure:
16
- [et_pb_section background_image="{bg_url}" background_color="{bg_color}"]
17
- [et_pb_row]
18
- [et_pb_text text_orientation="center"]
19
- <h1>{heading}</h1>
20
- <p>{subheading}</p>
21
- [/et_pb_text]
22
- [et_pb_button button_url="{url}" button_text="{text}" button_alignment="center"]
23
- [/et_pb_button]
24
- [/et_pb_row]
25
- [/et_pb_section]`,
42
+ description: 'Create a Divi hero section using structured nodes',
43
+ template: `Create a Divi 5 hero structure (or Divi 4 equivalent on legacy pages) using node format:
44
+ {
45
+ type: "divi/section",
46
+ attributes: { background_color: "{bg_color}", background_image: "{bg_url}" },
47
+ children: [
48
+ {
49
+ type: "divi/row",
50
+ attributes: {},
51
+ children: [
52
+ { type: "divi/text", attributes: { text_orientation: "center" }, content: "<h1>{heading}</h1><p>{subheading}</p>" },
53
+ { type: "divi/button", attributes: { button_url: "{url}", button_text: "{text}", button_alignment: "center" }, content: "" }
54
+ ]
55
+ }
56
+ ]
57
+ }`,
26
58
  },
27
59
  updateModuleStyle: {
28
60
  name: 'update_divi_style',
@@ -38,8 +70,8 @@ Example: To make text blue, set text_color="#0000FF"`,
38
70
  },
39
71
  updateTextContent: {
40
72
  name: 'update_divi_text',
41
- description: 'Update text content in a Divi text module',
42
- template: `Find the et_pb_text module and modify its content attribute.
73
+ description: 'Update text content in a Divi text node',
74
+ template: `Find the text node (Divi 5: divi/text, Divi 4: et_pb_text) and modify only its content field.
43
75
  Content can include HTML tags like <h1>, <p>, <strong>, <em>, etc.
44
76
 
45
77
  Example:
@@ -48,30 +80,26 @@ Example:
48
80
  },
49
81
  addButton: {
50
82
  name: 'add_divi_button',
51
- description: 'Add a button module to a Divi page',
52
- template: `Create an et_pb_button module with:
83
+ description: 'Add a button node to a Divi page',
84
+ template: `Create a button node in structured format with:
53
85
  - button_text: The button label
54
86
  - button_url: The link URL
55
87
  - button_alignment: left, center, or right
56
88
  - button_bg_color: Background color (hex format)
57
89
  - button_text_color: Text color (hex format)
58
90
 
59
- Example:
60
- [et_pb_button button_text="Click Here" button_url="https://example.com" button_alignment="center" button_bg_color="#0000FF" button_text_color="#FFFFFF"]
61
- [/et_pb_button]`,
91
+ Example node:
92
+ { type: "divi/button", attributes: { button_text: "Click Here", button_url: "https://example.com", button_alignment: "center", button_bg_color: "#0000FF", button_text_color: "#FFFFFF" }, content: "" }`,
62
93
  },
63
94
  updateImage: {
64
95
  name: 'update_divi_image',
65
96
  description: 'Update an image in a Divi image module',
66
- template: `Find the et_pb_image module and modify:
97
+ template: `Find the image node (Divi 5: divi/image, Divi 4: et_pb_image) and modify:
67
98
  - src: New image URL
68
99
  - alt: Image alt text (for accessibility)
69
100
  - url: Optional link URL if image should be clickable
70
101
  - align: left, center, or right
71
-
72
- Example:
73
- [et_pb_image src="https://example.com/new-image.jpg" alt="Description" align="center"]
74
- [/et_pb_image]`,
102
+ `,
75
103
  },
76
104
  changeColors: {
77
105
  name: 'change_divi_colors',
@@ -1 +1 @@
1
- {"version":3,"file":"divi-prompts.js","sourceRoot":"","sources":["../src/divi-prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,CAAC,MAAM,WAAW,GAA+B;IACrD,iBAAiB,EAAE;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,oDAAoD;QACjE,QAAQ,EAAE;;;;;;;;;;;;;;;iBAeG;KACd;IAED,iBAAiB,EAAE;QACjB,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE;;;;;;;qDAOuC;KAClD;IAED,iBAAiB,EAAE;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE;;;;;gCAKkB;KAC7B;IAED,SAAS,EAAE;QACT,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,oCAAoC;QACjD,QAAQ,EAAE;;;;;;;;;gBASE;KACb;IAED,WAAW,EAAE;QACX,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE;;;;;;;;eAQC;KACZ;IAED,YAAY,EAAE;QACZ,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE;;;;;;;;wDAQ0C;KACrD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kBAAkB;IAClB,YAAY;IACZ,eAAe;IACf,SAAS;IACT,QAAQ;IACR,aAAa;IACb,WAAW;IACX,cAAc;CACf,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,UAAkB,EAClB,S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,EAAE,EAAE;QACjD,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/dist/server.d.ts CHANGED
@@ -11,6 +11,8 @@ export declare class RespiraWordPressServer {
11
11
  constructor(siteConfigs: WordPressSiteConfig[]);
12
12
  private setupHandlers;
13
13
  private getTools;
14
+ private isWooCommerceAddonAvailable;
15
+ private getWooCommerceTools;
14
16
  private handleToolCall;
15
17
  run(): Promise<void>;
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;gBAE5C,WAAW,EAAE,mBAAmB,EAAE;IA2B9C,OAAO,CAAC,aAAa;IAsGrB,OAAO,CAAC,QAAQ;YAijDF,cAAc;IAkTtB,GAAG;CAKV"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;gBAE5C,WAAW,EAAE,mBAAmB,EAAE;IA2B9C,OAAO,CAAC,aAAa;YAsGP,QAAQ;YA4jDR,2BAA2B;IAazC,OAAO,CAAC,mBAAmB;YAmJb,cAAc;IA6WtB,GAAG;CAKV"}