@respira/wordpress-mcp-server 7.2.11 → 7.2.13

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;AAoBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAsTzE,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;IACpC,+EAA+E;IAC/E,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAU;IAE9D,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;IAsVvE,OAAO,CAAC,cAAc;IAItB;;;;;;;;;;;;;;;;;;OAkBG;YACW,uBAAuB;IA0GrC;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IA4BrB,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB;;;;;;OAMG;YACW,UAAU;IAgDxB;;;;;;;;;;;;;;OAcG;YACW,WAAW;IAiJzB;;;;;;;;;OASG;YACW,kBAAkB;IAyIhC;;;;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,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAU;IAElD;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAQ7C;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAQ3C;IAEF,4EAA4E;IAC5E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,+BAA+B,CAAY;IAEnE,uEAAuE;IACvE,OAAO,CAAC,MAAM,CAAC,SAAS;YAWV,oBAAoB;YAqFpB,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;IAqG5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IAm4B9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAwUzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAyCV"}
package/dist/server.js CHANGED
@@ -2263,7 +2263,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2263
2263
  },
2264
2264
  {
2265
2265
  name: 'wordpress_inject_builder_content',
2266
- description: 'REPLACE (or append to) the entire page builder layout. WARNING: By default this REPLACES all existing content (use mode:"append" to add content without destroying existing elements). For editing a single module, use wordpress_update_module instead. Use exactly: gutenberg, divi, elementor, bricks, beaver, oxygen, breakdance, brizy, thrive, visual-composer, wpbakery. For Divi, divi_version is required ("4" or "5"). Replacing a page that already has content with mode="replace" requires confirm_replace=true, else returns 409 respira_replace_confirmation_required. Alternatives: mode="append" to add to existing content, or edit_target="live" to overwrite the live page directly. The gate prevents silent data loss.\n\nCanonical Divi 5 nested shape: `content: [{ type: "section", children: [{ type: "row", children: [{ type: "column", children: [{ type: "heading", settings: {...} }] }] }] }]` (rows/cols/columns/modules/elements/innerBlocks also accepted as `children` aliases). Each Divi module needs its render-critical attr in `settings` (e.g. heading→title, text→content, button→button_text); the plugin names any missing one via `respira_divi_required_attrs_missing`.',
2266
+ description: 'REPLACE (or append to) the entire page builder layout. WARNING: By default this REPLACES all existing content (use mode:"append" to add content without destroying existing elements). For editing a single module, use wordpress_update_module instead. Use exactly: gutenberg, divi, elementor, bricks, beaver, oxygen, breakdance, brizy, thrive, visual-composer, wpbakery. For Divi, divi_version is required ("4" or "5"). Replacing a page that already has content with mode="replace" requires confirm_replace=true, else returns 409 respira_replace_confirmation_required. Alternatives: mode="append" to add to existing content, or edit_target="live" to overwrite the live page directly. The gate prevents silent data loss.\n\nCanonical Divi 5 nested shape: `content: [{ type: "section", children: [{ type: "row", children: [{ type: "column", children: [{ type: "heading", settings: {...} }] }] }] }]` (rows/cols/columns/modules/elements/innerBlocks also accepted as `children` aliases). Each Divi module needs its render-critical attr in `settings` (e.g. heading→title, text→content, button→button_text); the plugin names any missing one via `respira_divi_required_attrs_missing`.\n\nLARGE SECTIONS (payload cap): if a fully styled section is too big to send in one call (some AI clients cap tool-call payload size), build it in pieces with `target_path`. First create the section frame (the section + rows + empty columns) in one small call, then append each module into its column with separate small calls: `target_path: "sections[0].rows[0].columns[1]"`, `position: -1` (append to end). Get exact bracket paths from `extract_builder_content`. Do NOT split one section across multiple top-level `mode:"append"` calls — append adds each call as a NEW section, so you would get several sections instead of one. `target_path` insert is supported on Divi 5 today; on other builders it returns `respira_target_path_unsupported` (use the lean-skeleton + `update_module` approach there).',
2267
2267
  inputSchema: {
2268
2268
  type: 'object',
2269
2269
  properties: {
@@ -2298,6 +2298,14 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2298
2298
  description: 'Divi generation hint ("4" for shortcode format, "5" for block format). Required for all Divi inject calls.',
2299
2299
  enum: ['4', '5'],
2300
2300
  },
2301
+ target_path: {
2302
+ type: 'string',
2303
+ description: 'Insert the content as children of the container at this bracket path (from extract_builder_content), e.g. "sections[0].rows[1].columns[0]", instead of at page top level. Use this to build a large section in small calls when the whole tree exceeds the AI client payload cap: create the section frame first, then append each module by target_path. Omit for normal whole-page inject. Supported on Divi 5 today; other builders return respira_target_path_unsupported.',
2304
+ },
2305
+ position: {
2306
+ type: 'number',
2307
+ description: 'Where to insert within the target_path container: -1 (default) appends to the end, 0 inserts first, N inserts at index N. Only used when target_path is set.',
2308
+ },
2301
2309
  },
2302
2310
  required: ['builder', 'page_id', 'content'],
2303
2311
  },
@@ -2618,6 +2626,35 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2618
2626
  required: ['relative_path', 'content'],
2619
2627
  },
2620
2628
  },
2629
+ {
2630
+ name: 'wordpress_read_debug_log',
2631
+ description: 'Tail wp-content/debug.log (or a custom WP_DEBUG_LOG path) to diagnose PHP fatals, warnings and notices without SSH. Read-only: never writes, rotates, or deletes the log. Only reads the last few MB of the file from the end, so this is safe on large logs. Requires plugin v7.4.21+, WP_DEBUG_LOG must be enabled on the site, and the user behind the API key must have the WP `edit_themes` capability (same gate as wordpress_read_theme_file). Lines are grouped into log entries (a stack trace stays attached to its originating error) and obvious secrets (Authorization: Bearer tokens, api_key=/password= style params, long hex/base64 blobs) are redacted before the response leaves the server. Use `level` to filter to fatals/errors/warnings, `since` to scope to recent activity, and `grep` to search for a specific string or pattern. Pairs well with wordpress_diagnose_connection: when a route returns a 5xx, pull the matching debug.log lines from around that time.',
2632
+ inputSchema: {
2633
+ type: 'object',
2634
+ properties: {
2635
+ lines: {
2636
+ type: 'number',
2637
+ description: 'Maximum number of matching log entries to return, most recent first is NOT applied (returned in chronological order). Default 200, capped at 2000.',
2638
+ minimum: 1,
2639
+ maximum: 2000,
2640
+ },
2641
+ level: {
2642
+ type: 'string',
2643
+ description: 'Filter by severity: "fatal" (PHP Fatal error only), "error" (fatal + parse + recoverable + warning-class PHP errors), "warning" (PHP Warning / Notice / Deprecated), or "all" (default, no filtering).',
2644
+ enum: ['fatal', 'error', 'warning', 'all'],
2645
+ },
2646
+ since: {
2647
+ type: 'string',
2648
+ description: 'Only return entries whose leading timestamp is after this point. Accepts an ISO-8601 timestamp or a relative expression like "-1 hour", "-30 minutes", "yesterday".',
2649
+ },
2650
+ grep: {
2651
+ type: 'string',
2652
+ description: 'Filter to entries containing this plain substring (case-insensitive), or a `/pattern/` regex (also matched case-insensitively; malformed patterns fall back to a plain substring match instead of erroring).',
2653
+ },
2654
+ },
2655
+ },
2656
+ readOnlyHint: true,
2657
+ },
2621
2658
  {
2622
2659
  name: 'wordpress_switch_site',
2623
2660
  description: 'Switch to a different WordPress site in the active Respira multi-site configuration.',
@@ -4003,6 +4040,21 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
4003
4040
  },
4004
4041
  destructiveHint: true,
4005
4042
  },
4043
+ {
4044
+ name: 'wordpress_detach_duplicate',
4045
+ description: 'Clear the is_duplicate/original_id link on a post Respira still tracks as a pending duplicate, WITHOUT deleting it or overwriting the original. Use this instead of approving or rejecting when the "duplicate" turned out to be its own independent live page (for example it was cloned from the original once, long ago, as a starting template and later rebuilt into unrelated content). This is the fix for "Cannot edit original ... A duplicate already exists ..." errors caused by a stale/phantom duplicate: detach the duplicate_id from the error response, then retry the original edit. Works for pages, posts, and any custom post type since the relationship is tracked by post meta, not post type.',
4046
+ inputSchema: {
4047
+ type: 'object',
4048
+ properties: {
4049
+ duplicate_id: {
4050
+ type: 'number',
4051
+ description: 'ID of the post currently marked as a Respira duplicate to detach (the duplicate_id returned in the "A duplicate already exists" error, NOT the original id).',
4052
+ },
4053
+ },
4054
+ required: ['duplicate_id'],
4055
+ },
4056
+ idempotentHint: true,
4057
+ },
4006
4058
  // Options
4007
4059
  {
4008
4060
  name: 'wordpress_list_options',
@@ -5327,7 +5379,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
5327
5379
  return await client.getBuilderInlineSchemas(args.builder, args.types);
5328
5380
  case 'wordpress_inject_builder_content':
5329
5381
  return hoistDroppedStylingWarnings({
5330
- ...(await client.injectBuilderContent(args.builder, args.page_id, args.content, args.divi_version, args.edit_target, args.mode, args.confirm_replace)),
5382
+ ...(await client.injectBuilderContent(args.builder, args.page_id, args.content, args.divi_version, args.edit_target, args.mode, args.confirm_replace, args.target_path, args.position)),
5331
5383
  respira_approvals_url: client.getApprovalsUrl(),
5332
5384
  });
5333
5385
  case 'wordpress_make_responsive':
@@ -5351,6 +5403,13 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
5351
5403
  ...(await client.appendThemeFile(args.relative_path, args.content)),
5352
5404
  respira_approvals_url: client.getApprovalsUrl(),
5353
5405
  };
5406
+ case 'wordpress_read_debug_log':
5407
+ return await client.readDebugLog({
5408
+ lines: args.lines,
5409
+ level: args.level,
5410
+ since: args.since,
5411
+ grep: args.grep,
5412
+ });
5354
5413
  case 'wordpress_switch_site': {
5355
5414
  const newSite = this.sites.get(args.site_id);
5356
5415
  if (!newSite) {
@@ -5577,6 +5636,8 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
5577
5636
  confirm_live_edit: args.confirm_live_edit,
5578
5637
  approval_token: args.approval_token,
5579
5638
  });
5639
+ case 'wordpress_detach_duplicate':
5640
+ return await client.callRestV1('POST', `/duplicates/${args.duplicate_id}/detach`);
5580
5641
  // Options
5581
5642
  case 'wordpress_list_options':
5582
5643
  return await client.listOptions(args.search);