@respira/wordpress-mcp-server 6.17.2 → 6.18.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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAyGzE,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;IA6SvE,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,oBAAoB;IAQ5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IAmBrB,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;YA4MP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;IA6tEtB;;;;;;OAMG;IACH,yEAAyE;IACzE,OAAO,C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AAa;IAUrB;;;;;;OAMG;YACW,UAAU;IA2CxB;;;;;;;;;;;;;;OAcG;YACW,WAAW;IAyIzB;;;;;;;;;OASG;YACW,kBAAkB;IA6FhC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YA4MP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;IAmxEtB;;;;;;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;YA+Dd,gBAAgB;IAqpB9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoRzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAyCV"}
package/dist/server.js CHANGED
@@ -403,6 +403,16 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
403
403
  - Direct edit mode: when enabled in settings, writes go straight to the original (skip duplicate workflow)
404
404
  - respira_validate_security — check content for XSS and security issues before saving
405
405
 
406
+ ## Theme files (CSS-family only, plugin 7.0.42+)
407
+
408
+ For agencies that source-control a shared child theme stylesheet (e.g. vds/css/custom.css) across many sites: write the file on disk, not the Customizer Additional CSS post.
409
+
410
+ - respira_read_theme_file — read a CSS / SCSS / LESS / JSON theme file
411
+ - respira_write_theme_file — replace (or create) a theme file with new contents
412
+ - respira_append_theme_file — append a block to an existing theme file
413
+
414
+ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of scope. 1 MiB cap per file. Requires the WP edit_themes capability on the user behind the API key.
415
+
406
416
  ## WooCommerce (when addon installed)
407
417
 
408
418
  21 tools for product management, categories, tags, orders, stock, and sales reports. All prefixed woocommerce_*.`,
@@ -1840,6 +1850,57 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
1840
1850
  required: ['content'],
1841
1851
  },
1842
1852
  },
1853
+ {
1854
+ name: 'wordpress_read_theme_file',
1855
+ description: 'Read the contents of a theme stylesheet on disk (CSS / SCSS / LESS / JSON only). Path is relative to wp-content/themes, e.g. `vds/css/custom.css`. Useful for diffing before a write and for handing the existing stylesheet to an LLM as context. Requires plugin v7.0.42+ and the user behind the API key must have the WP `edit_themes` capability. Returns content, content_md5, byte_size, mtime, theme_role (active_stylesheet | active_template | other), is_writable.',
1856
+ inputSchema: {
1857
+ type: 'object',
1858
+ properties: {
1859
+ relative_path: {
1860
+ type: 'string',
1861
+ description: 'Path relative to wp-content/themes/. Example: `vds/css/custom.css`. No leading slash, no `..` segments. Extension must be one of: css, scss, less, json.',
1862
+ },
1863
+ },
1864
+ required: ['relative_path'],
1865
+ },
1866
+ readOnlyHint: true,
1867
+ },
1868
+ {
1869
+ name: 'wordpress_write_theme_file',
1870
+ description: 'Replace (or create) a theme stylesheet on disk with the given content. CSS / SCSS / LESS / JSON only. Creates any missing parent directories under the theme. Path is relative to wp-content/themes, e.g. `vds/css/custom.css`. Use this when the agency source-controls a shared child theme stylesheet and the agent needs to push CSS edits to the same file their human devs commit, not to the Customizer Additional CSS post. Requires plugin v7.0.42+ and the user behind the API key must have the WP `edit_themes` capability. Hard cap: 1 MiB per file. Returns bytes_written, content_md5, theme_role, mtime.',
1871
+ inputSchema: {
1872
+ type: 'object',
1873
+ properties: {
1874
+ relative_path: {
1875
+ type: 'string',
1876
+ description: 'Path relative to wp-content/themes/. Example: `vds/css/custom.css`. No leading slash, no `..` segments. Extension must be one of: css, scss, less, json.',
1877
+ },
1878
+ content: {
1879
+ type: 'string',
1880
+ description: 'Full file contents. Up to 1 MiB. Existing file is fully replaced.',
1881
+ },
1882
+ },
1883
+ required: ['relative_path', 'content'],
1884
+ },
1885
+ },
1886
+ {
1887
+ name: 'wordpress_append_theme_file',
1888
+ description: 'Append content to a theme stylesheet on disk. CSS / SCSS / LESS / JSON only. Adds a leading newline if the existing file did not end in one so two appended blocks do not fuse on the seam. If the file does not exist yet, behaves identically to write (creates it + any missing parent directories). Path is relative to wp-content/themes, e.g. `vds/css/custom.css`. Useful for adding per-page CSS to a shared theme stylesheet without rewriting the whole file. Requires plugin v7.0.42+ and the user behind the API key must have the WP `edit_themes` capability. Hard cap: post-append file size cannot exceed 1 MiB. Returns appended_bytes, total_bytes, content_md5, theme_role, mtime.',
1889
+ inputSchema: {
1890
+ type: 'object',
1891
+ properties: {
1892
+ relative_path: {
1893
+ type: 'string',
1894
+ description: 'Path relative to wp-content/themes/. Example: `vds/css/custom.css`. No leading slash, no `..` segments. Extension must be one of: css, scss, less, json.',
1895
+ },
1896
+ content: {
1897
+ type: 'string',
1898
+ description: 'Block to append. Up to 1 MiB. Final file size after append cannot exceed 1 MiB.',
1899
+ },
1900
+ },
1901
+ required: ['relative_path', 'content'],
1902
+ },
1903
+ },
1843
1904
  {
1844
1905
  name: 'wordpress_switch_site',
1845
1906
  description: 'Switch to a different WordPress site in the active Respira multi-site configuration.',
@@ -3984,6 +4045,18 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
3984
4045
  };
3985
4046
  case 'wordpress_validate_security':
3986
4047
  return await client.validateSecurity(args.content);
4048
+ case 'wordpress_read_theme_file':
4049
+ return await client.readThemeFile(args.relative_path);
4050
+ case 'wordpress_write_theme_file':
4051
+ return {
4052
+ ...(await client.writeThemeFile(args.relative_path, args.content)),
4053
+ respira_approvals_url: client.getApprovalsUrl(),
4054
+ };
4055
+ case 'wordpress_append_theme_file':
4056
+ return {
4057
+ ...(await client.appendThemeFile(args.relative_path, args.content)),
4058
+ respira_approvals_url: client.getApprovalsUrl(),
4059
+ };
3987
4060
  case 'wordpress_switch_site': {
3988
4061
  const newSite = this.sites.get(args.site_id);
3989
4062
  if (!newSite) {