@respira/wordpress-mcp-server 8.3.21 → 8.3.23

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 (33) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/__tests__/303ad1de-fse-operation-schema.test.d.ts +2 -0
  3. package/dist/__tests__/303ad1de-fse-operation-schema.test.d.ts.map +1 -0
  4. package/dist/__tests__/303ad1de-fse-operation-schema.test.js +98 -0
  5. package/dist/__tests__/303ad1de-fse-operation-schema.test.js.map +1 -0
  6. package/dist/__tests__/953dde4e-verb-rewriting-host-method-override.test.d.ts +29 -0
  7. package/dist/__tests__/953dde4e-verb-rewriting-host-method-override.test.d.ts.map +1 -0
  8. package/dist/__tests__/953dde4e-verb-rewriting-host-method-override.test.js +305 -0
  9. package/dist/__tests__/953dde4e-verb-rewriting-host-method-override.test.js.map +1 -0
  10. package/dist/__tests__/9dee06c4-patch-identifier-vocabulary.test.d.ts +2 -0
  11. package/dist/__tests__/9dee06c4-patch-identifier-vocabulary.test.d.ts.map +1 -0
  12. package/dist/__tests__/9dee06c4-patch-identifier-vocabulary.test.js +130 -0
  13. package/dist/__tests__/9dee06c4-patch-identifier-vocabulary.test.js.map +1 -0
  14. package/dist/__tests__/dfe2d236-site-url-redirects-on-write.test.d.ts +31 -0
  15. package/dist/__tests__/dfe2d236-site-url-redirects-on-write.test.d.ts.map +1 -0
  16. package/dist/__tests__/dfe2d236-site-url-redirects-on-write.test.js +191 -0
  17. package/dist/__tests__/dfe2d236-site-url-redirects-on-write.test.js.map +1 -0
  18. package/dist/fse-operation-schema.d.ts +20 -0
  19. package/dist/fse-operation-schema.d.ts.map +1 -0
  20. package/dist/fse-operation-schema.js +75 -0
  21. package/dist/fse-operation-schema.js.map +1 -0
  22. package/dist/patch-identifier.d.ts +5 -0
  23. package/dist/patch-identifier.d.ts.map +1 -0
  24. package/dist/patch-identifier.js +87 -0
  25. package/dist/patch-identifier.js.map +1 -0
  26. package/dist/server.d.ts.map +1 -1
  27. package/dist/server.js +12 -8
  28. package/dist/server.js.map +1 -1
  29. package/dist/wordpress-client.d.ts +90 -9
  30. package/dist/wordpress-client.d.ts.map +1 -1
  31. package/dist/wordpress-client.js +447 -20
  32. package/dist/wordpress-client.js.map +1 -1
  33. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -18,6 +18,7 @@ import { getBricksTools, dispatchBricksTool } from './bricks-tools.js';
18
18
  import { getElementorTools, dispatchElementorTool } from './elementor-tools.js';
19
19
  import { getAcfTools, resolveAcfToolName } from './acf-tools.js';
20
20
  import { getUsageEmitter, deriveToolKind } from './usage-emitter.js';
21
+ import { FSE_OPERATION_ITEM_SCHEMA } from './fse-operation-schema.js';
21
22
  import { collapseLauncherProcesses, validateApiKeyShape, describeConfigOrigin, configOriginKey } from './config.js';
22
23
  // Process-local secret keeps target hashes useful for same-session retry
23
24
  // detection without making low-entropy WordPress ids reversible centrally.
@@ -3713,7 +3714,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
3713
3714
  id: { type: 'string' },
3714
3715
  kind: { type: 'string', enum: ['template', 'template_part'] },
3715
3716
  expected_fingerprint: { type: 'string' },
3716
- operations: { type: 'array', items: { type: 'object' }, maxItems: 50 },
3717
+ operations: { type: 'array', items: FSE_OPERATION_ITEM_SCHEMA, maxItems: 50 },
3717
3718
  verification_marker: { type: 'string' },
3718
3719
  dry_run: { type: 'boolean' },
3719
3720
  edit_target: { type: 'string', enum: ['approval', 'live'] },
@@ -3824,7 +3825,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
3824
3825
  properties: {
3825
3826
  id: { type: 'string' },
3826
3827
  expected_fingerprint: { type: 'string' },
3827
- operations: { type: 'array', items: { type: 'object' }, maxItems: 50 },
3828
+ operations: { type: 'array', items: FSE_OPERATION_ITEM_SCHEMA, maxItems: 50 },
3828
3829
  verification_marker: { type: 'string' },
3829
3830
  dry_run: { type: 'boolean' },
3830
3831
  edit_target: { type: 'string', enum: ['approval', 'live'] },
@@ -3940,7 +3941,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
3940
3941
  properties: {
3941
3942
  id: { type: 'string' },
3942
3943
  expected_fingerprint: { type: 'string' },
3943
- operations: { type: 'array', items: { type: 'object' }, maxItems: 50 },
3944
+ operations: { type: 'array', items: FSE_OPERATION_ITEM_SCHEMA, maxItems: 50 },
3944
3945
  verification_marker: { type: 'string' },
3945
3946
  dry_run: { type: 'boolean' },
3946
3947
  edit_target: { type: 'string', enum: ['approval', 'live'] },
@@ -4396,7 +4397,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
4396
4397
  },
4397
4398
  {
4398
4399
  name: 'wordpress_apply_builder_patch',
4399
- description: 'Apply a list of targeted builder patch operations. Each operation is { identifier: { id|admin_label|path|type [+match_content] }, updates: { content?, attributes?, ...flat_settings? } }. The identifier block follows the same shape as wordpress_find_element\'s identifier; the updates block follows the same shape as wordpress_update_module\'s updates. Returns 400 respira_patch_invalid_operation when an entry is missing either field. This is NOT a JSON-Patch document — do not pass { op, path, value } shapes (those will be rejected). Example: { operations: [{ identifier: { admin_label: "Hero" }, updates: { admin_label: "Hero Content" } }] }.',
4400
+ description: 'Apply a list of targeted builder patch operations. Each operation is { identifier: { id|admin_label|path|type [+match_content] }, updates: { content?, attributes?, ...flat_settings? } }. The identifier is keyed by what you know: { id: "2c3a794b-..." } (a Divi 5 _nodeId, Elementor or Bricks id), { path: "0.2.1" } (the path_string wordpress_find_element returns), { admin_label: "Hero" }, or { type: "divi/text", match_content: "text inside it" }. In the identifier, `type` is the MODULE type, never the kind of identifier. wordpress_find_element\'s vocabulary is also accepted when the value is present: { identifier_type: "id", identifier_value: "..." } and { type: "id", value: "..." } (type one of id, path, admin_label, class, content, text) are read as { id: "..." }. class, content and text resolve only on Divi 4 shortcode pages; elsewhere they are refused with a 400, so look the element up with wordpress_find_element and send its path_string as { path }. An id shared by several elements (duplicated modules keep their id) is refused with respira_patch_ambiguous_target and the candidate paths. The updates block follows the same shape as wordpress_update_module\'s updates. Returns 400 respira_patch_invalid_operation when an entry is missing either field. This is NOT a JSON-Patch document — do not pass { op, path, value } shapes (those will be rejected). Example: { operations: [{ identifier: { admin_label: "Hero" }, updates: { admin_label: "Hero Content" } }] }.',
4400
4401
  inputSchema: {
4401
4402
  type: 'object',
4402
4403
  properties: {
@@ -4421,13 +4422,16 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
4421
4422
  properties: {
4422
4423
  identifier: {
4423
4424
  type: 'object',
4424
- description: 'Element identifier. Provide exactly one of id / admin_label / path / type. match_content disambiguates duplicates of the same type. `path` accepts both dialects: the index form respira_find_element emits ("1.0.1") and the key-interleaved form ("1.children.0.children.1"). They name the same element.',
4425
+ description: 'Element identifier. Provide exactly one of id / admin_label / path / type. match_content disambiguates duplicates of the same type. `path` accepts both dialects: the index form respira_find_element emits ("1.0.1") and the key-interleaved form ("1.children.0.children.1"). They name the same element. `type` is the MODULE type ("divi/text"), never the kind of identifier. wordpress_find_element\'s vocabulary is also read: { identifier_type: "id", identifier_value: "..." } or { type: "id", value: "..." } becomes { id: "..." } (type one of id, path, admin_label, class, content, text; value required). Prefer the canonical keys.',
4425
4426
  properties: {
4426
- id: { type: 'string', description: 'Builder element ID (Divi 5 _nodeId, Elementor element id, Bricks id, etc).' },
4427
+ id: { type: 'string', description: 'Builder element ID (Divi 5 _nodeId, Elementor element id, Bricks id, etc). An id shared by several elements (duplicated modules) is refused with the candidate paths; send one of them as path.' },
4427
4428
  admin_label: { type: 'string', description: 'Admin label / navigator label.' },
4428
4429
  path: { description: 'Index path as either a dot-string "0.1.2" or an array [0,1,2].' },
4429
- type: { type: 'string', description: 'Module type (e.g. "divi/heading", "et_pb_text", "core/paragraph").' },
4430
+ type: { type: 'string', description: 'Module type (e.g. "divi/heading", "et_pb_text", "core/paragraph"). Not the identifier kind: with a `value` next to it, type "id", "path", "admin_label", "class", "content" or "text" is read as find_element vocabulary instead.' },
4430
4431
  match_content: { type: 'string', description: 'Optional content substring for disambiguation.' },
4432
+ value: { type: 'string', description: 'find_element vocabulary: the value for a `type` of id, path, admin_label, class, content or text. { type: "path", value: "0.2.1" } is read as { path: "0.2.1" }.' },
4433
+ identifier_type: { type: 'string', description: 'find_element vocabulary: id, path, admin_label, type, class, content or text. Read together with identifier_value, e.g. { identifier_type: "id", identifier_value: "2c3a794b-..." } is read as { id: "2c3a794b-..." }.' },
4434
+ identifier_value: { type: 'string', description: 'find_element vocabulary: the value for identifier_type.' },
4431
4435
  },
4432
4436
  },
4433
4437
  updates: {
@@ -11191,7 +11195,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
11191
11195
  },
11192
11196
  options: {
11193
11197
  type: 'object',
11194
- description: 'Conversion options: {status, title, preserve_tokens, font_substitution, responsive}. preserve_tokens (default TRUE): registers the document\'s :root CSS custom properties as the builder\'s own global tokens (Elementor globals, Bricks palette/variables, theme.json, ...) and keeps converted content referencing them, so the design system stays a set of named tokens instead of copied literals. Existing site tokens are never overwritten. Pass preserve_tokens: false to resolve every var() to its literal value and leave the site\'s global stores untouched.',
11198
+ description: 'Conversion options: {status, title, mode, preserve_tokens, font_substitution, responsive}. mode (plugin 8.8.34+): "fidelity" is the default when the document has a stylesheet on Divi 5 and Bricks: the file\'s structure is kept one to one, every leaf keeps its markup, and the stylesheet travels verbatim scoped to the page, so the page looks like the file and the site\'s design direction is not applied; "restyle" re-types the page in the builder\'s own settings and site tokens. preserve_tokens (default TRUE): registers the document\'s :root CSS custom properties as the builder\'s own global tokens (Elementor globals, Bricks palette/variables, theme.json, ...) and keeps converted content referencing them, so the design system stays a set of named tokens instead of copied literals. Existing site tokens are never overwritten. Pass preserve_tokens: false to resolve every var() to its literal value and leave the site\'s global stores untouched.',
11195
11199
  },
11196
11200
  },
11197
11201
  required: ['html'],