@respira/wordpress-mcp-server 6.14.0 → 6.15.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.
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +9 -5
- package/dist/server.js.map +1 -1
- package/dist/usage-emitter.d.ts.map +1 -1
- package/dist/usage-emitter.js +4 -0
- package/dist/usage-emitter.js.map +1 -1
- package/dist/wordpress-client.d.ts +1 -1
- package/dist/wordpress-client.d.ts.map +1 -1
- package/dist/wordpress-client.js +39 -2
- package/dist/wordpress-client.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,7 +38,26 @@ function getCacheCorruptionMessage(err) {
|
|
|
38
38
|
* Handle EPIPE (broken pipe) gracefully when the client disconnects.
|
|
39
39
|
* The MCP SDK writes to stdout; when Cursor/Claude/etc closes, writes throw EPIPE.
|
|
40
40
|
* Also handle npx cache corruption with a recovery message instead of a stacktrace.
|
|
41
|
+
*
|
|
42
|
+
* v6.15.0 — panic boundary: an unexpected uncaught exception in a tool handler
|
|
43
|
+
* or async path used to take the entire MCP process down via `process.exit(1)`,
|
|
44
|
+
* which manifested client-side as the "MCP server disconnected" flap reported
|
|
45
|
+
* during the cekt.ro session 2026-05-17. From this version onwards any
|
|
46
|
+
* non-fatal exception (i.e. not EPIPE, not npx cache corruption) is logged
|
|
47
|
+
* loudly to stderr and the process continues. Per-tool-call state in the MCP
|
|
48
|
+
* server is independent — a thrown exception in one handler doesn't corrupt
|
|
49
|
+
* the next call's dispatch — so absorbing it is preferable to dragging the
|
|
50
|
+
* whole stdio session into a 30s–2min reconnect cycle. EPIPE (client gone)
|
|
51
|
+
* and npx cache corruption (broken install) still exit because there's
|
|
52
|
+
* nothing useful to do after either.
|
|
41
53
|
*/
|
|
54
|
+
function logFatalDiagnostic(label, err) {
|
|
55
|
+
const msg = err?.message || String(err);
|
|
56
|
+
const stack = err?.stack || '';
|
|
57
|
+
console.error(`[respira-mcp] ${label} (absorbed, process continuing):`, msg);
|
|
58
|
+
if (stack)
|
|
59
|
+
console.error(stack);
|
|
60
|
+
}
|
|
42
61
|
function setupEpipeHandler() {
|
|
43
62
|
process.on('uncaughtException', (err) => {
|
|
44
63
|
if (err.code === 'EPIPE' || (err.message && err.message.includes('EPIPE'))) {
|
|
@@ -49,14 +68,19 @@ function setupEpipeHandler() {
|
|
|
49
68
|
process.stderr.write(cacheMsg);
|
|
50
69
|
process.exit(1);
|
|
51
70
|
}
|
|
52
|
-
|
|
53
|
-
|
|
71
|
+
// Anything else: log and continue. Pre-v6.15.0 this exited the process
|
|
72
|
+
// and caused the MCP stdio session to flap.
|
|
73
|
+
logFatalDiagnostic('uncaughtException', err);
|
|
54
74
|
});
|
|
55
75
|
}
|
|
56
76
|
/**
|
|
57
77
|
* Catch ENOENT errors thrown from async ESM dynamic imports (the most common
|
|
58
78
|
* failure mode for cache corruption — they reject the import() promise before
|
|
59
79
|
* any of our try/catch blocks get a chance to wrap them).
|
|
80
|
+
*
|
|
81
|
+
* v6.15.0: same panic-boundary policy as uncaughtException above — only
|
|
82
|
+
* cache-corruption rejections exit; everything else is logged + absorbed so
|
|
83
|
+
* the MCP stdio channel survives.
|
|
60
84
|
*/
|
|
61
85
|
process.on('unhandledRejection', (reason) => {
|
|
62
86
|
const cacheMsg = getCacheCorruptionMessage(reason);
|
|
@@ -64,8 +88,7 @@ process.on('unhandledRejection', (reason) => {
|
|
|
64
88
|
process.stderr.write(cacheMsg);
|
|
65
89
|
process.exit(1);
|
|
66
90
|
}
|
|
67
|
-
|
|
68
|
-
throw reason;
|
|
91
|
+
logFatalDiagnostic('unhandledRejection', reason);
|
|
69
92
|
});
|
|
70
93
|
// Handle CLI flags before starting MCP server
|
|
71
94
|
const args = process.argv.slice(2);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src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CAAC,iBAAiB;gBA4Bb,WAAW,EAAE,mBAAmB,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE;IAyPvE,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,oBAAoB;IAQ5B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,aAAa;IAmBrB,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB;;;;;;;;;OASG;YACW,kBAAkB;IA6FhC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAoMP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;IA0pEtB;;;;;;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;IAqlB9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoRzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAKV"}
|
package/dist/server.js
CHANGED
|
@@ -974,7 +974,7 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
|
|
|
974
974
|
},
|
|
975
975
|
{
|
|
976
976
|
name: 'wordpress_delete_page',
|
|
977
|
-
description: 'Delete a page. IMPORTANT: By default, this only works on Respira-created duplicates. The force parameter only works if "Allow Direct Editing" is enabled in Respira settings (disabled by default for safety).',
|
|
977
|
+
description: 'Delete a page. IMPORTANT: By default, this only works on Respira-created duplicates. The force parameter only works if "Allow Direct Editing" is enabled in Respira settings (disabled by default for safety).\n\nApproval flow (added v6.14.2): the first call returns `code: respira_approval_required` with `data.approval_request.approval_token`. Pass that token back via the `approval_token` param on the next call to complete the delete. Pre-v6.14.2 the schema did not expose `approval_token` so agents could see the token in the response but had no way to pass it back — leaving every agent-driven cleanup of its own duplicates stuck.',
|
|
978
978
|
inputSchema: {
|
|
979
979
|
type: 'object',
|
|
980
980
|
properties: {
|
|
@@ -986,6 +986,10 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
|
|
|
986
986
|
type: 'boolean',
|
|
987
987
|
description: 'Force delete even if not a duplicate',
|
|
988
988
|
},
|
|
989
|
+
approval_token: {
|
|
990
|
+
type: 'string',
|
|
991
|
+
description: 'Single-use approval token from a prior respira_approval_required response. The plugin returns a fresh token on every blocked call (data.approval_request.approval_token); pass that exact string here on the retry to complete the delete.',
|
|
992
|
+
},
|
|
989
993
|
},
|
|
990
994
|
required: ['id'],
|
|
991
995
|
},
|
|
@@ -1319,7 +1323,7 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
|
|
|
1319
1323
|
},
|
|
1320
1324
|
{
|
|
1321
1325
|
name: 'wordpress_inject_builder_content',
|
|
1322
|
-
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"). Starting in plugin v7.0.16, calling this against a page that already has content with mode="replace" (the default) without also passing confirm_replace=true returns a 409 respira_replace_confirmation_required — pass mode="append" to add to existing content, pass mode="replace" AND confirm_replace=true to overwrite, or pass edit_target="live" to overwrite the live page directly (plugin v7.0.22+ accepts an authorized live edit as the confirmation). The gate prevents silent data loss.',
|
|
1326
|
+
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"). Starting in plugin v7.0.16, calling this against a page that already has content with mode="replace" (the default) without also passing confirm_replace=true returns a 409 respira_replace_confirmation_required — pass mode="append" to add to existing content, pass mode="replace" AND confirm_replace=true to overwrite, or pass edit_target="live" to overwrite the live page directly (plugin v7.0.22+ accepts an authorized live edit as the confirmation). The gate prevents silent data loss.\n\nNested Divi 5 content shape — canonical: `content: [{ type: "section", settings: {...}, children: [{ type: "row", children: [{ type: "column", children: [{ type: "heading", settings: {...} }, ...] }] }] }]`. Plugin v7.0.32 also accepts `rows / cols / columns / modules / elements / innerBlocks` as aliases for `children` on Divi (Divi-vocabulary; soft warning surfaces in response.warnings). Plugin v7.0.32 hard-errors with `respira_children_dropped` (HTTP 500) if any container payload declares children but the emit produced fewer innerBlocks — silent data-loss is no longer possible.',
|
|
1323
1327
|
inputSchema: {
|
|
1324
1328
|
type: 'object',
|
|
1325
1329
|
properties: {
|
|
@@ -3557,7 +3561,7 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
|
|
|
3557
3561
|
};
|
|
3558
3562
|
}
|
|
3559
3563
|
case 'wordpress_delete_page':
|
|
3560
|
-
return await client.deletePage(args.id, args.force);
|
|
3564
|
+
return await client.deletePage(args.id, args.force, args.approval_token);
|
|
3561
3565
|
case 'wordpress_list_posts':
|
|
3562
3566
|
return await client.listPosts(args);
|
|
3563
3567
|
case 'wordpress_read_post':
|
|
@@ -4066,14 +4070,14 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
|
|
|
4066
4070
|
// --- Composite Tools ---
|
|
4067
4071
|
{
|
|
4068
4072
|
name: 'wordpress_build_page',
|
|
4069
|
-
description: 'Create a complete page from a declarative structure. Accepts builder-specific widget definitions and creates the page with all elements in one call. Returns page_id, edit_url, and preview_url.',
|
|
4073
|
+
description: 'Create a complete page from a declarative structure. Accepts builder-specific widget definitions and creates the page with all elements in one call. Returns page_id, edit_url, and preview_url.\n\nNested structure shape (Divi 5 / any builder that nests): use `children: [...]` at every container level. As of plugin v7.0.32 the Divi builder also accepts `rows / cols / columns / modules / elements / innerBlocks` as aliases for `children` (Divi-vocabulary; soft warning surfaces in the response trace). Canonical example for a Divi 5 hero:\n\n```\nstructure: [{\n type: "section",\n settings: { background_color: "#1f4e7a", padding: "120px|0|120px|0" },\n children: [{\n type: "row",\n children: [{\n type: "column",\n children: [\n { type: "heading", settings: { title: "Hello", tag: "h1" } },\n { type: "text", settings: { content: "<p>Para</p>" } }\n ]\n }]\n }]\n}]\n```\n\nFlat shape also works — pass leaf modules at the top level and the builder auto-wraps them in section > row > column. Plugin v7.0.32 hard-errors with `respira_children_dropped` (HTTP 500) if any container payload declares children but the emit produced fewer innerBlocks, so silent data-loss is no longer possible.',
|
|
4070
4074
|
inputSchema: {
|
|
4071
4075
|
type: 'object',
|
|
4072
4076
|
properties: {
|
|
4073
4077
|
title: { type: 'string', description: 'Page title' },
|
|
4074
4078
|
structure: {
|
|
4075
4079
|
type: 'array',
|
|
4076
|
-
description: 'Array of
|
|
4080
|
+
description: 'Array of node definitions. Each node is { type, settings?, children? }. `children` recurses; Divi accepts `rows / cols / columns / modules / elements / innerBlocks` as aliases. Example: [{type:"section", children:[{type:"row", children:[{type:"column", children:[{type:"heading", settings:{title:"Hello"}}]}]}]}]',
|
|
4077
4081
|
items: { type: 'object' },
|
|
4078
4082
|
},
|
|
4079
4083
|
status: {
|